From 63c98bfd30e750278dc48e129c549ae4c8675f64 Mon Sep 17 00:00:00 2001 From: isUnknown Date: Wed, 4 Sep 2024 18:30:33 +0200 Subject: [PATCH] newsletter field working --- composer.json | 3 +- composer.lock | 594 +- site/config/config.php | 1 + site/config/routes/brevo-create-contact.php | 45 + site/snippets/newsletter-section.php | 40 +- vendor/composer/autoload_classmap.php | 489 + vendor/composer/autoload_files.php | 2 + vendor/composer/autoload_psr4.php | 6 + vendor/composer/autoload_static.php | 525 + vendor/composer/installed.json | 616 ++ vendor/composer/installed.php | 94 +- vendor/getbrevo/brevo-php/.gitignore | 2 + vendor/getbrevo/brevo-php/.travis.yml | 7 + vendor/getbrevo/brevo-php/CHANGELOG.md | 30 + vendor/getbrevo/brevo-php/LICENSE.md | 21 + vendor/getbrevo/brevo-php/README.md | 725 ++ vendor/getbrevo/brevo-php/composer.json | 43 + vendor/getbrevo/brevo-php/composer.lock | 2107 ++++ .../getbrevo/brevo-php/docs/Api/AccountApi.md | 126 + .../brevo-php/docs/Api/AttributesApi.md | 243 + vendor/getbrevo/brevo-php/docs/Api/CRMApi.md | 678 ++ .../brevo-php/docs/Api/CompaniesApi.md | 424 + .../brevo-php/docs/Api/ContactsApi.md | 1751 ++++ .../brevo-php/docs/Api/ConversationsApi.md | 539 ++ .../getbrevo/brevo-php/docs/Api/CouponsApi.md | 303 + .../getbrevo/brevo-php/docs/Api/DealsApi.md | 591 ++ .../getbrevo/brevo-php/docs/Api/DomainsApi.md | 293 + .../brevo-php/docs/Api/EcommerceApi.md | 751 ++ .../brevo-php/docs/Api/EmailCampaignsApi.md | 790 ++ .../getbrevo/brevo-php/docs/Api/EventsApi.md | 67 + .../brevo-php/docs/Api/ExternalFeedsApi.md | 320 + .../getbrevo/brevo-php/docs/Api/FilesApi.md | 315 + .../getbrevo/brevo-php/docs/Api/FoldersApi.md | 366 + .../brevo-php/docs/Api/InboundParsingApi.md | 198 + .../getbrevo/brevo-php/docs/Api/ListsApi.md | 552 ++ .../brevo-php/docs/Api/MasterAccountApi.md | 961 ++ .../getbrevo/brevo-php/docs/Api/NotesApi.md | 310 + .../getbrevo/brevo-php/docs/Api/ProcessApi.md | 128 + .../brevo-php/docs/Api/ResellerApi.md | 952 ++ .../brevo-php/docs/Api/SMSCampaignsApi.md | 606 ++ .../getbrevo/brevo-php/docs/Api/SendersApi.md | 413 + .../getbrevo/brevo-php/docs/Api/TasksApi.md | 376 + .../docs/Api/TransactionalEmailsApi.md | 1379 +++ .../brevo-php/docs/Api/TransactionalSMSApi.md | 270 + .../docs/Api/TransactionalWhatsAppApi.md | 142 + vendor/getbrevo/brevo-php/docs/Api/UserApi.md | 358 + .../brevo-php/docs/Api/WebhooksApi.md | 360 + .../docs/Api/WhatsAppCampaignsApi.md | 543 ++ .../docs/Model/AbTestCampaignResult.md | 17 + .../Model/AbTestCampaignResultClickedLinks.md | 11 + .../Model/AbTestCampaignResultStatistics.md | 15 + .../docs/Model/AbTestVersionClicks.md | 9 + .../docs/Model/AbTestVersionClicksInner.md | 12 + .../docs/Model/AbTestVersionStats.md | 11 + .../brevo-php/docs/Model/AddChildDomain.md | 10 + .../brevo-php/docs/Model/AddContactToList.md | 11 + .../brevo-php/docs/Model/AddCredits.md | 11 + .../docs/Model/AuthenticateDomainModel.md | 11 + .../brevo-php/docs/Model/BlockDomain.md | 10 + vendor/getbrevo/brevo-php/docs/Model/Body.md | 11 + vendor/getbrevo/brevo-php/docs/Model/Body1.md | 11 + .../getbrevo/brevo-php/docs/Model/Body10.md | 15 + .../getbrevo/brevo-php/docs/Model/Body11.md | 10 + .../getbrevo/brevo-php/docs/Model/Body12.md | 13 + .../getbrevo/brevo-php/docs/Model/Body13.md | 10 + .../getbrevo/brevo-php/docs/Model/Body14.md | 13 + vendor/getbrevo/brevo-php/docs/Model/Body2.md | 12 + vendor/getbrevo/brevo-php/docs/Model/Body3.md | 12 + vendor/getbrevo/brevo-php/docs/Model/Body4.md | 13 + vendor/getbrevo/brevo-php/docs/Model/Body5.md | 11 + vendor/getbrevo/brevo-php/docs/Model/Body6.md | 11 + vendor/getbrevo/brevo-php/docs/Model/Body7.md | 13 + vendor/getbrevo/brevo-php/docs/Model/Body8.md | 20 + vendor/getbrevo/brevo-php/docs/Model/Body9.md | 19 + .../docs/Model/BodyVariablesItems.md | 9 + .../brevo-php/docs/Model/CompaniesList.md | 10 + .../getbrevo/brevo-php/docs/Model/Company.md | 13 + .../brevo-php/docs/Model/CompanyAttributes.md | 9 + .../docs/Model/CompanyAttributesInner.md | 14 + .../brevo-php/docs/Model/ComponentItems.md | 11 + .../getbrevo/brevo-php/docs/Model/Contact.md | 17 + .../docs/Model/ConversationsMessageFile.md | 14 + .../docs/Model/Conversationsmessage.md | 19 + .../ConversationsmessageFileImageInfo.md | 12 + .../docs/Model/CreateApiKeyRequest.md | 11 + .../docs/Model/CreateApiKeyResponse.md | 11 + .../brevo-php/docs/Model/CreateAttribute.md | 13 + .../docs/Model/CreateAttributeEnumeration.md | 11 + .../docs/Model/CreateCategoryModel.md | 10 + .../brevo-php/docs/Model/CreateChild.md | 15 + .../brevo-php/docs/Model/CreateContact.md | 17 + .../docs/Model/CreateCouponCollection.md | 11 + .../brevo-php/docs/Model/CreateCoupons.md | 11 + .../brevo-php/docs/Model/CreateDoiContact.md | 15 + .../brevo-php/docs/Model/CreateDomain.md | 10 + .../brevo-php/docs/Model/CreateDomainModel.md | 13 + .../docs/Model/CreateDomainModelDnsRecords.md | 11 + .../CreateDomainModelDnsRecordsDkimRecord.md | 13 + .../docs/Model/CreateEmailCampaign.md | 40 + .../Model/CreateEmailCampaignRecipients.md | 12 + .../docs/Model/CreateEmailCampaignSender.md | 12 + .../docs/Model/CreateExternalFeed.md | 18 + .../brevo-php/docs/Model/CreateList.md | 11 + .../brevo-php/docs/Model/CreateModel.md | 10 + .../docs/Model/CreateProductModel.md | 10 + .../brevo-php/docs/Model/CreateReseller.md | 11 + .../brevo-php/docs/Model/CreateSender.md | 12 + .../brevo-php/docs/Model/CreateSenderIps.md | 12 + .../brevo-php/docs/Model/CreateSenderModel.md | 12 + .../brevo-php/docs/Model/CreateSmsCampaign.md | 17 + .../docs/Model/CreateSmsCampaignRecipients.md | 11 + .../brevo-php/docs/Model/CreateSmtpEmail.md | 11 + .../docs/Model/CreateSmtpTemplate.md | 19 + .../docs/Model/CreateSmtpTemplateSender.md | 12 + .../brevo-php/docs/Model/CreateSubAccount.md | 13 + .../docs/Model/CreateSubAccountResponse.md | 10 + .../docs/Model/CreateUpdateBatchCategory.md | 11 + .../Model/CreateUpdateBatchCategoryModel.md | 11 + .../docs/Model/CreateUpdateBatchProducts.md | 11 + .../Model/CreateUpdateBatchProductsModel.md | 11 + .../docs/Model/CreateUpdateCategories.md | 13 + .../docs/Model/CreateUpdateCategory.md | 14 + .../docs/Model/CreateUpdateContactModel.md | 10 + .../docs/Model/CreateUpdateFolder.md | 10 + .../docs/Model/CreateUpdateProducts.md | 19 + .../docs/Model/CreateUpdateproduct.md | 20 + .../brevo-php/docs/Model/CreateWebhook.md | 17 + .../docs/Model/CreateWhatsAppCampaign.md | 13 + .../Model/CreateWhatsAppCampaignRecipients.md | 12 + .../docs/Model/CreateWhatsAppTemplate.md | 16 + .../brevo-php/docs/Model/CreatedBatchId.md | 10 + .../brevo-php/docs/Model/CreatedProcessId.md | 10 + vendor/getbrevo/brevo-php/docs/Model/Deal.md | 13 + .../brevo-php/docs/Model/DealAttributes.md | 9 + .../docs/Model/DealAttributesInner.md | 14 + .../brevo-php/docs/Model/DealsList.md | 10 + .../brevo-php/docs/Model/DeleteHardbounces.md | 12 + .../docs/Model/EmailExportRecipients.md | 11 + .../brevo-php/docs/Model/ErrorModel.md | 11 + vendor/getbrevo/brevo-php/docs/Model/Event.md | 14 + .../brevo-php/docs/Model/EventIdentifiers.md | 14 + .../docs/Model/ExportWebhooksHistory.md | 19 + .../getbrevo/brevo-php/docs/Model/FileData.md | 19 + .../docs/Model/FileDownloadableLink.md | 10 + .../getbrevo/brevo-php/docs/Model/FileList.md | 9 + .../brevo-php/docs/Model/GetAccount.md | 12 + .../docs/Model/GetAccountActivity.md | 10 + .../docs/Model/GetAccountActivityLogs.md | 14 + .../Model/GetAccountMarketingAutomation.md | 11 + .../brevo-php/docs/Model/GetAccountPlan.md | 15 + .../brevo-php/docs/Model/GetAccountRelay.md | 11 + .../docs/Model/GetAccountRelayData.md | 12 + .../docs/Model/GetAggregatedReport.md | 22 + .../docs/Model/GetAllExternalFeeds.md | 11 + .../docs/Model/GetAllExternalFeedsFeeds.md | 21 + .../brevo-php/docs/Model/GetAttributes.md | 10 + .../docs/Model/GetAttributesAttributes.md | 14 + .../docs/Model/GetAttributesEnumeration.md | 11 + .../brevo-php/docs/Model/GetBlockedDomains.md | 10 + .../docs/Model/GetCampaignOverview.md | 23 + .../docs/Model/GetCampaignRecipients.md | 11 + .../brevo-php/docs/Model/GetCampaignStats.md | 25 + .../brevo-php/docs/Model/GetCategories.md | 11 + .../docs/Model/GetCategoryDetails.md | 15 + .../Model/GetChildAccountCreationStatus.md | 10 + .../brevo-php/docs/Model/GetChildDomain.md | 11 + .../brevo-php/docs/Model/GetChildDomains.md | 9 + .../brevo-php/docs/Model/GetChildInfo.md | 14 + .../docs/Model/GetChildInfoApiKeys.md | 11 + .../docs/Model/GetChildInfoApiKeysV2.md | 11 + .../docs/Model/GetChildInfoApiKeysV3.md | 11 + .../docs/Model/GetChildInfoCredits.md | 11 + .../docs/Model/GetChildInfoStatistics.md | 12 + .../brevo-php/docs/Model/GetChildrenList.md | 11 + .../brevo-php/docs/Model/GetClient.md | 13 + .../docs/Model/GetContactCampaignStats.md | 18 + .../Model/GetContactCampaignStatsClicked.md | 11 + .../Model/GetContactCampaignStatsOpened.md | 13 + ...etContactCampaignStatsTransacAttributes.md | 12 + .../GetContactCampaignStatsUnsubscriptions.md | 11 + .../brevo-php/docs/Model/GetContactDetails.md | 18 + .../brevo-php/docs/Model/GetContacts.md | 11 + .../Model/GetCorporateInvitedUsersList.md | 10 + ...tCorporateInvitedUsersListFeatureAccess.md | 13 + .../GetCorporateInvitedUsersListGroups.md | 11 + .../GetCorporateInvitedUsersListUsers.md | 14 + .../docs/Model/GetCouponCollection.md | 15 + .../docs/Model/GetDeviceBrowserStats.md | 13 + .../docs/Model/GetDomainConfigurationModel.md | 13 + .../brevo-php/docs/Model/GetDomainsList.md | 10 + .../docs/Model/GetDomainsListDomains.md | 14 + .../brevo-php/docs/Model/GetEmailCampaign.md | 40 + .../brevo-php/docs/Model/GetEmailCampaigns.md | 11 + .../docs/Model/GetEmailEventReport.md | 10 + .../docs/Model/GetEmailEventReportEvents.md | 20 + .../docs/Model/GetExtendedCampaignOverview.md | 35 + .../GetExtendedCampaignOverviewSender.md | 12 + .../docs/Model/GetExtendedCampaignStats.md | 17 + .../GetExtendedCampaignStatsGlobalStats.md | 9 + .../brevo-php/docs/Model/GetExtendedClient.md | 10 + .../docs/Model/GetExtendedClientAddress.md | 13 + .../docs/Model/GetExtendedContactDetails.md | 17 + .../GetExtendedContactDetailsStatistics.md | 18 + ...ExtendedContactDetailsStatisticsClicked.md | 11 + ...tendedContactDetailsStatisticsDelivered.md | 11 + ...etExtendedContactDetailsStatisticsLinks.md | 13 + ...dedContactDetailsStatisticsMessagesSent.md | 11 + ...tExtendedContactDetailsStatisticsOpened.md | 13 + ...ContactDetailsStatisticsUnsubscriptions.md | 11 + ...sticsUnsubscriptionsAdminUnsubscription.md | 11 + ...isticsUnsubscriptionsUserUnsubscription.md | 12 + .../brevo-php/docs/Model/GetExtendedList.md | 13 + .../Model/GetExtendedListCampaignStats.md | 11 + .../docs/Model/GetExternalFeedByUUID.md | 21 + .../Model/GetExternalFeedByUUIDHeaders.md | 11 + .../brevo-php/docs/Model/GetFolder.md | 14 + .../brevo-php/docs/Model/GetFolderLists.md | 11 + .../brevo-php/docs/Model/GetFolders.md | 11 + .../docs/Model/GetInboundEmailEvents.md | 10 + .../docs/Model/GetInboundEmailEventsByUuid.md | 17 + .../GetInboundEmailEventsByUuidAttachments.md | 13 + .../Model/GetInboundEmailEventsByUuidLogs.md | 11 + .../docs/Model/GetInboundEmailEventsEvents.md | 13 + .../docs/Model/GetInvitedUsersList.md | 10 + .../Model/GetInvitedUsersListFeatureAccess.md | 12 + .../docs/Model/GetInvitedUsersListUsers.md | 13 + vendor/getbrevo/brevo-php/docs/Model/GetIp.md | 13 + .../brevo-php/docs/Model/GetIpFromSender.md | 13 + .../getbrevo/brevo-php/docs/Model/GetIps.md | 10 + .../brevo-php/docs/Model/GetIpsFromSender.md | 10 + .../getbrevo/brevo-php/docs/Model/GetList.md | 14 + .../getbrevo/brevo-php/docs/Model/GetLists.md | 11 + .../brevo-php/docs/Model/GetOrders.md | 11 + .../brevo-php/docs/Model/GetProcess.md | 13 + .../brevo-php/docs/Model/GetProcesses.md | 11 + .../brevo-php/docs/Model/GetProductDetails.md | 24 + .../brevo-php/docs/Model/GetProducts.md | 11 + .../brevo-php/docs/Model/GetReports.md | 10 + .../brevo-php/docs/Model/GetReportsReports.md | 22 + .../docs/Model/GetScheduledEmailByBatchId.md | 10 + .../GetScheduledEmailByBatchIdBatches.md | 11 + .../Model/GetScheduledEmailByMessageId.md | 11 + .../brevo-php/docs/Model/GetSegments.md | 11 + .../docs/Model/GetSegmentsSegments.md | 13 + .../brevo-php/docs/Model/GetSendersList.md | 10 + .../brevo-php/docs/Model/GetSendersListIps.md | 12 + .../docs/Model/GetSendersListSenders.md | 14 + .../docs/Model/GetSharedTemplateUrl.md | 10 + .../brevo-php/docs/Model/GetSmsCampaign.md | 17 + .../docs/Model/GetSmsCampaignOverview.md | 17 + .../docs/Model/GetSmsCampaignRecipients.md | 9 + .../docs/Model/GetSmsCampaignStats.md | 16 + .../brevo-php/docs/Model/GetSmsCampaigns.md | 11 + .../brevo-php/docs/Model/GetSmsEventReport.md | 10 + .../docs/Model/GetSmsEventReportEvents.md | 16 + .../docs/Model/GetSmtpTemplateOverview.md | 22 + .../Model/GetSmtpTemplateOverviewSender.md | 12 + .../brevo-php/docs/Model/GetSmtpTemplates.md | 11 + .../brevo-php/docs/Model/GetSsoToken.md | 10 + .../brevo-php/docs/Model/GetStatsByBrowser.md | 9 + .../brevo-php/docs/Model/GetStatsByDevice.md | 13 + .../brevo-php/docs/Model/GetStatsByDomain.md | 9 + .../Model/GetTransacAggregatedSmsReport.md | 19 + .../docs/Model/GetTransacBlockedContacts.md | 11 + .../GetTransacBlockedContactsContacts.md | 13 + .../Model/GetTransacBlockedContactsReason.md | 11 + .../docs/Model/GetTransacEmailContent.md | 16 + .../Model/GetTransacEmailContentEvents.md | 11 + .../docs/Model/GetTransacEmailsList.md | 11 + ...GetTransacEmailsListTransactionalEmails.md | 17 + .../docs/Model/GetTransacSmsReport.md | 10 + .../docs/Model/GetTransacSmsReportReports.md | 19 + .../brevo-php/docs/Model/GetUserPermission.md | 12 + .../docs/Model/GetUserPermissionPrivileges.md | 11 + .../brevo-php/docs/Model/GetWATemplates.md | 11 + .../docs/Model/GetWATemplatesTemplates.md | 17 + .../brevo-php/docs/Model/GetWebhook.md | 19 + .../brevo-php/docs/Model/GetWebhookAuth.md | 11 + .../brevo-php/docs/Model/GetWebhookHeaders.md | 11 + .../brevo-php/docs/Model/GetWebhooks.md | 10 + .../brevo-php/docs/Model/GetWhatsAppConfig.md | 15 + .../docs/Model/GetWhatsappCampaignOverview.md | 18 + .../docs/Model/GetWhatsappCampaigns.md | 11 + .../Model/GetWhatsappCampaignsCampaigns.md | 20 + .../docs/Model/GetWhatsappEventReport.md | 10 + .../Model/GetWhatsappEventReportEvents.md | 17 + .../brevo-php/docs/Model/InlineResponse200.md | 11 + .../docs/Model/InlineResponse2001.md | 10 + .../docs/Model/InlineResponse2002.md | 12 + .../brevo-php/docs/Model/InlineResponse201.md | 10 + .../docs/Model/InlineResponse2011.md | 10 + .../docs/Model/InlineResponse2012.md | 10 + .../docs/Model/InlineResponse2013.md | 10 + .../docs/Model/InlineResponse2014.md | 10 + .../docs/Model/InlineResponse2015.md | 10 + .../brevo-php/docs/Model/InviteAdminUser.md | 13 + .../docs/Model/InviteAdminUserPrivileges.md | 11 + .../brevo-php/docs/Model/Inviteuser.md | 12 + .../docs/Model/InviteuserPrivileges.md | 11 + .../getbrevo/brevo-php/docs/Model/ManageIp.md | 10 + .../docs/Model/MasterDetailsResponse.md | 16 + .../Model/MasterDetailsResponseBillingInfo.md | 13 + ...MasterDetailsResponseBillingInfoAddress.md | 14 + .../MasterDetailsResponseBillingInfoName.md | 11 + .../Model/MasterDetailsResponsePlanInfo.md | 15 + .../MasterDetailsResponsePlanInfoFeatures.md | 16 + vendor/getbrevo/brevo-php/docs/Model/Note.md | 16 + .../getbrevo/brevo-php/docs/Model/NoteData.md | 13 + .../getbrevo/brevo-php/docs/Model/NoteId.md | 10 + .../getbrevo/brevo-php/docs/Model/NoteList.md | 9 + vendor/getbrevo/brevo-php/docs/Model/Order.md | 18 + .../brevo-php/docs/Model/OrderBatch.md | 12 + .../brevo-php/docs/Model/OrderBilling.md | 16 + .../brevo-php/docs/Model/OrderProducts.md | 13 + vendor/getbrevo/brevo-php/docs/Model/Otp.md | 10 + .../getbrevo/brevo-php/docs/Model/Pipeline.md | 12 + .../brevo-php/docs/Model/PipelineStage.md | 11 + .../brevo-php/docs/Model/Pipelines.md | 9 + .../brevo-php/docs/Model/PostContactInfo.md | 10 + .../docs/Model/PostContactInfoContacts.md | 13 + .../brevo-php/docs/Model/PostSendFailed.md | 14 + .../docs/Model/PostSendSmsTestFailed.md | 13 + .../docs/Model/PutRevokeUserPermission.md | 10 + .../docs/Model/Putresendcancelinvitation.md | 10 + .../docs/Model/RemainingCreditModel.md | 11 + .../docs/Model/RemainingCreditModelChild.md | 11 + .../Model/RemainingCreditModelReseller.md | 11 + .../docs/Model/RemoveContactFromList.md | 12 + .../brevo-php/docs/Model/RemoveCredits.md | 11 + .../docs/Model/RequestContactExport.md | 12 + ...RequestContactExportCustomContactFilter.md | 15 + .../docs/Model/RequestContactImport.md | 20 + .../Model/RequestContactImportJsonBody.md | 11 + .../docs/Model/RequestContactImportNewList.md | 11 + .../docs/Model/RequestSmsRecipientExport.md | 11 + .../brevo-php/docs/Model/ScheduleSmtpEmail.md | 12 + .../brevo-php/docs/Model/SendReport.md | 11 + .../brevo-php/docs/Model/SendReportEmail.md | 11 + .../getbrevo/brevo-php/docs/Model/SendSms.md | 14 + .../brevo-php/docs/Model/SendSmtpEmail.md | 25 + .../docs/Model/SendSmtpEmailAttachment.md | 12 + .../brevo-php/docs/Model/SendSmtpEmailBcc.md | 11 + .../brevo-php/docs/Model/SendSmtpEmailCc.md | 11 + .../Model/SendSmtpEmailMessageVersions.md | 15 + .../docs/Model/SendSmtpEmailReplyTo.md | 11 + .../docs/Model/SendSmtpEmailReplyTo1.md | 11 + .../docs/Model/SendSmtpEmailSender.md | 12 + .../brevo-php/docs/Model/SendSmtpEmailTo.md | 11 + .../brevo-php/docs/Model/SendSmtpEmailTo1.md | 11 + .../brevo-php/docs/Model/SendTestEmail.md | 10 + .../brevo-php/docs/Model/SendTestSms.md | 10 + .../brevo-php/docs/Model/SendTransacSms.md | 17 + .../docs/Model/SendWhatsappMessage.md | 14 + .../brevo-php/docs/Model/SsoTokenRequest.md | 13 + .../docs/Model/SubAccountAppsToggleRequest.md | 22 + .../docs/Model/SubAccountDetailsResponse.md | 13 + .../SubAccountDetailsResponsePlanInfo.md | 12 + ...ubAccountDetailsResponsePlanInfoCredits.md | 11 + ...untDetailsResponsePlanInfoCreditsEmails.md | 11 + ...bAccountDetailsResponsePlanInfoFeatures.md | 12 + ...untDetailsResponsePlanInfoFeaturesInbox.md | 11 + ...ailsResponsePlanInfoFeaturesLandingPage.md | 11 + ...untDetailsResponsePlanInfoFeaturesUsers.md | 11 + .../docs/Model/SubAccountUpdatePlanRequest.md | 11 + .../SubAccountUpdatePlanRequestCredits.md | 10 + .../SubAccountUpdatePlanRequestFeatures.md | 12 + .../docs/Model/SubAccountsResponse.md | 11 + .../Model/SubAccountsResponseSubAccounts.md | 13 + vendor/getbrevo/brevo-php/docs/Model/Task.md | 15 + .../getbrevo/brevo-php/docs/Model/TaskList.md | 10 + .../brevo-php/docs/Model/TaskReminder.md | 12 + .../brevo-php/docs/Model/TaskTypes.md | 11 + .../brevo-php/docs/Model/UpdateAttribute.md | 11 + .../docs/Model/UpdateAttributeEnumeration.md | 11 + .../docs/Model/UpdateBatchContacts.md | 10 + .../docs/Model/UpdateBatchContactsContacts.md | 19 + .../docs/Model/UpdateBatchContactsModel.md | 11 + .../docs/Model/UpdateCampaignStatus.md | 10 + .../brevo-php/docs/Model/UpdateChild.md | 14 + .../docs/Model/UpdateChildAccountStatus.md | 13 + .../brevo-php/docs/Model/UpdateChildDomain.md | 10 + .../brevo-php/docs/Model/UpdateContact.md | 16 + .../docs/Model/UpdateCouponCollection.md | 10 + .../docs/Model/UpdateEmailCampaign.md | 40 + .../Model/UpdateEmailCampaignRecipients.md | 12 + .../docs/Model/UpdateEmailCampaignSender.md | 12 + .../docs/Model/UpdateExternalFeed.md | 18 + .../brevo-php/docs/Model/UpdateList.md | 11 + .../brevo-php/docs/Model/UpdateSender.md | 12 + .../brevo-php/docs/Model/UpdateSmsCampaign.md | 17 + .../docs/Model/UpdateSmtpTemplate.md | 19 + .../docs/Model/UpdateSmtpTemplateSender.md | 12 + .../brevo-php/docs/Model/UpdateWebhook.md | 16 + .../docs/Model/UpdateWhatsAppCampaign.md | 13 + .../brevo-php/docs/Model/UploadImageModel.md | 10 + .../docs/Model/UploadImageToGallery.md | 11 + .../brevo-php/docs/Model/VariablesItems.md | 12 + .../brevo-php/docs/Model/WhatsappCampStats.md | 14 + .../docs/Model/WhatsappCampTemplate.md | 20 + .../getbrevo/brevo-php/lib/Api/AccountApi.php | 679 ++ .../brevo-php/lib/Api/AttributesApi.php | 1219 +++ vendor/getbrevo/brevo-php/lib/Api/CRMApi.php | 3306 +++++++ .../brevo-php/lib/Api/CompaniesApi.php | 2099 ++++ .../brevo-php/lib/Api/ContactsApi.php | 8507 +++++++++++++++++ .../brevo-php/lib/Api/ConversationsApi.php | 2635 +++++ .../getbrevo/brevo-php/lib/Api/CouponsApi.php | 1593 +++ .../getbrevo/brevo-php/lib/Api/DealsApi.php | 2877 ++++++ .../getbrevo/brevo-php/lib/Api/DomainsApi.php | 1500 +++ .../brevo-php/lib/Api/EcommerceApi.php | 3614 +++++++ .../brevo-php/lib/Api/EmailCampaignsApi.php | 3845 ++++++++ .../getbrevo/brevo-php/lib/Api/EventsApi.php | 361 + .../brevo-php/lib/Api/ExternalFeedsApi.php | 1561 +++ .../getbrevo/brevo-php/lib/Api/FilesApi.php | 1598 ++++ .../getbrevo/brevo-php/lib/Api/FoldersApi.php | 1852 ++++ .../brevo-php/lib/Api/InboundParsingApi.php | 1019 ++ .../getbrevo/brevo-php/lib/Api/ListsApi.php | 2793 ++++++ .../brevo-php/lib/Api/MasterAccountApi.php | 4518 +++++++++ .../getbrevo/brevo-php/lib/Api/NotesApi.php | 1562 +++ .../getbrevo/brevo-php/lib/Api/ProcessApi.php | 705 ++ .../brevo-php/lib/Api/ResellerApi.php | 4765 +++++++++ .../brevo-php/lib/Api/SMSCampaignsApi.php | 2929 ++++++ .../getbrevo/brevo-php/lib/Api/SendersApi.php | 2015 ++++ .../getbrevo/brevo-php/lib/Api/TasksApi.php | 1852 ++++ .../lib/Api/TransactionalEmailsApi.php | 6499 +++++++++++++ .../brevo-php/lib/Api/TransactionalSMSApi.php | 1368 +++ .../lib/Api/TransactionalWhatsAppApi.php | 737 ++ vendor/getbrevo/brevo-php/lib/Api/UserApi.php | 1820 ++++ .../brevo-php/lib/Api/WebhooksApi.php | 1783 ++++ .../lib/Api/WhatsAppCampaignsApi.php | 2658 +++++ .../getbrevo/brevo-php/lib/ApiException.php | 121 + .../getbrevo/brevo-php/lib/Configuration.php | 433 + .../getbrevo/brevo-php/lib/HeaderSelector.php | 110 + .../lib/Model/AbTestCampaignResult.php | 585 ++ .../AbTestCampaignResultClickedLinks.php | 341 + .../Model/AbTestCampaignResultStatistics.php | 473 + .../lib/Model/AbTestVersionClicks.php | 281 + .../lib/Model/AbTestVersionClicksInner.php | 374 + .../lib/Model/AbTestVersionStats.php | 342 + .../brevo-php/lib/Model/AddChildDomain.php | 305 + .../brevo-php/lib/Model/AddContactToList.php | 335 + .../brevo-php/lib/Model/AddCredits.php | 335 + .../lib/Model/AuthenticateDomainModel.php | 341 + .../brevo-php/lib/Model/BlockDomain.php | 308 + vendor/getbrevo/brevo-php/lib/Model/Body.php | 338 + vendor/getbrevo/brevo-php/lib/Model/Body1.php | 338 + .../getbrevo/brevo-php/lib/Model/Body10.php | 461 + .../getbrevo/brevo-php/lib/Model/Body11.php | 308 + .../getbrevo/brevo-php/lib/Model/Body12.php | 401 + .../getbrevo/brevo-php/lib/Model/Body13.php | 308 + .../getbrevo/brevo-php/lib/Model/Body14.php | 395 + vendor/getbrevo/brevo-php/lib/Model/Body2.php | 368 + vendor/getbrevo/brevo-php/lib/Model/Body3.php | 365 + vendor/getbrevo/brevo-php/lib/Model/Body4.php | 395 + vendor/getbrevo/brevo-php/lib/Model/Body5.php | 338 + vendor/getbrevo/brevo-php/lib/Model/Body6.php | 335 + vendor/getbrevo/brevo-php/lib/Model/Body7.php | 395 + vendor/getbrevo/brevo-php/lib/Model/Body8.php | 623 ++ vendor/getbrevo/brevo-php/lib/Model/Body9.php | 575 ++ .../lib/Model/BodyVariablesItems.php | 280 + .../brevo-php/lib/Model/CompaniesList.php | 306 + .../getbrevo/brevo-php/lib/Model/Company.php | 396 + .../brevo-php/lib/Model/CompanyAttributes.php | 281 + .../lib/Model/CompanyAttributesInner.php | 426 + .../brevo-php/lib/Model/ComponentItems.php | 335 + .../getbrevo/brevo-php/lib/Model/Contact.php | 518 + .../lib/Model/ConversationsMessage.php | 617 ++ .../lib/Model/ConversationsMessageFile.php | 434 + .../ConversationsMessageFileImageInfo.php | 384 + .../lib/Model/CreateApiKeyRequest.php | 338 + .../lib/Model/CreateApiKeyResponse.php | 335 + .../brevo-php/lib/Model/CreateAttribute.php | 435 + .../lib/Model/CreateAttributeEnumeration.php | 341 + .../lib/Model/CreateCategoryModel.php | 305 + .../brevo-php/lib/Model/CreateChild.php | 510 + .../brevo-php/lib/Model/CreateContact.php | 515 + .../lib/Model/CreateCouponCollection.php | 341 + .../brevo-php/lib/Model/CreateCoupons.php | 341 + .../brevo-php/lib/Model/CreateDoiContact.php | 467 + .../brevo-php/lib/Model/CreateDomain.php | 308 + .../brevo-php/lib/Model/CreateDomainModel.php | 398 + .../lib/Model/CreateDomainModelDnsRecords.php | 335 + .../CreateDomainModelDnsRecordsDkimRecord.php | 395 + .../lib/Model/CreateEmailCampaign.php | 1291 +++ .../Model/CreateEmailCampaignRecipients.php | 366 + .../lib/Model/CreateEmailCampaignSender.php | 369 + .../lib/Model/CreateExternalFeed.php | 601 ++ .../brevo-php/lib/Model/CreateList.php | 341 + .../brevo-php/lib/Model/CreateModel.php | 308 + .../lib/Model/CreateProductModel.php | 305 + .../brevo-php/lib/Model/CreateReseller.php | 338 + .../brevo-php/lib/Model/CreateSender.php | 371 + .../brevo-php/lib/Model/CreateSenderIps.php | 387 + .../brevo-php/lib/Model/CreateSenderModel.php | 368 + .../brevo-php/lib/Model/CreateSmsCampaign.php | 532 ++ .../lib/Model/CreateSmsCampaignRecipients.php | 338 + .../brevo-php/lib/Model/CreateSmtpEmail.php | 335 + .../lib/Model/CreateSmtpTemplate.php | 584 ++ .../lib/Model/CreateSmtpTemplateSender.php | 366 + .../brevo-php/lib/Model/CreateSubAccount.php | 441 + .../lib/Model/CreateSubAccountResponse.php | 308 + .../lib/Model/CreateUpdateBatchCategory.php | 338 + .../Model/CreateUpdateBatchCategoryModel.php | 335 + .../lib/Model/CreateUpdateBatchProducts.php | 338 + .../Model/CreateUpdateBatchProductsModel.php | 335 + .../lib/Model/CreateUpdateCategories.php | 398 + .../lib/Model/CreateUpdateCategory.php | 428 + .../lib/Model/CreateUpdateContactModel.php | 305 + .../lib/Model/CreateUpdateFolder.php | 305 + .../lib/Model/CreateUpdateProduct.php | 611 ++ .../lib/Model/CreateUpdateProducts.php | 581 ++ .../brevo-php/lib/Model/CreateWebhook.php | 609 ++ .../lib/Model/CreateWhatsAppCampaign.php | 407 + .../CreateWhatsAppCampaignRecipients.php | 366 + .../lib/Model/CreateWhatsAppTemplate.php | 561 ++ .../brevo-php/lib/Model/CreatedBatchId.php | 308 + .../brevo-php/lib/Model/CreatedProcessId.php | 308 + vendor/getbrevo/brevo-php/lib/Model/Deal.php | 396 + .../brevo-php/lib/Model/DealAttributes.php | 281 + .../lib/Model/DealAttributesInner.php | 426 + .../brevo-php/lib/Model/DealsList.php | 306 + .../brevo-php/lib/Model/DeleteHardbounces.php | 365 + .../lib/Model/EmailExportRecipients.php | 382 + .../brevo-php/lib/Model/ErrorModel.php | 401 + vendor/getbrevo/brevo-php/lib/Model/Event.php | 431 + .../brevo-php/lib/Model/EventIdentifiers.php | 426 + .../lib/Model/ExportWebhooksHistory.php | 678 ++ .../getbrevo/brevo-php/lib/Model/FileData.php | 582 ++ .../lib/Model/FileDownloadableLink.php | 308 + .../getbrevo/brevo-php/lib/Model/FileList.php | 281 + .../brevo-php/lib/Model/GetAccount.php | 365 + .../lib/Model/GetAccountActivity.php | 305 + .../lib/Model/GetAccountActivityLogs.php | 440 + .../Model/GetAccountMarketingAutomation.php | 338 + .../brevo-php/lib/Model/GetAccountPlan.php | 532 ++ .../brevo-php/lib/Model/GetAccountRelay.php | 342 + .../lib/Model/GetAccountRelayData.php | 375 + .../lib/Model/GetAggregatedReport.php | 665 ++ .../lib/Model/GetAllExternalFeeds.php | 335 + .../lib/Model/GetAllExternalFeedsFeeds.php | 712 ++ .../brevo-php/lib/Model/GetAttributes.php | 308 + .../lib/Model/GetAttributesAttributes.php | 507 + .../lib/Model/GetAttributesEnumeration.php | 341 + .../brevo-php/lib/Model/GetBlockedDomains.php | 309 + .../lib/Model/GetCampaignOverview.php | 779 ++ .../lib/Model/GetCampaignRecipients.php | 341 + .../brevo-php/lib/Model/GetCampaignStats.php | 788 ++ .../brevo-php/lib/Model/GetCategories.php | 341 + .../lib/Model/GetCategoryDetails.php | 467 + .../Model/GetChildAccountCreationStatus.php | 308 + .../brevo-php/lib/Model/GetChildDomain.php | 335 + .../brevo-php/lib/Model/GetChildDomains.php | 280 + .../brevo-php/lib/Model/GetChildInfo.php | 422 + .../lib/Model/GetChildInfoApiKeys.php | 339 + .../lib/Model/GetChildInfoApiKeysV2.php | 341 + .../lib/Model/GetChildInfoApiKeysV3.php | 341 + .../lib/Model/GetChildInfoCredits.php | 336 + .../lib/Model/GetChildInfoStatistics.php | 366 + .../brevo-php/lib/Model/GetChildrenList.php | 335 + .../brevo-php/lib/Model/GetClient.php | 407 + .../lib/Model/GetContactCampaignStats.php | 546 ++ .../Model/GetContactCampaignStatsClicked.php | 341 + .../Model/GetContactCampaignStatsOpened.php | 407 + ...tContactCampaignStatsTransacAttributes.php | 374 + ...GetContactCampaignStatsUnsubscriptions.php | 341 + .../brevo-php/lib/Model/GetContactDetails.php | 569 ++ .../brevo-php/lib/Model/GetContacts.php | 341 + .../Model/GetCorporateInvitedUsersList.php | 305 + ...CorporateInvitedUsersListFeatureAccess.php | 396 + .../GetCorporateInvitedUsersListGroups.php | 336 + .../GetCorporateInvitedUsersListUsers.php | 440 + .../lib/Model/GetCouponCollection.php | 473 + .../lib/Model/GetDeviceBrowserStats.php | 407 + .../lib/Model/GetDomainConfigurationModel.php | 407 + .../brevo-php/lib/Model/GetDomainsList.php | 305 + .../lib/Model/GetDomainsListDomains.php | 437 + .../brevo-php/lib/Model/GetEmailCampaign.php | 1320 +++ .../brevo-php/lib/Model/GetEmailCampaigns.php | 335 + .../lib/Model/GetEmailEventReport.php | 305 + .../lib/Model/GetEmailEventReportEvents.php | 673 ++ .../lib/Model/GetExtendedCampaignOverview.php | 1254 +++ .../GetExtendedCampaignOverviewSender.php | 365 + .../lib/Model/GetExtendedCampaignStats.php | 539 ++ .../GetExtendedCampaignStatsGlobalStats.php | 281 + .../brevo-php/lib/Model/GetExtendedClient.php | 302 + .../lib/Model/GetExtendedClientAddress.php | 408 + .../lib/Model/GetExtendedContactDetails.php | 603 ++ .../GetExtendedContactDetailsStatistics.php | 546 ++ ...xtendedContactDetailsStatisticsClicked.php | 341 + ...endedContactDetailsStatisticsDelivered.php | 337 + ...tExtendedContactDetailsStatisticsLinks.php | 407 + ...edContactDetailsStatisticsMessagesSent.php | 341 + ...ExtendedContactDetailsStatisticsOpened.php | 407 + ...ontactDetailsStatisticsUnsubscriptions.php | 342 + ...ticsUnsubscriptionsAdminUnsubscription.php | 338 + ...sticsUnsubscriptionsUserUnsubscription.php | 371 + .../brevo-php/lib/Model/GetExtendedList.php | 395 + .../Model/GetExtendedListCampaignStats.php | 341 + .../lib/Model/GetExternalFeedByUUID.php | 712 ++ .../Model/GetExternalFeedByUUIDHeaders.php | 335 + .../brevo-php/lib/Model/GetFolder.php | 440 + .../brevo-php/lib/Model/GetFolderLists.php | 335 + .../brevo-php/lib/Model/GetFolders.php | 335 + .../lib/Model/GetInboundEmailEvents.php | 305 + .../lib/Model/GetInboundEmailEventsByUuid.php | 515 + ...GetInboundEmailEventsByUuidAttachments.php | 395 + .../Model/GetInboundEmailEventsByUuidLogs.php | 371 + .../lib/Model/GetInboundEmailEventsEvents.php | 407 + .../lib/Model/GetInvitedUsersList.php | 305 + .../GetInvitedUsersListFeatureAccess.php | 366 + .../lib/Model/GetInvitedUsersListUsers.php | 407 + vendor/getbrevo/brevo-php/lib/Model/GetIp.php | 407 + .../brevo-php/lib/Model/GetIpFromSender.php | 407 + .../getbrevo/brevo-php/lib/Model/GetIps.php | 308 + .../brevo-php/lib/Model/GetIpsFromSender.php | 308 + .../getbrevo/brevo-php/lib/Model/GetList.php | 440 + .../getbrevo/brevo-php/lib/Model/GetLists.php | 335 + .../brevo-php/lib/Model/GetOrders.php | 335 + .../brevo-php/lib/Model/GetProcess.php | 438 + .../brevo-php/lib/Model/GetProcesses.php | 335 + .../brevo-php/lib/Model/GetProductDetails.php | 743 ++ .../brevo-php/lib/Model/GetProducts.php | 341 + .../brevo-php/lib/Model/GetReports.php | 305 + .../brevo-php/lib/Model/GetReportsReports.php | 704 ++ .../lib/Model/GetScheduledEmailByBatchId.php | 335 + .../GetScheduledEmailByBatchIdBatches.php | 410 + .../Model/GetScheduledEmailByMessageId.php | 410 + .../brevo-php/lib/Model/GetSegments.php | 335 + .../lib/Model/GetSegmentsSegments.php | 395 + .../brevo-php/lib/Model/GetSendersList.php | 305 + .../brevo-php/lib/Model/GetSendersListIps.php | 374 + .../lib/Model/GetSendersListSenders.php | 437 + .../lib/Model/GetSharedTemplateUrl.php | 308 + .../brevo-php/lib/Model/GetSmsCampaign.php | 642 ++ .../lib/Model/GetSmsCampaignOverview.php | 576 ++ .../lib/Model/GetSmsCampaignRecipients.php | 280 + .../lib/Model/GetSmsCampaignStats.php | 506 + .../brevo-php/lib/Model/GetSmsCampaigns.php | 335 + .../brevo-php/lib/Model/GetSmsEventReport.php | 305 + .../lib/Model/GetSmsEventReportEvents.php | 533 ++ .../lib/Model/GetSmtpTemplateOverview.php | 701 ++ .../Model/GetSmtpTemplateOverviewSender.php | 365 + .../brevo-php/lib/Model/GetSmtpTemplates.php | 335 + .../brevo-php/lib/Model/GetSsoToken.php | 308 + .../brevo-php/lib/Model/GetStatsByBrowser.php | 280 + .../brevo-php/lib/Model/GetStatsByDevice.php | 395 + .../brevo-php/lib/Model/GetStatsByDomain.php | 280 + .../Model/GetTransacAggregatedSmsReport.php | 575 ++ .../lib/Model/GetTransacBlockedContacts.php | 335 + .../GetTransacBlockedContactsContacts.php | 407 + .../Model/GetTransacBlockedContactsReason.php | 376 + .../lib/Model/GetTransacEmailContent.php | 503 + .../Model/GetTransacEmailContentEvents.php | 341 + .../lib/Model/GetTransacEmailsList.php | 335 + ...etTransacEmailsListTransactionalEmails.php | 530 + .../lib/Model/GetTransacSmsReport.php | 305 + .../lib/Model/GetTransacSmsReportReports.php | 575 ++ .../brevo-php/lib/Model/GetUserPermission.php | 375 + .../lib/Model/GetUserPermissionPrivileges.php | 341 + .../brevo-php/lib/Model/GetWATemplates.php | 341 + .../lib/Model/GetWATemplatesTemplates.php | 536 ++ .../brevo-php/lib/Model/GetWebhook.php | 628 ++ .../brevo-php/lib/Model/GetWebhookAuth.php | 336 + .../brevo-php/lib/Model/GetWebhookHeaders.php | 335 + .../brevo-php/lib/Model/GetWebhooks.php | 308 + .../brevo-php/lib/Model/GetWhatsAppConfig.php | 523 + .../lib/Model/GetWhatsappCampaignOverview.php | 610 ++ .../lib/Model/GetWhatsappCampaigns.php | 335 + .../Model/GetWhatsappCampaignsCampaigns.php | 670 ++ .../lib/Model/GetWhatsappEventReport.php | 305 + .../Model/GetWhatsappEventReportEvents.php | 572 ++ .../brevo-php/lib/Model/InlineResponse200.php | 335 + .../lib/Model/InlineResponse2001.php | 309 + .../lib/Model/InlineResponse2002.php | 374 + .../brevo-php/lib/Model/InlineResponse201.php | 305 + .../lib/Model/InlineResponse2011.php | 309 + .../lib/Model/InlineResponse2012.php | 309 + .../lib/Model/InlineResponse2013.php | 308 + .../lib/Model/InlineResponse2014.php | 308 + .../lib/Model/InlineResponse2015.php | 308 + .../brevo-php/lib/Model/InviteAdminUser.php | 404 + .../lib/Model/InviteAdminUserPrivileges.php | 396 + .../brevo-php/lib/Model/Inviteuser.php | 374 + .../lib/Model/InviteuserPrivileges.php | 468 + .../getbrevo/brevo-php/lib/Model/ManageIp.php | 305 + .../lib/Model/MasterDetailsResponse.php | 485 + .../MasterDetailsResponseBillingInfo.php | 396 + ...asterDetailsResponseBillingInfoAddress.php | 426 + .../MasterDetailsResponseBillingInfoName.php | 336 + .../Model/MasterDetailsResponsePlanInfo.php | 488 + .../MasterDetailsResponsePlanInfoFeatures.php | 485 + .../brevo-php/lib/Model/ModelInterface.php | 96 + vendor/getbrevo/brevo-php/lib/Model/Note.php | 504 + .../getbrevo/brevo-php/lib/Model/NoteData.php | 414 + .../getbrevo/brevo-php/lib/Model/NoteId.php | 306 + .../getbrevo/brevo-php/lib/Model/NoteList.php | 281 + vendor/getbrevo/brevo-php/lib/Model/Order.php | 563 ++ .../brevo-php/lib/Model/OrderBatch.php | 368 + .../brevo-php/lib/Model/OrderBilling.php | 486 + .../brevo-php/lib/Model/OrderProducts.php | 405 + vendor/getbrevo/brevo-php/lib/Model/Otp.php | 305 + .../getbrevo/brevo-php/lib/Model/Pipeline.php | 366 + .../brevo-php/lib/Model/PipelineStage.php | 336 + .../brevo-php/lib/Model/Pipelines.php | 281 + .../brevo-php/lib/Model/PostContactInfo.php | 308 + .../lib/Model/PostContactInfoContacts.php | 395 + .../brevo-php/lib/Model/PostSendFailed.php | 431 + .../lib/Model/PostSendSmsTestFailed.php | 401 + .../lib/Model/PutRevokeUserPermission.php | 309 + .../lib/Model/Putresendcancelinvitation.php | 309 + .../lib/Model/RemainingCreditModel.php | 341 + .../lib/Model/RemainingCreditModelChild.php | 342 + .../Model/RemainingCreditModelReseller.php | 341 + .../lib/Model/RemoveContactFromList.php | 365 + .../brevo-php/lib/Model/RemoveCredits.php | 335 + .../lib/Model/RequestContactExport.php | 368 + ...equestContactExportCustomContactFilter.php | 568 ++ .../lib/Model/RequestContactImport.php | 605 ++ .../Model/RequestContactImportJsonBody.php | 335 + .../lib/Model/RequestContactImportNewList.php | 336 + .../lib/Model/RequestSmsRecipientExport.php | 378 + .../brevo-php/lib/Model/ScheduleSmtpEmail.php | 365 + .../brevo-php/lib/Model/SendReport.php | 378 + .../brevo-php/lib/Model/SendReportEmail.php | 342 + .../getbrevo/brevo-php/lib/Model/SendSms.php | 431 + .../brevo-php/lib/Model/SendSmtpEmail.php | 755 ++ .../lib/Model/SendSmtpEmailAttachment.php | 374 + .../brevo-php/lib/Model/SendSmtpEmailBcc.php | 338 + .../brevo-php/lib/Model/SendSmtpEmailCc.php | 338 + .../Model/SendSmtpEmailMessageVersions.php | 458 + .../lib/Model/SendSmtpEmailReplyTo.php | 339 + .../lib/Model/SendSmtpEmailReplyTo1.php | 339 + .../lib/Model/SendSmtpEmailSender.php | 366 + .../brevo-php/lib/Model/SendSmtpEmailTo.php | 338 + .../brevo-php/lib/Model/SendSmtpEmailTo1.php | 338 + .../brevo-php/lib/Model/SendTestEmail.php | 305 + .../brevo-php/lib/Model/SendTestSms.php | 305 + .../brevo-php/lib/Model/SendTransacSms.php | 564 ++ .../lib/Model/SendWhatsappMessage.php | 431 + .../brevo-php/lib/Model/SsoTokenRequest.php | 442 + .../lib/Model/SubAccountAppsToggleRequest.php | 666 ++ .../lib/Model/SubAccountDetailsResponse.php | 395 + .../SubAccountDetailsResponsePlanInfo.php | 366 + ...bAccountDetailsResponsePlanInfoCredits.php | 336 + ...ntDetailsResponsePlanInfoCreditsEmails.php | 336 + ...AccountDetailsResponsePlanInfoFeatures.php | 366 + ...ntDetailsResponsePlanInfoFeaturesInbox.php | 336 + ...ilsResponsePlanInfoFeaturesLandingPage.php | 336 + ...ntDetailsResponsePlanInfoFeaturesUsers.php | 336 + .../lib/Model/SubAccountUpdatePlanRequest.php | 336 + .../SubAccountUpdatePlanRequestCredits.php | 306 + .../SubAccountUpdatePlanRequestFeatures.php | 366 + .../lib/Model/SubAccountsResponse.php | 335 + .../Model/SubAccountsResponseSubAccounts.php | 407 + vendor/getbrevo/brevo-php/lib/Model/Task.php | 462 + .../getbrevo/brevo-php/lib/Model/TaskList.php | 306 + .../brevo-php/lib/Model/TaskReminder.php | 411 + .../brevo-php/lib/Model/TaskTypes.php | 336 + .../brevo-php/lib/Model/UpdateAttribute.php | 335 + .../lib/Model/UpdateAttributeEnumeration.php | 341 + .../lib/Model/UpdateBatchContacts.php | 305 + .../lib/Model/UpdateBatchContactsContacts.php | 575 ++ .../lib/Model/UpdateBatchContactsModel.php | 335 + .../lib/Model/UpdateCampaignStatus.php | 350 + .../brevo-php/lib/Model/UpdateChild.php | 425 + .../lib/Model/UpdateChildAccountStatus.php | 395 + .../brevo-php/lib/Model/UpdateChildDomain.php | 305 + .../brevo-php/lib/Model/UpdateContact.php | 485 + .../lib/Model/UpdateCouponCollection.php | 308 + .../lib/Model/UpdateEmailCampaign.php | 1285 +++ .../Model/UpdateEmailCampaignRecipients.php | 366 + .../lib/Model/UpdateEmailCampaignSender.php | 366 + .../lib/Model/UpdateExternalFeed.php | 595 ++ .../brevo-php/lib/Model/UpdateList.php | 335 + .../brevo-php/lib/Model/UpdateSender.php | 365 + .../brevo-php/lib/Model/UpdateSmsCampaign.php | 523 + .../lib/Model/UpdateSmtpTemplate.php | 575 ++ .../lib/Model/UpdateSmtpTemplateSender.php | 366 + .../brevo-php/lib/Model/UpdateWebhook.php | 539 ++ .../lib/Model/UpdateWhatsAppCampaign.php | 427 + .../brevo-php/lib/Model/UploadImageModel.php | 308 + .../lib/Model/UploadImageToGallery.php | 338 + .../brevo-php/lib/Model/VariablesItems.php | 365 + .../brevo-php/lib/Model/WhatsappCampStats.php | 440 + .../lib/Model/WhatsappCampTemplate.php | 605 ++ .../brevo-php/lib/ObjectSerializer.php | 322 + vendor/getbrevo/brevo-php/phpunit.xml.dist | 21 + .../brevo-php/test/Api/AccountApiTest.php | 93 + .../brevo-php/test/Api/AttributesApiTest.php | 113 + .../brevo-php/test/Api/CRMApiTest.php | 183 + .../brevo-php/test/Api/CompaniesApiTest.php | 143 + .../brevo-php/test/Api/ContactsApiTest.php | 363 + .../test/Api/ConversationsApiTest.php | 163 + .../brevo-php/test/Api/CouponsApiTest.php | 123 + .../brevo-php/test/Api/DealsApiTest.php | 173 + .../brevo-php/test/Api/DomainsApiTest.php | 123 + .../brevo-php/test/Api/EcommerceApiTest.php | 193 + .../test/Api/EmailCampaignsApiTest.php | 203 + .../brevo-php/test/Api/EventsApiTest.php | 83 + .../test/Api/ExternalFeedsApiTest.php | 123 + .../brevo-php/test/Api/FilesApiTest.php | 123 + .../brevo-php/test/Api/FoldersApiTest.php | 133 + .../test/Api/InboundParsingApiTest.php | 103 + .../brevo-php/test/Api/ListsApiTest.php | 163 + .../test/Api/MasterAccountApiTest.php | 233 + .../brevo-php/test/Api/NotesApiTest.php | 123 + .../brevo-php/test/Api/ProcessApiTest.php | 93 + .../brevo-php/test/Api/ResellerApiTest.php | 233 + .../test/Api/SMSCampaignsApiTest.php | 173 + .../brevo-php/test/Api/SendersApiTest.php | 143 + .../brevo-php/test/Api/TasksApiTest.php | 133 + .../test/Api/TransactionalEmailsApiTest.php | 293 + .../test/Api/TransactionalSMSApiTest.php | 113 + .../test/Api/TransactionalWhatsAppApiTest.php | 93 + .../brevo-php/test/Api/UserApiTest.php | 133 + .../brevo-php/test/Api/WebhooksApiTest.php | 133 + .../test/Api/WhatsAppCampaignsApiTest.php | 164 + .../AbTestCampaignResultClickedLinksTest.php | 92 + .../AbTestCampaignResultStatisticsTest.php | 120 + .../test/Model/AbTestCampaignResultTest.php | 134 + .../Model/AbTestVersionClicksInnerTest.php | 99 + .../test/Model/AbTestVersionClicksTest.php | 78 + .../test/Model/AbTestVersionStatsTest.php | 92 + .../test/Model/AddChildDomainTest.php | 85 + .../test/Model/AddContactToListTest.php | 92 + .../brevo-php/test/Model/AddCreditsTest.php | 92 + .../Model/AuthenticateDomainModelTest.php | 92 + .../brevo-php/test/Model/BlockDomainTest.php | 85 + .../brevo-php/test/Model/Body10Test.php | 120 + .../brevo-php/test/Model/Body11Test.php | 85 + .../brevo-php/test/Model/Body12Test.php | 106 + .../brevo-php/test/Model/Body13Test.php | 85 + .../brevo-php/test/Model/Body14Test.php | 106 + .../brevo-php/test/Model/Body1Test.php | 92 + .../brevo-php/test/Model/Body2Test.php | 99 + .../brevo-php/test/Model/Body3Test.php | 99 + .../brevo-php/test/Model/Body4test.php | 106 + .../brevo-php/test/Model/Body5Test.php | 92 + .../brevo-php/test/Model/Body6Test.php | 92 + .../brevo-php/test/Model/Body7Test.php | 106 + .../brevo-php/test/Model/Body8Test.php | 155 + .../brevo-php/test/Model/Body9Test.php | 148 + .../brevo-php/test/Model/BodyTest.php | 92 + .../test/Model/BodyVariablesItemsTest.php | 78 + .../test/Model/CompaniesListTest.php | 85 + .../test/Model/CompanyAttributesInnerTest.php | 113 + .../test/Model/CompanyAttributesTest.php | 78 + .../brevo-php/test/Model/CompanyTest.php | 106 + .../test/Model/ComponentItemsTest.php | 92 + .../brevo-php/test/Model/ContactTest.php | 134 + .../ConversationsMessageFIleImageInfoTest.php | 99 + .../Model/ConversationsMessageFileTest.php | 113 + .../test/Model/ConversationsMessageTest.php | 148 + .../test/Model/CreateApiKeyRequestTest.php | 92 + .../test/Model/CreateApiKeyResponseTest.php | 92 + .../Model/CreateAttributeEnumerationTest.php | 92 + .../test/Model/CreateAttributeTest.php | 106 + .../test/Model/CreateCategoryModelTest.php | 85 + .../brevo-php/test/Model/CreateChildTest.php | 120 + .../test/Model/CreateContactTest.php | 134 + .../test/Model/CreateCouponCollectionTest.php | 92 + .../test/Model/CreateCouponsTest.php | 92 + .../test/Model/CreateDoiContactTest.php | 120 + ...ateDomainModelDnsRecordsDkimRecordTest.php | 106 + .../Model/CreateDomainModelDnsRecordsTest.php | 92 + .../test/Model/CreateDomainModelTest.php | 106 + .../brevo-php/test/Model/CreateDomainTest.php | 85 + .../CreateEmailCampaignRecipientsTest.php | 99 + .../Model/CreateEmailCampaignSenderTest.php | 99 + .../test/Model/CreateEmailCampaignTest.php | 295 + .../test/Model/CreateExternalFeedTest.php | 141 + .../brevo-php/test/Model/CreateListTest.php | 92 + .../brevo-php/test/Model/CreateModelTest.php | 85 + .../test/Model/CreateProductModelTest.php | 85 + .../test/Model/CreateResellerTest.php | 92 + .../test/Model/CreateSenderIpsTest.php | 99 + .../test/Model/CreateSenderModelTest.php | 99 + .../brevo-php/test/Model/CreateSenderTest.php | 99 + .../Model/CreateSmsCampaignRecipientsTest.php | 92 + .../test/Model/CreateSmsCampaignTest.php | 134 + .../test/Model/CreateSmtpEmailTest.php | 92 + .../Model/CreateSmtpTemplateSenderTest.php | 99 + .../test/Model/CreateSmtpTemplateTest.php | 148 + .../Model/CreateSubAccountResponseTest.php | 85 + .../test/Model/CreateSubAccountTest.php | 106 + .../CreateUpdateBatchCategoryModelTest.php | 92 + .../Model/CreateUpdateBatchCategoryTest.php | 92 + .../CreateUpdateBatchProductsModelTest.php | 92 + .../Model/CreateUpdateBatchProductsTest.php | 92 + .../test/Model/CreateUpdateCategoriesTest.php | 106 + .../test/Model/CreateUpdateCategoryTest.php | 113 + .../Model/CreateUpdateContactModelTest.php | 85 + .../test/Model/CreateUpdateFolderTest.php | 85 + .../test/Model/CreateUpdateProductsTest.php | 148 + .../test/Model/CreateUpdateproductTest.php | 155 + .../test/Model/CreateWebhookTest.php | 134 + .../CreateWhatsAppCampaignRecipientsTest.php | 99 + .../test/Model/CreateWhatsAppCampaignTest.php | 106 + .../test/Model/CreateWhatsAppTemplateTest.php | 127 + .../test/Model/CreatedBatchIdTest.php | 85 + .../test/Model/CreatedProcessIdTest.php | 85 + .../test/Model/DealAttributesInnerTest.php | 113 + .../test/Model/DealAttributesTest.php | 78 + .../brevo-php/test/Model/DealTest.php | 106 + .../brevo-php/test/Model/DealsListTest.php | 85 + .../test/Model/DeleteHardbouncesTest.php | 99 + .../test/Model/EmailExportRecipientsTest.php | 92 + .../brevo-php/test/Model/ErrorModelTest.php | 92 + .../test/Model/EventIdentifiersTest.php | 113 + .../brevo-php/test/Model/EventTest.php | 113 + .../test/Model/ExportWebhooksHistoryTest.php | 148 + .../brevo-php/test/Model/FIleListTest.php | 78 + .../brevo-php/test/Model/FileDataTest.php | 148 + .../test/Model/FileDownloadableLinkTest.php | 85 + .../test/Model/GetAccountActivityLogsTest.php | 113 + .../test/Model/GetAccountActivityTest.php | 85 + .../GetAccountMarketingAutomationTest.php | 92 + .../test/Model/GetAccountPlanTest.php | 120 + .../test/Model/GetAccountRelayDataTest.php | 99 + .../test/Model/GetAccountRelayTest.php | 92 + .../brevo-php/test/Model/GetAccountTest.php | 99 + .../test/Model/GetAggregatedReportTest.php | 169 + .../Model/GetAllExternalFeedsFeedsTest.php | 162 + .../test/Model/GetAllExternalFeedsTest.php | 92 + .../Model/GetAttributesAttributesTest.php | 113 + .../Model/GetAttributesEnumerationTest.php | 92 + .../test/Model/GetAttributesTest.php | 85 + .../test/Model/GetBlockedDomainsTest.php | 85 + .../test/Model/GetCampaignOverviewTest.php | 176 + .../test/Model/GetCampaignRecipientsTest.php | 92 + .../test/Model/GetCampaignStatsTest.php | 190 + .../test/Model/GetCategoriesTest.php | 92 + .../test/Model/GetCategoryDetailsTest.php | 120 + .../GetChildAccountCreationStatusTest.php | 85 + .../test/Model/GetChildDomainTest.php | 92 + .../test/Model/GetChildDomainsTest.php | 78 + .../test/Model/GetChildInfoApiKeysTest.php | 92 + .../test/Model/GetChildInfoApiKeysV2Test.php | 92 + .../test/Model/GetChildInfoApiKeysV3Test.php | 92 + .../test/Model/GetChildInfoCreditsTest.php | 92 + .../test/Model/GetChildInfoStatisticsTest.php | 99 + .../brevo-php/test/Model/GetChildInfoTest.php | 113 + .../test/Model/GetChildrenListTest.php | 92 + .../brevo-php/test/Model/GetClientTest.php | 106 + .../GetContactCampaignStatsClickedTest.php | 92 + .../GetContactCampaignStatsOpenedTest.php | 106 + .../Model/GetContactCampaignStatsTest.php | 141 + ...tactCampaignStatsTransacAttributesTest.php | 99 + ...ontactCampaignStatsUnsubscriptionsTest.php | 92 + .../test/Model/GetContactDetailsTest.php | 141 + .../brevo-php/test/Model/GetContactsTest.php | 92 + ...orateInvitedUsersListFeatureAccessTest.php | 106 + ...GetCorporateInvitedUsersListGroupsTest.php | 92 + .../GetCorporateInvitedUsersListTest.php | 85 + .../GetCorporateInvitedUsersListUsersTest.php | 113 + .../test/Model/GetCouponCollectionTest.php | 120 + .../test/Model/GetDeviceBrowserStatsTest.php | 106 + .../Model/GetDomainConfigurationModelTest.php | 106 + .../test/Model/GetDomainsListDomainsTest.php | 113 + .../test/Model/GetDomainsListTest.php | 85 + .../test/Model/GetEmailCampaignTest.php | 92 + .../test/Model/GetEmailCampaignsTest.php | 92 + .../Model/GetEmailEventReportEventsTest.php | 155 + .../test/Model/GetEmailEventReportTest.php | 85 + .../GetExtendedCampaignOverviewSenderTest.php | 99 + .../Model/GetExtendedCampaignOverviewTest.php | 190 + ...etExtendedCampaignStatsGlobalStatsTest.php | 78 + .../Model/GetExtendedCampaignStatsTest.php | 134 + .../Model/GetExtendedClientAddressTest.php | 106 + .../test/Model/GetExtendedClientTest.php | 85 + ...dedContactDetailsStatisticsClickedTest.php | 92 + ...dContactDetailsStatisticsDeliveredTest.php | 92 + ...endedContactDetailsStatisticsLinksTest.php | 106 + ...ntactDetailsStatisticsMessagesSentTest.php | 92 + ...ndedContactDetailsStatisticsOpenedTest.php | 106 + ...etExtendedContactDetailsStatisticsTest.php | 141 + ...UnsubscriptionsAdminUnsubscriptionTest.php | 92 + ...ctDetailsStatisticsUnsubscriptionsTest.php | 92 + ...sUnsubscriptionsUserUnsubscriptionTest.php | 99 + .../Model/GetExtendedContactDetailsTest.php | 85 + .../GetExtendedListCampaignStatsTest.php | 92 + .../test/Model/GetExtendedListTest.php | 106 + .../GetExternalFeedByUUIDHeadersTest.php | 92 + .../test/Model/GetExternalFeedByUUIDTest.php | 162 + .../test/Model/GetFolderListsTest.php | 92 + .../brevo-php/test/Model/GetFolderTest.php | 113 + .../brevo-php/test/Model/GetFoldersTest.php | 92 + ...nboundEmailEventsByUuidAttachmentsTest.php | 106 + .../GetInboundEmailEventsByUuidLogsTest.php | 92 + .../Model/GetInboundEmailEventsByUuidTest.php | 134 + .../Model/GetInboundEmailEventsEventsTest.php | 106 + .../test/Model/GetInboundEmailEventsTest.php | 85 + .../GetInvitedUsersListFeatureAccessTest.php | 99 + .../test/Model/GetInvitedUsersListTest.php | 85 + .../Model/GetInvitedUsersListUsersTest.php | 106 + .../test/Model/GetIpFromSenderTest.php | 106 + .../brevo-php/test/Model/GetIpTest.php | 106 + .../test/Model/GetIpsFromSenderTest.php | 85 + .../brevo-php/test/Model/GetIpsTest.php | 85 + .../brevo-php/test/Model/GetListTest.php | 113 + .../brevo-php/test/Model/GetListsTest.php | 92 + .../brevo-php/test/Model/GetOrdersTest.php | 92 + .../brevo-php/test/Model/GetProcessTest.php | 106 + .../brevo-php/test/Model/GetProcessesTest.php | 92 + .../test/Model/GetProductDetailsTest.php | 183 + .../brevo-php/test/Model/GetProductsTest.php | 92 + .../test/Model/GetReportsReportsTest.php | 169 + .../brevo-php/test/Model/GetReportsTest.php | 85 + .../GetScheduledEmailByBatchIdBatchesTest.php | 99 + .../Model/GetScheduledEmailByBatchIdTest.php | 93 + .../GetScheduledEmailByMessageIdTest.php | 100 + .../test/Model/GetSegmentsSegmentsTest.php | 106 + .../brevo-php/test/Model/GetSegmentsTest.php | 92 + .../test/Model/GetSendersListIpsTest.php | 99 + .../test/Model/GetSendersListSendersTest.php | 113 + .../test/Model/GetSendersListTest.php | 85 + .../test/Model/GetSharedTemplateUrlTest.php | 85 + .../test/Model/GetSmsCampaignOverviewTest.php | 134 + .../Model/GetSmsCampaignRecipientsTest.php | 78 + .../test/Model/GetSmsCampaignStatsTest.php | 127 + .../test/Model/GetSmsCampaignTest.php | 92 + .../test/Model/GetSmsCampaignsTest.php | 92 + .../Model/GetSmsEventReportEventsTest.php | 127 + .../test/Model/GetSmsEventReportTest.php | 85 + .../GetSmtpTemplateOverviewSenderTest.php | 99 + .../Model/GetSmtpTemplateOverviewTest.php | 169 + .../test/Model/GetSmtpTemplatesTest.php | 92 + .../brevo-php/test/Model/GetSsoTokenTest.php | 85 + .../test/Model/GetStatsByBrowserTest.php | 78 + .../test/Model/GetStatsByDeviceTest.php | 106 + .../test/Model/GetStatsByDomainTest.php | 78 + .../GetTransacAggregatedSmsReportTest.php | 148 + .../GetTransacBlockedContactsContactsTest.php | 106 + .../GetTransacBlockedContactsReasonTest.php | 92 + .../Model/GetTransacBlockedContactsTest.php | 92 + .../GetTransacEmailContentEventsTest.php | 92 + .../test/Model/GetTransacEmailContentTest.php | 127 + .../test/Model/GetTransacEmailsListTest.php | 92 + ...ansacEmailsListTransactionalEmailsTest.php | 134 + .../Model/GetTransacSmsReportReportsTest.php | 148 + .../test/Model/GetTransacSmsReportTest.php | 85 + .../Model/GetUserPermissionPrivilegesTest.php | 92 + .../test/Model/GetUserPermissionTest.php | 99 + .../Model/GetWATemplatesTemplatesTest.php | 134 + .../test/Model/GetWATemplatesTest.php | 92 + .../test/Model/GetWebhookAuthTest.php | 92 + .../test/Model/GetWebhookHeadersTest.php | 92 + .../brevo-php/test/Model/GetWebhookTest.php | 148 + .../brevo-php/test/Model/GetWebhooksTest.php | 85 + .../test/Model/GetWhatsAppConfigTest.php | 120 + .../Model/GetWhatsappCampaignOverviewTest.php | 141 + .../GetWhatsappCampaignsCampaignsTest.php | 155 + .../test/Model/GetWhatsappCampaignsTest.php | 92 + .../GetWhatsappEventReportEventsTest.php | 134 + .../test/Model/GetWhatsappEventReportTest.php | 85 + .../test/Model/InlineResponse2001Test.php | 85 + .../test/Model/InlineResponse2002Test.php | 99 + .../test/Model/InlineResponse200Test.php | 92 + .../test/Model/InlineResponse2011Test.php | 85 + .../test/Model/InlineResponse2012Test.php | 85 + .../test/Model/InlineResponse2013Test.php | 85 + .../test/Model/InlineResponse2014Test.php | 85 + .../test/Model/InlineResponse2015Test.php | 85 + .../test/Model/InlineResponse201Test.php | 85 + .../Model/InviteAdminUserPrivilegesTest.php | 92 + .../test/Model/InviteAdminUserTest.php | 106 + .../test/Model/InviteuserPrivilegesTest.php | 92 + .../brevo-php/test/Model/InviteuserTest.php | 99 + .../brevo-php/test/Model/ManageIpTest.php | 85 + ...rDetailsResponseBillingInfoAddressTest.php | 113 + ...sterDetailsResponseBillingInfoNameTest.php | 92 + .../MasterDetailsResponseBillingInfoTest.php | 106 + ...terDetailsResponsePlanInfoFeaturesTest.php | 127 + .../MasterDetailsResponsePlanInfoTest.php | 120 + .../test/Model/MasterDetailsResponseTest.php | 127 + .../brevo-php/test/Model/NoteDataTest.php | 106 + .../brevo-php/test/Model/NoteIdTest.php | 85 + .../brevo-php/test/Model/NoteListTest.php | 78 + .../brevo-php/test/Model/NoteTest.php | 127 + .../brevo-php/test/Model/OrderBatchTest.php | 99 + .../brevo-php/test/Model/OrderBillingTest.php | 127 + .../test/Model/OrderProductsTest.php | 106 + .../brevo-php/test/Model/OrderTest.php | 141 + .../getbrevo/brevo-php/test/Model/OtpTest.php | 85 + .../test/Model/PipelineStageTest.php | 92 + .../brevo-php/test/Model/PipelineTest.php | 99 + .../brevo-php/test/Model/PipelinesTest.php | 78 + .../Model/PostContactInfoContactsTest.php | 106 + .../test/Model/PostContactInfoTest.php | 85 + .../test/Model/PostSendFailedTest.php | 113 + .../test/Model/PostSendSmsTestFailedTest.php | 106 + .../Model/PutRevokeUserPermissionTest.php | 85 + .../Model/PutresendcancelinvitationTest.php | 85 + .../Model/RemainingCreditModelChildTest.php | 92 + .../RemainingCreditModelResellerTest.php | 92 + .../test/Model/RemainingCreditModelTest.php | 92 + .../test/Model/RemoveContactFromListTest.php | 99 + .../test/Model/RemoveCreditsTest.php | 92 + ...stContactExportCustomContactFilterTest.php | 120 + .../test/Model/RequestContactExportTest.php | 99 + .../RequestContactImportJsonBodyTest.php | 92 + .../Model/RequestContactImportNewListTest.php | 92 + .../test/Model/RequestContactImportTest.php | 155 + .../Model/RequestSmsRecipientExportTest.php | 92 + .../test/Model/ScheduleSmtpEmailTest.php | 99 + .../test/Model/SendReportEmailTest.php | 92 + .../brevo-php/test/Model/SendReportTest.php | 92 + .../brevo-php/test/Model/SendSmsTest.php | 113 + .../Model/SendSmtpEmailAttachmentTest.php | 99 + .../test/Model/SendSmtpEmailBccTest.php | 92 + .../test/Model/SendSmtpEmailCcTest.php | 92 + .../SendSmtpEmailMessageVersionsTest.php | 120 + .../test/Model/SendSmtpEmailReplyTo1Test.php | 92 + .../test/Model/SendSmtpEmailReplyToTest.php | 92 + .../test/Model/SendSmtpEmailSenderTest.php | 99 + .../test/Model/SendSmtpEmailTest.php | 190 + .../test/Model/SendSmtpEmailTo1Test.php | 92 + .../test/Model/SendSmtpEmailToTest.php | 92 + .../test/Model/SendTestEmailTest.php | 85 + .../brevo-php/test/Model/SendTestSmsTest.php | 85 + .../test/Model/SendTransacSmsTest.php | 134 + .../test/Model/SendWhatsappMessageTest.php | 113 + .../test/Model/SsoTokenRequestTest.php | 106 + .../Model/SubAccountAppsToggleRequestTest.php | 169 + ...tailsResponsePlanInfoCreditsEmailsTest.php | 92 + ...ountDetailsResponsePlanInfoCreditsTest.php | 92 + ...tailsResponsePlanInfoFeaturesInboxTest.php | 92 + ...esponsePlanInfoFeaturesLandingPageTest.php | 92 + ...untDetailsResponsePlanInfoFeaturesTest.php | 99 + ...tailsResponsePlanInfoFeaturesUsersTest.php | 92 + .../SubAccountDetailsResponsePlanInfoTest.php | 99 + .../Model/SubAccountDetailsResponseTest.php | 106 + ...SubAccountUpdatePlanRequestCreditsTest.php | 85 + ...ubAccountUpdatePlanRequestFeaturesTest.php | 99 + .../Model/SubAccountUpdatePlanRequestTest.php | 92 + .../SubAccountsResponseSubAccountsTest.php | 106 + .../test/Model/SubAccountsResponseTest.php | 92 + .../brevo-php/test/Model/TaskListTest.php | 85 + .../brevo-php/test/Model/TaskReminderTest.php | 99 + .../brevo-php/test/Model/TaskTest.php | 120 + .../brevo-php/test/Model/TaskTypesTest.php | 92 + .../Model/UpdateAttributeEnumerationTest.php | 92 + .../test/Model/UpdateAttributeTest.php | 92 + .../Model/UpdateBatchContactsContactsTest.php | 148 + .../Model/UpdateBatchContactsModelTest.php | 92 + .../test/Model/UpdateBatchContactsTest.php | 85 + .../test/Model/UpdateCampaignStatusTest.php | 85 + .../Model/UpdateChildAccountStatusTest.php | 106 + .../test/Model/UpdateChildDomainTest.php | 85 + .../brevo-php/test/Model/UpdateChildTest.php | 113 + .../test/Model/UpdateContactTest.php | 127 + .../test/Model/UpdateCouponCollectionTest.php | 85 + .../UpdateEmailCampaignRecipientsTest.php | 99 + .../Model/UpdateEmailCampaignSenderTest.php | 99 + .../test/Model/UpdateEmailCampaignTest.php | 295 + .../test/Model/UpdateExternalFeedTest.php | 141 + .../brevo-php/test/Model/UpdateListTest.php | 92 + .../brevo-php/test/Model/UpdateSenderTest.php | 99 + .../test/Model/UpdateSmsCampaignTest.php | 134 + .../Model/UpdateSmtpTemplateSenderTest.php | 99 + .../test/Model/UpdateSmtpTemplateTest.php | 148 + .../test/Model/UpdateWebhookTest.php | 127 + .../test/Model/UpdateWhatsAppCampaignTest.php | 106 + .../test/Model/UploadImageModelTest.php | 85 + .../test/Model/UploadImageToGalleryTest.php | 92 + .../test/Model/VariablesItemsTest.php | 99 + .../test/Model/WhatsappCampStatsTest.php | 113 + .../test/Model/WhatsappCampTemplateTest.php | 155 + vendor/guzzlehttp/guzzle/CHANGELOG.md | 1664 ++++ vendor/guzzlehttp/guzzle/LICENSE | 27 + vendor/guzzlehttp/guzzle/README.md | 94 + vendor/guzzlehttp/guzzle/UPGRADING.md | 1253 +++ vendor/guzzlehttp/guzzle/composer.json | 131 + .../guzzlehttp/guzzle/src/BodySummarizer.php | 28 + .../guzzle/src/BodySummarizerInterface.php | 13 + vendor/guzzlehttp/guzzle/src/Client.php | 483 + .../guzzlehttp/guzzle/src/ClientInterface.php | 84 + vendor/guzzlehttp/guzzle/src/ClientTrait.php | 241 + .../guzzle/src/Cookie/CookieJar.php | 307 + .../guzzle/src/Cookie/CookieJarInterface.php | 80 + .../guzzle/src/Cookie/FileCookieJar.php | 101 + .../guzzle/src/Cookie/SessionCookieJar.php | 77 + .../guzzle/src/Cookie/SetCookie.php | 488 + .../src/Exception/BadResponseException.php | 39 + .../guzzle/src/Exception/ClientException.php | 10 + .../guzzle/src/Exception/ConnectException.php | 56 + .../guzzle/src/Exception/GuzzleException.php | 9 + .../Exception/InvalidArgumentException.php | 7 + .../guzzle/src/Exception/RequestException.php | 150 + .../guzzle/src/Exception/ServerException.php | 10 + .../Exception/TooManyRedirectsException.php | 7 + .../src/Exception/TransferException.php | 7 + .../guzzle/src/Handler/CurlFactory.php | 736 ++ .../src/Handler/CurlFactoryInterface.php | 25 + .../guzzle/src/Handler/CurlHandler.php | 49 + .../guzzle/src/Handler/CurlMultiHandler.php | 284 + .../guzzle/src/Handler/EasyHandle.php | 112 + .../guzzle/src/Handler/HeaderProcessor.php | 42 + .../guzzle/src/Handler/MockHandler.php | 212 + .../guzzlehttp/guzzle/src/Handler/Proxy.php | 51 + .../guzzle/src/Handler/StreamHandler.php | 621 ++ vendor/guzzlehttp/guzzle/src/HandlerStack.php | 275 + .../guzzle/src/MessageFormatter.php | 199 + .../guzzle/src/MessageFormatterInterface.php | 18 + vendor/guzzlehttp/guzzle/src/Middleware.php | 268 + vendor/guzzlehttp/guzzle/src/Pool.php | 125 + .../guzzle/src/PrepareBodyMiddleware.php | 105 + .../guzzle/src/RedirectMiddleware.php | 228 + .../guzzlehttp/guzzle/src/RequestOptions.php | 274 + .../guzzlehttp/guzzle/src/RetryMiddleware.php | 119 + .../guzzlehttp/guzzle/src/TransferStats.php | 133 + vendor/guzzlehttp/guzzle/src/Utils.php | 384 + vendor/guzzlehttp/guzzle/src/functions.php | 167 + .../guzzle/src/functions_include.php | 6 + vendor/guzzlehttp/promises/CHANGELOG.md | 159 + vendor/guzzlehttp/promises/LICENSE | 24 + vendor/guzzlehttp/promises/README.md | 559 ++ vendor/guzzlehttp/promises/composer.json | 58 + .../promises/src/AggregateException.php | 19 + .../promises/src/CancellationException.php | 12 + vendor/guzzlehttp/promises/src/Coroutine.php | 162 + vendor/guzzlehttp/promises/src/Create.php | 79 + vendor/guzzlehttp/promises/src/Each.php | 81 + .../guzzlehttp/promises/src/EachPromise.php | 248 + .../promises/src/FulfilledPromise.php | 89 + vendor/guzzlehttp/promises/src/Is.php | 40 + vendor/guzzlehttp/promises/src/Promise.php | 281 + .../promises/src/PromiseInterface.php | 91 + .../promises/src/PromisorInterface.php | 16 + .../promises/src/RejectedPromise.php | 95 + .../promises/src/RejectionException.php | 49 + vendor/guzzlehttp/promises/src/TaskQueue.php | 71 + .../promises/src/TaskQueueInterface.php | 24 + vendor/guzzlehttp/promises/src/Utils.php | 259 + vendor/guzzlehttp/psr7/CHANGELOG.md | 465 + vendor/guzzlehttp/psr7/LICENSE | 26 + vendor/guzzlehttp/psr7/README.md | 887 ++ vendor/guzzlehttp/psr7/composer.json | 93 + vendor/guzzlehttp/psr7/src/AppendStream.php | 248 + vendor/guzzlehttp/psr7/src/BufferStream.php | 147 + vendor/guzzlehttp/psr7/src/CachingStream.php | 153 + vendor/guzzlehttp/psr7/src/DroppingStream.php | 49 + .../src/Exception/MalformedUriException.php | 14 + vendor/guzzlehttp/psr7/src/FnStream.php | 180 + vendor/guzzlehttp/psr7/src/Header.php | 134 + vendor/guzzlehttp/psr7/src/HttpFactory.php | 94 + vendor/guzzlehttp/psr7/src/InflateStream.php | 37 + vendor/guzzlehttp/psr7/src/LazyOpenStream.php | 49 + vendor/guzzlehttp/psr7/src/LimitStream.php | 157 + vendor/guzzlehttp/psr7/src/Message.php | 246 + vendor/guzzlehttp/psr7/src/MessageTrait.php | 265 + vendor/guzzlehttp/psr7/src/MimeType.php | 1259 +++ .../guzzlehttp/psr7/src/MultipartStream.php | 165 + vendor/guzzlehttp/psr7/src/NoSeekStream.php | 28 + vendor/guzzlehttp/psr7/src/PumpStream.php | 179 + vendor/guzzlehttp/psr7/src/Query.php | 118 + vendor/guzzlehttp/psr7/src/Request.php | 159 + vendor/guzzlehttp/psr7/src/Response.php | 161 + vendor/guzzlehttp/psr7/src/Rfc7230.php | 23 + vendor/guzzlehttp/psr7/src/ServerRequest.php | 340 + vendor/guzzlehttp/psr7/src/Stream.php | 283 + .../psr7/src/StreamDecoratorTrait.php | 156 + vendor/guzzlehttp/psr7/src/StreamWrapper.php | 207 + vendor/guzzlehttp/psr7/src/UploadedFile.php | 211 + vendor/guzzlehttp/psr7/src/Uri.php | 743 ++ vendor/guzzlehttp/psr7/src/UriComparator.php | 52 + vendor/guzzlehttp/psr7/src/UriNormalizer.php | 220 + vendor/guzzlehttp/psr7/src/UriResolver.php | 211 + vendor/guzzlehttp/psr7/src/Utils.php | 477 + vendor/psr/http-client/CHANGELOG.md | 31 + vendor/psr/http-client/LICENSE | 19 + vendor/psr/http-client/README.md | 12 + vendor/psr/http-client/composer.json | 30 + .../src/ClientExceptionInterface.php | 10 + .../psr/http-client/src/ClientInterface.php | 20 + .../src/NetworkExceptionInterface.php | 24 + .../src/RequestExceptionInterface.php | 24 + vendor/psr/http-factory/LICENSE | 21 + vendor/psr/http-factory/README.md | 12 + vendor/psr/http-factory/composer.json | 38 + .../src/RequestFactoryInterface.php | 18 + .../src/ResponseFactoryInterface.php | 18 + .../src/ServerRequestFactoryInterface.php | 24 + .../src/StreamFactoryInterface.php | 45 + .../src/UploadedFileFactoryInterface.php | 34 + .../http-factory/src/UriFactoryInterface.php | 17 + vendor/psr/http-message/CHANGELOG.md | 36 + vendor/psr/http-message/LICENSE | 19 + vendor/psr/http-message/README.md | 16 + vendor/psr/http-message/composer.json | 26 + .../psr/http-message/docs/PSR7-Interfaces.md | 130 + vendor/psr/http-message/docs/PSR7-Usage.md | 159 + .../psr/http-message/src/MessageInterface.php | 187 + .../psr/http-message/src/RequestInterface.php | 130 + .../http-message/src/ResponseInterface.php | 68 + .../src/ServerRequestInterface.php | 261 + .../psr/http-message/src/StreamInterface.php | 158 + .../src/UploadedFileInterface.php | 123 + vendor/psr/http-message/src/UriInterface.php | 324 + vendor/ralouphie/getallheaders/LICENSE | 21 + vendor/ralouphie/getallheaders/README.md | 27 + vendor/ralouphie/getallheaders/composer.json | 26 + .../getallheaders/src/getallheaders.php | 46 + 1302 files changed, 308003 insertions(+), 7 deletions(-) create mode 100644 site/config/routes/brevo-create-contact.php create mode 100644 vendor/getbrevo/brevo-php/.gitignore create mode 100644 vendor/getbrevo/brevo-php/.travis.yml create mode 100644 vendor/getbrevo/brevo-php/CHANGELOG.md create mode 100644 vendor/getbrevo/brevo-php/LICENSE.md create mode 100644 vendor/getbrevo/brevo-php/README.md create mode 100755 vendor/getbrevo/brevo-php/composer.json create mode 100644 vendor/getbrevo/brevo-php/composer.lock create mode 100644 vendor/getbrevo/brevo-php/docs/Api/AccountApi.md create mode 100644 vendor/getbrevo/brevo-php/docs/Api/AttributesApi.md create mode 100644 vendor/getbrevo/brevo-php/docs/Api/CRMApi.md create mode 100644 vendor/getbrevo/brevo-php/docs/Api/CompaniesApi.md create mode 100644 vendor/getbrevo/brevo-php/docs/Api/ContactsApi.md create mode 100644 vendor/getbrevo/brevo-php/docs/Api/ConversationsApi.md create mode 100644 vendor/getbrevo/brevo-php/docs/Api/CouponsApi.md create mode 100644 vendor/getbrevo/brevo-php/docs/Api/DealsApi.md create mode 100644 vendor/getbrevo/brevo-php/docs/Api/DomainsApi.md create mode 100644 vendor/getbrevo/brevo-php/docs/Api/EcommerceApi.md create mode 100644 vendor/getbrevo/brevo-php/docs/Api/EmailCampaignsApi.md create mode 100644 vendor/getbrevo/brevo-php/docs/Api/EventsApi.md create mode 100644 vendor/getbrevo/brevo-php/docs/Api/ExternalFeedsApi.md create mode 100644 vendor/getbrevo/brevo-php/docs/Api/FilesApi.md create mode 100644 vendor/getbrevo/brevo-php/docs/Api/FoldersApi.md create mode 100644 vendor/getbrevo/brevo-php/docs/Api/InboundParsingApi.md create mode 100644 vendor/getbrevo/brevo-php/docs/Api/ListsApi.md create mode 100644 vendor/getbrevo/brevo-php/docs/Api/MasterAccountApi.md create mode 100644 vendor/getbrevo/brevo-php/docs/Api/NotesApi.md create mode 100644 vendor/getbrevo/brevo-php/docs/Api/ProcessApi.md create mode 100644 vendor/getbrevo/brevo-php/docs/Api/ResellerApi.md create mode 100644 vendor/getbrevo/brevo-php/docs/Api/SMSCampaignsApi.md create mode 100644 vendor/getbrevo/brevo-php/docs/Api/SendersApi.md create mode 100644 vendor/getbrevo/brevo-php/docs/Api/TasksApi.md create mode 100644 vendor/getbrevo/brevo-php/docs/Api/TransactionalEmailsApi.md create mode 100644 vendor/getbrevo/brevo-php/docs/Api/TransactionalSMSApi.md create mode 100644 vendor/getbrevo/brevo-php/docs/Api/TransactionalWhatsAppApi.md create mode 100644 vendor/getbrevo/brevo-php/docs/Api/UserApi.md create mode 100644 vendor/getbrevo/brevo-php/docs/Api/WebhooksApi.md create mode 100644 vendor/getbrevo/brevo-php/docs/Api/WhatsAppCampaignsApi.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/AbTestCampaignResult.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/AbTestCampaignResultClickedLinks.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/AbTestCampaignResultStatistics.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/AbTestVersionClicks.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/AbTestVersionClicksInner.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/AbTestVersionStats.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/AddChildDomain.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/AddContactToList.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/AddCredits.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/AuthenticateDomainModel.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/BlockDomain.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/Body.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/Body1.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/Body10.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/Body11.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/Body12.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/Body13.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/Body14.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/Body2.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/Body3.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/Body4.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/Body5.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/Body6.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/Body7.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/Body8.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/Body9.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/BodyVariablesItems.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CompaniesList.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/Company.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CompanyAttributes.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CompanyAttributesInner.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/ComponentItems.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/Contact.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/ConversationsMessageFile.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/Conversationsmessage.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/ConversationsmessageFileImageInfo.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateApiKeyRequest.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateApiKeyResponse.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateAttribute.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateAttributeEnumeration.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateCategoryModel.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateChild.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateContact.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateCouponCollection.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateCoupons.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateDoiContact.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateDomain.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateDomainModel.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateDomainModelDnsRecords.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateDomainModelDnsRecordsDkimRecord.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateEmailCampaign.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateEmailCampaignRecipients.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateEmailCampaignSender.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateExternalFeed.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateList.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateModel.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateProductModel.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateReseller.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateSender.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateSenderIps.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateSenderModel.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateSmsCampaign.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateSmsCampaignRecipients.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateSmtpEmail.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateSmtpTemplate.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateSmtpTemplateSender.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateSubAccount.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateSubAccountResponse.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateUpdateBatchCategory.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateUpdateBatchCategoryModel.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateUpdateBatchProducts.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateUpdateBatchProductsModel.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateUpdateCategories.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateUpdateCategory.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateUpdateContactModel.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateUpdateFolder.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateUpdateProducts.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateUpdateproduct.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateWebhook.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateWhatsAppCampaign.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateWhatsAppCampaignRecipients.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreateWhatsAppTemplate.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreatedBatchId.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/CreatedProcessId.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/Deal.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/DealAttributes.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/DealAttributesInner.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/DealsList.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/DeleteHardbounces.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/EmailExportRecipients.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/ErrorModel.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/Event.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/EventIdentifiers.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/ExportWebhooksHistory.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/FileData.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/FileDownloadableLink.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/FileList.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetAccount.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetAccountActivity.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetAccountActivityLogs.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetAccountMarketingAutomation.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetAccountPlan.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetAccountRelay.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetAccountRelayData.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetAggregatedReport.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetAllExternalFeeds.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetAllExternalFeedsFeeds.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetAttributes.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetAttributesAttributes.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetAttributesEnumeration.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetBlockedDomains.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetCampaignOverview.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetCampaignRecipients.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetCampaignStats.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetCategories.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetCategoryDetails.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetChildAccountCreationStatus.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetChildDomain.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetChildDomains.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetChildInfo.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetChildInfoApiKeys.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetChildInfoApiKeysV2.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetChildInfoApiKeysV3.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetChildInfoCredits.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetChildInfoStatistics.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetChildrenList.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetClient.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetContactCampaignStats.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetContactCampaignStatsClicked.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetContactCampaignStatsOpened.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetContactCampaignStatsTransacAttributes.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetContactCampaignStatsUnsubscriptions.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetContactDetails.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetContacts.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetCorporateInvitedUsersList.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetCorporateInvitedUsersListFeatureAccess.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetCorporateInvitedUsersListGroups.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetCorporateInvitedUsersListUsers.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetCouponCollection.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetDeviceBrowserStats.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetDomainConfigurationModel.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetDomainsList.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetDomainsListDomains.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetEmailCampaign.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetEmailCampaigns.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetEmailEventReport.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetEmailEventReportEvents.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetExtendedCampaignOverview.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetExtendedCampaignOverviewSender.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetExtendedCampaignStats.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetExtendedCampaignStatsGlobalStats.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetExtendedClient.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetExtendedClientAddress.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetExtendedContactDetails.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetExtendedContactDetailsStatistics.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetExtendedContactDetailsStatisticsClicked.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetExtendedContactDetailsStatisticsDelivered.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetExtendedContactDetailsStatisticsLinks.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetExtendedContactDetailsStatisticsMessagesSent.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetExtendedContactDetailsStatisticsOpened.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetExtendedContactDetailsStatisticsUnsubscriptions.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetExtendedList.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetExtendedListCampaignStats.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetExternalFeedByUUID.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetExternalFeedByUUIDHeaders.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetFolder.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetFolderLists.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetFolders.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetInboundEmailEvents.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetInboundEmailEventsByUuid.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetInboundEmailEventsByUuidAttachments.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetInboundEmailEventsByUuidLogs.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetInboundEmailEventsEvents.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetInvitedUsersList.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetInvitedUsersListFeatureAccess.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetInvitedUsersListUsers.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetIp.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetIpFromSender.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetIps.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetIpsFromSender.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetList.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetLists.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetOrders.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetProcess.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetProcesses.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetProductDetails.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetProducts.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetReports.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetReportsReports.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetScheduledEmailByBatchId.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetScheduledEmailByBatchIdBatches.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetScheduledEmailByMessageId.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetSegments.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetSegmentsSegments.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetSendersList.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetSendersListIps.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetSendersListSenders.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetSharedTemplateUrl.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetSmsCampaign.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetSmsCampaignOverview.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetSmsCampaignRecipients.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetSmsCampaignStats.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetSmsCampaigns.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetSmsEventReport.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetSmsEventReportEvents.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetSmtpTemplateOverview.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetSmtpTemplateOverviewSender.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetSmtpTemplates.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetSsoToken.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetStatsByBrowser.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetStatsByDevice.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetStatsByDomain.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetTransacAggregatedSmsReport.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetTransacBlockedContacts.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetTransacBlockedContactsContacts.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetTransacBlockedContactsReason.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetTransacEmailContent.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetTransacEmailContentEvents.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetTransacEmailsList.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetTransacEmailsListTransactionalEmails.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetTransacSmsReport.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetTransacSmsReportReports.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetUserPermission.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetUserPermissionPrivileges.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetWATemplates.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetWATemplatesTemplates.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetWebhook.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetWebhookAuth.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetWebhookHeaders.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetWebhooks.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetWhatsAppConfig.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetWhatsappCampaignOverview.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetWhatsappCampaigns.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetWhatsappCampaignsCampaigns.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetWhatsappEventReport.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/GetWhatsappEventReportEvents.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/InlineResponse200.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/InlineResponse2001.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/InlineResponse2002.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/InlineResponse201.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/InlineResponse2011.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/InlineResponse2012.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/InlineResponse2013.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/InlineResponse2014.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/InlineResponse2015.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/InviteAdminUser.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/InviteAdminUserPrivileges.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/Inviteuser.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/InviteuserPrivileges.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/ManageIp.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/MasterDetailsResponse.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/MasterDetailsResponseBillingInfo.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/MasterDetailsResponseBillingInfoAddress.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/MasterDetailsResponseBillingInfoName.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/MasterDetailsResponsePlanInfo.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/MasterDetailsResponsePlanInfoFeatures.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/Note.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/NoteData.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/NoteId.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/NoteList.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/Order.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/OrderBatch.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/OrderBilling.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/OrderProducts.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/Otp.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/Pipeline.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/PipelineStage.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/Pipelines.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/PostContactInfo.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/PostContactInfoContacts.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/PostSendFailed.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/PostSendSmsTestFailed.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/PutRevokeUserPermission.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/Putresendcancelinvitation.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/RemainingCreditModel.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/RemainingCreditModelChild.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/RemainingCreditModelReseller.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/RemoveContactFromList.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/RemoveCredits.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/RequestContactExport.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/RequestContactExportCustomContactFilter.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/RequestContactImport.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/RequestContactImportJsonBody.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/RequestContactImportNewList.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/RequestSmsRecipientExport.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/ScheduleSmtpEmail.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/SendReport.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/SendReportEmail.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/SendSms.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/SendSmtpEmail.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/SendSmtpEmailAttachment.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/SendSmtpEmailBcc.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/SendSmtpEmailCc.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/SendSmtpEmailMessageVersions.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/SendSmtpEmailReplyTo.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/SendSmtpEmailReplyTo1.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/SendSmtpEmailSender.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/SendSmtpEmailTo.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/SendSmtpEmailTo1.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/SendTestEmail.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/SendTestSms.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/SendTransacSms.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/SendWhatsappMessage.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/SsoTokenRequest.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/SubAccountAppsToggleRequest.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/SubAccountDetailsResponse.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/SubAccountDetailsResponsePlanInfo.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/SubAccountDetailsResponsePlanInfoCredits.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/SubAccountDetailsResponsePlanInfoCreditsEmails.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/SubAccountDetailsResponsePlanInfoFeatures.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/SubAccountDetailsResponsePlanInfoFeaturesInbox.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/SubAccountDetailsResponsePlanInfoFeaturesLandingPage.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/SubAccountDetailsResponsePlanInfoFeaturesUsers.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/SubAccountUpdatePlanRequest.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/SubAccountUpdatePlanRequestCredits.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/SubAccountUpdatePlanRequestFeatures.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/SubAccountsResponse.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/SubAccountsResponseSubAccounts.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/Task.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/TaskList.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/TaskReminder.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/TaskTypes.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/UpdateAttribute.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/UpdateAttributeEnumeration.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/UpdateBatchContacts.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/UpdateBatchContactsContacts.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/UpdateBatchContactsModel.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/UpdateCampaignStatus.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/UpdateChild.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/UpdateChildAccountStatus.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/UpdateChildDomain.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/UpdateContact.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/UpdateCouponCollection.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/UpdateEmailCampaign.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/UpdateEmailCampaignRecipients.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/UpdateEmailCampaignSender.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/UpdateExternalFeed.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/UpdateList.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/UpdateSender.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/UpdateSmsCampaign.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/UpdateSmtpTemplate.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/UpdateSmtpTemplateSender.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/UpdateWebhook.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/UpdateWhatsAppCampaign.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/UploadImageModel.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/UploadImageToGallery.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/VariablesItems.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/WhatsappCampStats.md create mode 100644 vendor/getbrevo/brevo-php/docs/Model/WhatsappCampTemplate.md create mode 100644 vendor/getbrevo/brevo-php/lib/Api/AccountApi.php create mode 100644 vendor/getbrevo/brevo-php/lib/Api/AttributesApi.php create mode 100644 vendor/getbrevo/brevo-php/lib/Api/CRMApi.php create mode 100644 vendor/getbrevo/brevo-php/lib/Api/CompaniesApi.php create mode 100644 vendor/getbrevo/brevo-php/lib/Api/ContactsApi.php create mode 100644 vendor/getbrevo/brevo-php/lib/Api/ConversationsApi.php create mode 100644 vendor/getbrevo/brevo-php/lib/Api/CouponsApi.php create mode 100644 vendor/getbrevo/brevo-php/lib/Api/DealsApi.php create mode 100644 vendor/getbrevo/brevo-php/lib/Api/DomainsApi.php create mode 100644 vendor/getbrevo/brevo-php/lib/Api/EcommerceApi.php create mode 100644 vendor/getbrevo/brevo-php/lib/Api/EmailCampaignsApi.php create mode 100644 vendor/getbrevo/brevo-php/lib/Api/EventsApi.php create mode 100644 vendor/getbrevo/brevo-php/lib/Api/ExternalFeedsApi.php create mode 100644 vendor/getbrevo/brevo-php/lib/Api/FilesApi.php create mode 100644 vendor/getbrevo/brevo-php/lib/Api/FoldersApi.php create mode 100644 vendor/getbrevo/brevo-php/lib/Api/InboundParsingApi.php create mode 100644 vendor/getbrevo/brevo-php/lib/Api/ListsApi.php create mode 100644 vendor/getbrevo/brevo-php/lib/Api/MasterAccountApi.php create mode 100644 vendor/getbrevo/brevo-php/lib/Api/NotesApi.php create mode 100644 vendor/getbrevo/brevo-php/lib/Api/ProcessApi.php create mode 100644 vendor/getbrevo/brevo-php/lib/Api/ResellerApi.php create mode 100644 vendor/getbrevo/brevo-php/lib/Api/SMSCampaignsApi.php create mode 100644 vendor/getbrevo/brevo-php/lib/Api/SendersApi.php create mode 100644 vendor/getbrevo/brevo-php/lib/Api/TasksApi.php create mode 100644 vendor/getbrevo/brevo-php/lib/Api/TransactionalEmailsApi.php create mode 100644 vendor/getbrevo/brevo-php/lib/Api/TransactionalSMSApi.php create mode 100644 vendor/getbrevo/brevo-php/lib/Api/TransactionalWhatsAppApi.php create mode 100644 vendor/getbrevo/brevo-php/lib/Api/UserApi.php create mode 100644 vendor/getbrevo/brevo-php/lib/Api/WebhooksApi.php create mode 100644 vendor/getbrevo/brevo-php/lib/Api/WhatsAppCampaignsApi.php create mode 100644 vendor/getbrevo/brevo-php/lib/ApiException.php create mode 100644 vendor/getbrevo/brevo-php/lib/Configuration.php create mode 100644 vendor/getbrevo/brevo-php/lib/HeaderSelector.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/AbTestCampaignResult.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/AbTestCampaignResultClickedLinks.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/AbTestCampaignResultStatistics.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/AbTestVersionClicks.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/AbTestVersionClicksInner.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/AbTestVersionStats.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/AddChildDomain.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/AddContactToList.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/AddCredits.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/AuthenticateDomainModel.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/BlockDomain.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/Body.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/Body1.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/Body10.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/Body11.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/Body12.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/Body13.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/Body14.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/Body2.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/Body3.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/Body4.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/Body5.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/Body6.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/Body7.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/Body8.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/Body9.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/BodyVariablesItems.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CompaniesList.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/Company.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CompanyAttributes.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CompanyAttributesInner.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/ComponentItems.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/Contact.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/ConversationsMessage.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/ConversationsMessageFile.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/ConversationsMessageFileImageInfo.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateApiKeyRequest.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateApiKeyResponse.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateAttribute.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateAttributeEnumeration.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateCategoryModel.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateChild.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateContact.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateCouponCollection.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateCoupons.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateDoiContact.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateDomain.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateDomainModel.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateDomainModelDnsRecords.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateDomainModelDnsRecordsDkimRecord.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateEmailCampaign.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateEmailCampaignRecipients.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateEmailCampaignSender.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateExternalFeed.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateList.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateModel.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateProductModel.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateReseller.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateSender.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateSenderIps.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateSenderModel.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateSmsCampaign.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateSmsCampaignRecipients.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateSmtpEmail.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateSmtpTemplate.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateSmtpTemplateSender.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateSubAccount.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateSubAccountResponse.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateUpdateBatchCategory.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateUpdateBatchCategoryModel.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateUpdateBatchProducts.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateUpdateBatchProductsModel.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateUpdateCategories.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateUpdateCategory.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateUpdateContactModel.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateUpdateFolder.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateUpdateProduct.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateUpdateProducts.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateWebhook.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateWhatsAppCampaign.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateWhatsAppCampaignRecipients.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreateWhatsAppTemplate.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreatedBatchId.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/CreatedProcessId.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/Deal.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/DealAttributes.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/DealAttributesInner.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/DealsList.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/DeleteHardbounces.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/EmailExportRecipients.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/ErrorModel.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/Event.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/EventIdentifiers.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/ExportWebhooksHistory.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/FileData.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/FileDownloadableLink.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/FileList.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetAccount.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetAccountActivity.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetAccountActivityLogs.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetAccountMarketingAutomation.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetAccountPlan.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetAccountRelay.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetAccountRelayData.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetAggregatedReport.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetAllExternalFeeds.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetAllExternalFeedsFeeds.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetAttributes.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetAttributesAttributes.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetAttributesEnumeration.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetBlockedDomains.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetCampaignOverview.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetCampaignRecipients.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetCampaignStats.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetCategories.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetCategoryDetails.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetChildAccountCreationStatus.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetChildDomain.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetChildDomains.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetChildInfo.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetChildInfoApiKeys.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetChildInfoApiKeysV2.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetChildInfoApiKeysV3.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetChildInfoCredits.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetChildInfoStatistics.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetChildrenList.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetClient.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetContactCampaignStats.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetContactCampaignStatsClicked.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetContactCampaignStatsOpened.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetContactCampaignStatsTransacAttributes.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetContactCampaignStatsUnsubscriptions.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetContactDetails.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetContacts.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetCorporateInvitedUsersList.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetCorporateInvitedUsersListFeatureAccess.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetCorporateInvitedUsersListGroups.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetCorporateInvitedUsersListUsers.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetCouponCollection.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetDeviceBrowserStats.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetDomainConfigurationModel.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetDomainsList.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetDomainsListDomains.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetEmailCampaign.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetEmailCampaigns.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetEmailEventReport.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetEmailEventReportEvents.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetExtendedCampaignOverview.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetExtendedCampaignOverviewSender.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetExtendedCampaignStats.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetExtendedCampaignStatsGlobalStats.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetExtendedClient.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetExtendedClientAddress.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetExtendedContactDetails.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatistics.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsClicked.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsDelivered.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsLinks.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsMessagesSent.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsOpened.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsUnsubscriptions.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetExtendedList.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetExtendedListCampaignStats.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetExternalFeedByUUID.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetExternalFeedByUUIDHeaders.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetFolder.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetFolderLists.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetFolders.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetInboundEmailEvents.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetInboundEmailEventsByUuid.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetInboundEmailEventsByUuidAttachments.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetInboundEmailEventsByUuidLogs.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetInboundEmailEventsEvents.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetInvitedUsersList.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetInvitedUsersListFeatureAccess.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetInvitedUsersListUsers.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetIp.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetIpFromSender.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetIps.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetIpsFromSender.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetList.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetLists.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetOrders.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetProcess.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetProcesses.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetProductDetails.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetProducts.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetReports.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetReportsReports.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetScheduledEmailByBatchId.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetScheduledEmailByBatchIdBatches.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetScheduledEmailByMessageId.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetSegments.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetSegmentsSegments.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetSendersList.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetSendersListIps.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetSendersListSenders.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetSharedTemplateUrl.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetSmsCampaign.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetSmsCampaignOverview.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetSmsCampaignRecipients.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetSmsCampaignStats.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetSmsCampaigns.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetSmsEventReport.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetSmsEventReportEvents.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetSmtpTemplateOverview.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetSmtpTemplateOverviewSender.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetSmtpTemplates.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetSsoToken.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetStatsByBrowser.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetStatsByDevice.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetStatsByDomain.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetTransacAggregatedSmsReport.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetTransacBlockedContacts.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetTransacBlockedContactsContacts.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetTransacBlockedContactsReason.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetTransacEmailContent.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetTransacEmailContentEvents.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetTransacEmailsList.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetTransacEmailsListTransactionalEmails.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetTransacSmsReport.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetTransacSmsReportReports.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetUserPermission.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetUserPermissionPrivileges.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetWATemplates.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetWATemplatesTemplates.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetWebhook.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetWebhookAuth.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetWebhookHeaders.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetWebhooks.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetWhatsAppConfig.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetWhatsappCampaignOverview.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetWhatsappCampaigns.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetWhatsappCampaignsCampaigns.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetWhatsappEventReport.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/GetWhatsappEventReportEvents.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/InlineResponse200.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/InlineResponse2001.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/InlineResponse2002.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/InlineResponse201.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/InlineResponse2011.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/InlineResponse2012.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/InlineResponse2013.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/InlineResponse2014.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/InlineResponse2015.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/InviteAdminUser.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/InviteAdminUserPrivileges.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/Inviteuser.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/InviteuserPrivileges.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/ManageIp.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/MasterDetailsResponse.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/MasterDetailsResponseBillingInfo.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/MasterDetailsResponseBillingInfoAddress.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/MasterDetailsResponseBillingInfoName.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/MasterDetailsResponsePlanInfo.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/MasterDetailsResponsePlanInfoFeatures.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/ModelInterface.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/Note.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/NoteData.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/NoteId.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/NoteList.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/Order.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/OrderBatch.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/OrderBilling.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/OrderProducts.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/Otp.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/Pipeline.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/PipelineStage.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/Pipelines.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/PostContactInfo.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/PostContactInfoContacts.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/PostSendFailed.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/PostSendSmsTestFailed.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/PutRevokeUserPermission.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/Putresendcancelinvitation.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/RemainingCreditModel.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/RemainingCreditModelChild.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/RemainingCreditModelReseller.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/RemoveContactFromList.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/RemoveCredits.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/RequestContactExport.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/RequestContactExportCustomContactFilter.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/RequestContactImport.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/RequestContactImportJsonBody.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/RequestContactImportNewList.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/RequestSmsRecipientExport.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/ScheduleSmtpEmail.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/SendReport.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/SendReportEmail.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/SendSms.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/SendSmtpEmail.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/SendSmtpEmailAttachment.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/SendSmtpEmailBcc.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/SendSmtpEmailCc.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/SendSmtpEmailMessageVersions.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/SendSmtpEmailReplyTo.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/SendSmtpEmailReplyTo1.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/SendSmtpEmailSender.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/SendSmtpEmailTo.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/SendSmtpEmailTo1.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/SendTestEmail.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/SendTestSms.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/SendTransacSms.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/SendWhatsappMessage.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/SsoTokenRequest.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/SubAccountAppsToggleRequest.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponse.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponsePlanInfo.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponsePlanInfoCredits.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponsePlanInfoCreditsEmails.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponsePlanInfoFeatures.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponsePlanInfoFeaturesInbox.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponsePlanInfoFeaturesLandingPage.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponsePlanInfoFeaturesUsers.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/SubAccountUpdatePlanRequest.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/SubAccountUpdatePlanRequestCredits.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/SubAccountUpdatePlanRequestFeatures.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/SubAccountsResponse.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/SubAccountsResponseSubAccounts.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/Task.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/TaskList.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/TaskReminder.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/TaskTypes.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/UpdateAttribute.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/UpdateAttributeEnumeration.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/UpdateBatchContacts.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/UpdateBatchContactsContacts.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/UpdateBatchContactsModel.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/UpdateCampaignStatus.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/UpdateChild.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/UpdateChildAccountStatus.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/UpdateChildDomain.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/UpdateContact.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/UpdateCouponCollection.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/UpdateEmailCampaign.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/UpdateEmailCampaignRecipients.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/UpdateEmailCampaignSender.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/UpdateExternalFeed.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/UpdateList.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/UpdateSender.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/UpdateSmsCampaign.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/UpdateSmtpTemplate.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/UpdateSmtpTemplateSender.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/UpdateWebhook.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/UpdateWhatsAppCampaign.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/UploadImageModel.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/UploadImageToGallery.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/VariablesItems.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/WhatsappCampStats.php create mode 100644 vendor/getbrevo/brevo-php/lib/Model/WhatsappCampTemplate.php create mode 100644 vendor/getbrevo/brevo-php/lib/ObjectSerializer.php create mode 100755 vendor/getbrevo/brevo-php/phpunit.xml.dist create mode 100644 vendor/getbrevo/brevo-php/test/Api/AccountApiTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Api/AttributesApiTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Api/CRMApiTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Api/CompaniesApiTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Api/ContactsApiTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Api/ConversationsApiTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Api/CouponsApiTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Api/DealsApiTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Api/DomainsApiTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Api/EcommerceApiTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Api/EmailCampaignsApiTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Api/EventsApiTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Api/ExternalFeedsApiTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Api/FilesApiTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Api/FoldersApiTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Api/InboundParsingApiTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Api/ListsApiTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Api/MasterAccountApiTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Api/NotesApiTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Api/ProcessApiTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Api/ResellerApiTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Api/SMSCampaignsApiTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Api/SendersApiTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Api/TasksApiTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Api/TransactionalEmailsApiTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Api/TransactionalSMSApiTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Api/TransactionalWhatsAppApiTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Api/UserApiTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Api/WebhooksApiTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Api/WhatsAppCampaignsApiTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/AbTestCampaignResultClickedLinksTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/AbTestCampaignResultStatisticsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/AbTestCampaignResultTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/AbTestVersionClicksInnerTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/AbTestVersionClicksTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/AbTestVersionStatsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/AddChildDomainTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/AddContactToListTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/AddCreditsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/AuthenticateDomainModelTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/BlockDomainTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/Body10Test.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/Body11Test.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/Body12Test.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/Body13Test.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/Body14Test.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/Body1Test.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/Body2Test.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/Body3Test.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/Body4test.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/Body5Test.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/Body6Test.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/Body7Test.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/Body8Test.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/Body9Test.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/BodyTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/BodyVariablesItemsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CompaniesListTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CompanyAttributesInnerTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CompanyAttributesTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CompanyTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/ComponentItemsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/ContactTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/ConversationsMessageFIleImageInfoTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/ConversationsMessageFileTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/ConversationsMessageTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateApiKeyRequestTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateApiKeyResponseTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateAttributeEnumerationTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateAttributeTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateCategoryModelTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateChildTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateContactTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateCouponCollectionTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateCouponsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateDoiContactTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateDomainModelDnsRecordsDkimRecordTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateDomainModelDnsRecordsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateDomainModelTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateDomainTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateEmailCampaignRecipientsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateEmailCampaignSenderTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateEmailCampaignTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateExternalFeedTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateListTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateModelTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateProductModelTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateResellerTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateSenderIpsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateSenderModelTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateSenderTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateSmsCampaignRecipientsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateSmsCampaignTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateSmtpEmailTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateSmtpTemplateSenderTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateSmtpTemplateTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateSubAccountResponseTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateSubAccountTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateUpdateBatchCategoryModelTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateUpdateBatchCategoryTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateUpdateBatchProductsModelTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateUpdateBatchProductsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateUpdateCategoriesTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateUpdateCategoryTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateUpdateContactModelTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateUpdateFolderTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateUpdateProductsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateUpdateproductTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateWebhookTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateWhatsAppCampaignRecipientsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateWhatsAppCampaignTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreateWhatsAppTemplateTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreatedBatchIdTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/CreatedProcessIdTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/DealAttributesInnerTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/DealAttributesTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/DealTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/DealsListTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/DeleteHardbouncesTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/EmailExportRecipientsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/ErrorModelTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/EventIdentifiersTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/EventTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/ExportWebhooksHistoryTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/FIleListTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/FileDataTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/FileDownloadableLinkTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetAccountActivityLogsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetAccountActivityTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetAccountMarketingAutomationTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetAccountPlanTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetAccountRelayDataTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetAccountRelayTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetAccountTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetAggregatedReportTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetAllExternalFeedsFeedsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetAllExternalFeedsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetAttributesAttributesTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetAttributesEnumerationTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetAttributesTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetBlockedDomainsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetCampaignOverviewTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetCampaignRecipientsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetCampaignStatsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetCategoriesTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetCategoryDetailsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetChildAccountCreationStatusTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetChildDomainTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetChildDomainsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetChildInfoApiKeysTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetChildInfoApiKeysV2Test.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetChildInfoApiKeysV3Test.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetChildInfoCreditsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetChildInfoStatisticsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetChildInfoTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetChildrenListTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetClientTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetContactCampaignStatsClickedTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetContactCampaignStatsOpenedTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetContactCampaignStatsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetContactCampaignStatsTransacAttributesTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetContactCampaignStatsUnsubscriptionsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetContactDetailsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetContactsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetCorporateInvitedUsersListFeatureAccessTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetCorporateInvitedUsersListGroupsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetCorporateInvitedUsersListTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetCorporateInvitedUsersListUsersTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetCouponCollectionTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetDeviceBrowserStatsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetDomainConfigurationModelTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetDomainsListDomainsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetDomainsListTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetEmailCampaignTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetEmailCampaignsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetEmailEventReportEventsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetEmailEventReportTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetExtendedCampaignOverviewSenderTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetExtendedCampaignOverviewTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetExtendedCampaignStatsGlobalStatsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetExtendedCampaignStatsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetExtendedClientAddressTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetExtendedClientTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetExtendedContactDetailsStatisticsClickedTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetExtendedContactDetailsStatisticsDeliveredTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetExtendedContactDetailsStatisticsLinksTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetExtendedContactDetailsStatisticsMessagesSentTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetExtendedContactDetailsStatisticsOpenedTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetExtendedContactDetailsStatisticsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscriptionTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscriptionTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetExtendedContactDetailsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetExtendedListCampaignStatsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetExtendedListTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetExternalFeedByUUIDHeadersTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetExternalFeedByUUIDTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetFolderListsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetFolderTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetFoldersTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetInboundEmailEventsByUuidAttachmentsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetInboundEmailEventsByUuidLogsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetInboundEmailEventsByUuidTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetInboundEmailEventsEventsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetInboundEmailEventsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetInvitedUsersListFeatureAccessTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetInvitedUsersListTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetInvitedUsersListUsersTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetIpFromSenderTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetIpTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetIpsFromSenderTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetIpsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetListTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetListsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetOrdersTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetProcessTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetProcessesTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetProductDetailsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetProductsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetReportsReportsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetReportsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetScheduledEmailByBatchIdBatchesTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetScheduledEmailByBatchIdTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetScheduledEmailByMessageIdTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetSegmentsSegmentsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetSegmentsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetSendersListIpsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetSendersListSendersTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetSendersListTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetSharedTemplateUrlTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetSmsCampaignOverviewTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetSmsCampaignRecipientsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetSmsCampaignStatsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetSmsCampaignTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetSmsCampaignsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetSmsEventReportEventsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetSmsEventReportTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetSmtpTemplateOverviewSenderTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetSmtpTemplateOverviewTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetSmtpTemplatesTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetSsoTokenTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetStatsByBrowserTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetStatsByDeviceTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetStatsByDomainTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetTransacAggregatedSmsReportTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetTransacBlockedContactsContactsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetTransacBlockedContactsReasonTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetTransacBlockedContactsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetTransacEmailContentEventsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetTransacEmailContentTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetTransacEmailsListTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetTransacEmailsListTransactionalEmailsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetTransacSmsReportReportsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetTransacSmsReportTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetUserPermissionPrivilegesTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetUserPermissionTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetWATemplatesTemplatesTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetWATemplatesTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetWebhookAuthTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetWebhookHeadersTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetWebhookTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetWebhooksTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetWhatsAppConfigTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetWhatsappCampaignOverviewTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetWhatsappCampaignsCampaignsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetWhatsappCampaignsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetWhatsappEventReportEventsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/GetWhatsappEventReportTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/InlineResponse2001Test.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/InlineResponse2002Test.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/InlineResponse200Test.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/InlineResponse2011Test.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/InlineResponse2012Test.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/InlineResponse2013Test.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/InlineResponse2014Test.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/InlineResponse2015Test.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/InlineResponse201Test.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/InviteAdminUserPrivilegesTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/InviteAdminUserTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/InviteuserPrivilegesTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/InviteuserTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/ManageIpTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/MasterDetailsResponseBillingInfoAddressTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/MasterDetailsResponseBillingInfoNameTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/MasterDetailsResponseBillingInfoTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/MasterDetailsResponsePlanInfoFeaturesTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/MasterDetailsResponsePlanInfoTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/MasterDetailsResponseTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/NoteDataTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/NoteIdTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/NoteListTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/NoteTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/OrderBatchTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/OrderBillingTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/OrderProductsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/OrderTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/OtpTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/PipelineStageTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/PipelineTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/PipelinesTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/PostContactInfoContactsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/PostContactInfoTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/PostSendFailedTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/PostSendSmsTestFailedTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/PutRevokeUserPermissionTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/PutresendcancelinvitationTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/RemainingCreditModelChildTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/RemainingCreditModelResellerTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/RemainingCreditModelTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/RemoveContactFromListTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/RemoveCreditsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/RequestContactExportCustomContactFilterTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/RequestContactExportTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/RequestContactImportJsonBodyTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/RequestContactImportNewListTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/RequestContactImportTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/RequestSmsRecipientExportTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/ScheduleSmtpEmailTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/SendReportEmailTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/SendReportTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/SendSmsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/SendSmtpEmailAttachmentTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/SendSmtpEmailBccTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/SendSmtpEmailCcTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/SendSmtpEmailMessageVersionsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/SendSmtpEmailReplyTo1Test.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/SendSmtpEmailReplyToTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/SendSmtpEmailSenderTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/SendSmtpEmailTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/SendSmtpEmailTo1Test.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/SendSmtpEmailToTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/SendTestEmailTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/SendTestSmsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/SendTransacSmsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/SendWhatsappMessageTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/SsoTokenRequestTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/SubAccountAppsToggleRequestTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/SubAccountDetailsResponsePlanInfoCreditsEmailsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/SubAccountDetailsResponsePlanInfoCreditsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/SubAccountDetailsResponsePlanInfoFeaturesInboxTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/SubAccountDetailsResponsePlanInfoFeaturesLandingPageTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/SubAccountDetailsResponsePlanInfoFeaturesTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/SubAccountDetailsResponsePlanInfoFeaturesUsersTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/SubAccountDetailsResponsePlanInfoTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/SubAccountDetailsResponseTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/SubAccountUpdatePlanRequestCreditsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/SubAccountUpdatePlanRequestFeaturesTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/SubAccountUpdatePlanRequestTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/SubAccountsResponseSubAccountsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/SubAccountsResponseTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/TaskListTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/TaskReminderTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/TaskTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/TaskTypesTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/UpdateAttributeEnumerationTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/UpdateAttributeTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/UpdateBatchContactsContactsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/UpdateBatchContactsModelTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/UpdateBatchContactsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/UpdateCampaignStatusTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/UpdateChildAccountStatusTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/UpdateChildDomainTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/UpdateChildTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/UpdateContactTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/UpdateCouponCollectionTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/UpdateEmailCampaignRecipientsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/UpdateEmailCampaignSenderTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/UpdateEmailCampaignTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/UpdateExternalFeedTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/UpdateListTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/UpdateSenderTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/UpdateSmsCampaignTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/UpdateSmtpTemplateSenderTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/UpdateSmtpTemplateTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/UpdateWebhookTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/UpdateWhatsAppCampaignTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/UploadImageModelTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/UploadImageToGalleryTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/VariablesItemsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/WhatsappCampStatsTest.php create mode 100644 vendor/getbrevo/brevo-php/test/Model/WhatsappCampTemplateTest.php create mode 100644 vendor/guzzlehttp/guzzle/CHANGELOG.md create mode 100644 vendor/guzzlehttp/guzzle/LICENSE create mode 100644 vendor/guzzlehttp/guzzle/README.md create mode 100644 vendor/guzzlehttp/guzzle/UPGRADING.md create mode 100644 vendor/guzzlehttp/guzzle/composer.json create mode 100644 vendor/guzzlehttp/guzzle/src/BodySummarizer.php create mode 100644 vendor/guzzlehttp/guzzle/src/BodySummarizerInterface.php create mode 100644 vendor/guzzlehttp/guzzle/src/Client.php create mode 100644 vendor/guzzlehttp/guzzle/src/ClientInterface.php create mode 100644 vendor/guzzlehttp/guzzle/src/ClientTrait.php create mode 100644 vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php create mode 100644 vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php create mode 100644 vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php create mode 100644 vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php create mode 100644 vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php create mode 100644 vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php create mode 100644 vendor/guzzlehttp/guzzle/src/Exception/ClientException.php create mode 100644 vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php create mode 100644 vendor/guzzlehttp/guzzle/src/Exception/GuzzleException.php create mode 100644 vendor/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php create mode 100644 vendor/guzzlehttp/guzzle/src/Exception/RequestException.php create mode 100644 vendor/guzzlehttp/guzzle/src/Exception/ServerException.php create mode 100644 vendor/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php create mode 100644 vendor/guzzlehttp/guzzle/src/Exception/TransferException.php create mode 100644 vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php create mode 100644 vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php create mode 100644 vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php create mode 100644 vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php create mode 100644 vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php create mode 100644 vendor/guzzlehttp/guzzle/src/Handler/HeaderProcessor.php create mode 100644 vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php create mode 100644 vendor/guzzlehttp/guzzle/src/Handler/Proxy.php create mode 100644 vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php create mode 100644 vendor/guzzlehttp/guzzle/src/HandlerStack.php create mode 100644 vendor/guzzlehttp/guzzle/src/MessageFormatter.php create mode 100644 vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php create mode 100644 vendor/guzzlehttp/guzzle/src/Middleware.php create mode 100644 vendor/guzzlehttp/guzzle/src/Pool.php create mode 100644 vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php create mode 100644 vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php create mode 100644 vendor/guzzlehttp/guzzle/src/RequestOptions.php create mode 100644 vendor/guzzlehttp/guzzle/src/RetryMiddleware.php create mode 100644 vendor/guzzlehttp/guzzle/src/TransferStats.php create mode 100644 vendor/guzzlehttp/guzzle/src/Utils.php create mode 100644 vendor/guzzlehttp/guzzle/src/functions.php create mode 100644 vendor/guzzlehttp/guzzle/src/functions_include.php create mode 100644 vendor/guzzlehttp/promises/CHANGELOG.md create mode 100644 vendor/guzzlehttp/promises/LICENSE create mode 100644 vendor/guzzlehttp/promises/README.md create mode 100644 vendor/guzzlehttp/promises/composer.json create mode 100644 vendor/guzzlehttp/promises/src/AggregateException.php create mode 100644 vendor/guzzlehttp/promises/src/CancellationException.php create mode 100644 vendor/guzzlehttp/promises/src/Coroutine.php create mode 100644 vendor/guzzlehttp/promises/src/Create.php create mode 100644 vendor/guzzlehttp/promises/src/Each.php create mode 100644 vendor/guzzlehttp/promises/src/EachPromise.php create mode 100644 vendor/guzzlehttp/promises/src/FulfilledPromise.php create mode 100644 vendor/guzzlehttp/promises/src/Is.php create mode 100644 vendor/guzzlehttp/promises/src/Promise.php create mode 100644 vendor/guzzlehttp/promises/src/PromiseInterface.php create mode 100644 vendor/guzzlehttp/promises/src/PromisorInterface.php create mode 100644 vendor/guzzlehttp/promises/src/RejectedPromise.php create mode 100644 vendor/guzzlehttp/promises/src/RejectionException.php create mode 100644 vendor/guzzlehttp/promises/src/TaskQueue.php create mode 100644 vendor/guzzlehttp/promises/src/TaskQueueInterface.php create mode 100644 vendor/guzzlehttp/promises/src/Utils.php create mode 100644 vendor/guzzlehttp/psr7/CHANGELOG.md create mode 100644 vendor/guzzlehttp/psr7/LICENSE create mode 100644 vendor/guzzlehttp/psr7/README.md create mode 100644 vendor/guzzlehttp/psr7/composer.json create mode 100644 vendor/guzzlehttp/psr7/src/AppendStream.php create mode 100644 vendor/guzzlehttp/psr7/src/BufferStream.php create mode 100644 vendor/guzzlehttp/psr7/src/CachingStream.php create mode 100644 vendor/guzzlehttp/psr7/src/DroppingStream.php create mode 100644 vendor/guzzlehttp/psr7/src/Exception/MalformedUriException.php create mode 100644 vendor/guzzlehttp/psr7/src/FnStream.php create mode 100644 vendor/guzzlehttp/psr7/src/Header.php create mode 100644 vendor/guzzlehttp/psr7/src/HttpFactory.php create mode 100644 vendor/guzzlehttp/psr7/src/InflateStream.php create mode 100644 vendor/guzzlehttp/psr7/src/LazyOpenStream.php create mode 100644 vendor/guzzlehttp/psr7/src/LimitStream.php create mode 100644 vendor/guzzlehttp/psr7/src/Message.php create mode 100644 vendor/guzzlehttp/psr7/src/MessageTrait.php create mode 100644 vendor/guzzlehttp/psr7/src/MimeType.php create mode 100644 vendor/guzzlehttp/psr7/src/MultipartStream.php create mode 100644 vendor/guzzlehttp/psr7/src/NoSeekStream.php create mode 100644 vendor/guzzlehttp/psr7/src/PumpStream.php create mode 100644 vendor/guzzlehttp/psr7/src/Query.php create mode 100644 vendor/guzzlehttp/psr7/src/Request.php create mode 100644 vendor/guzzlehttp/psr7/src/Response.php create mode 100644 vendor/guzzlehttp/psr7/src/Rfc7230.php create mode 100644 vendor/guzzlehttp/psr7/src/ServerRequest.php create mode 100644 vendor/guzzlehttp/psr7/src/Stream.php create mode 100644 vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php create mode 100644 vendor/guzzlehttp/psr7/src/StreamWrapper.php create mode 100644 vendor/guzzlehttp/psr7/src/UploadedFile.php create mode 100644 vendor/guzzlehttp/psr7/src/Uri.php create mode 100644 vendor/guzzlehttp/psr7/src/UriComparator.php create mode 100644 vendor/guzzlehttp/psr7/src/UriNormalizer.php create mode 100644 vendor/guzzlehttp/psr7/src/UriResolver.php create mode 100644 vendor/guzzlehttp/psr7/src/Utils.php create mode 100644 vendor/psr/http-client/CHANGELOG.md create mode 100644 vendor/psr/http-client/LICENSE create mode 100644 vendor/psr/http-client/README.md create mode 100644 vendor/psr/http-client/composer.json create mode 100644 vendor/psr/http-client/src/ClientExceptionInterface.php create mode 100644 vendor/psr/http-client/src/ClientInterface.php create mode 100644 vendor/psr/http-client/src/NetworkExceptionInterface.php create mode 100644 vendor/psr/http-client/src/RequestExceptionInterface.php create mode 100644 vendor/psr/http-factory/LICENSE create mode 100644 vendor/psr/http-factory/README.md create mode 100644 vendor/psr/http-factory/composer.json create mode 100644 vendor/psr/http-factory/src/RequestFactoryInterface.php create mode 100644 vendor/psr/http-factory/src/ResponseFactoryInterface.php create mode 100644 vendor/psr/http-factory/src/ServerRequestFactoryInterface.php create mode 100644 vendor/psr/http-factory/src/StreamFactoryInterface.php create mode 100644 vendor/psr/http-factory/src/UploadedFileFactoryInterface.php create mode 100644 vendor/psr/http-factory/src/UriFactoryInterface.php create mode 100644 vendor/psr/http-message/CHANGELOG.md create mode 100644 vendor/psr/http-message/LICENSE create mode 100644 vendor/psr/http-message/README.md create mode 100644 vendor/psr/http-message/composer.json create mode 100644 vendor/psr/http-message/docs/PSR7-Interfaces.md create mode 100644 vendor/psr/http-message/docs/PSR7-Usage.md create mode 100644 vendor/psr/http-message/src/MessageInterface.php create mode 100644 vendor/psr/http-message/src/RequestInterface.php create mode 100644 vendor/psr/http-message/src/ResponseInterface.php create mode 100644 vendor/psr/http-message/src/ServerRequestInterface.php create mode 100644 vendor/psr/http-message/src/StreamInterface.php create mode 100644 vendor/psr/http-message/src/UploadedFileInterface.php create mode 100644 vendor/psr/http-message/src/UriInterface.php create mode 100644 vendor/ralouphie/getallheaders/LICENSE create mode 100644 vendor/ralouphie/getallheaders/README.md create mode 100644 vendor/ralouphie/getallheaders/composer.json create mode 100644 vendor/ralouphie/getallheaders/src/getallheaders.php diff --git a/composer.json b/composer.json index b490cfa..996de4b 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,8 @@ }, "require": { "php": "~8.1.0 || ~8.2.0 || ~8.3.0", - "getkirby/cms": "^4.0" + "getkirby/cms": "^4.0", + "getbrevo/brevo-php": "2.0.2" }, "config": { "allow-plugins": { diff --git a/composer.lock b/composer.lock index bded0d1..b6b3212 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "749a661738bcd5b9428c88a1da847bc7", + "content-hash": "e25e9c7b9b9173ae3dbcc7eb0d4fa982", "packages": [ { "name": "christian-riesen/base32", @@ -270,6 +270,69 @@ ], "time": "2023-11-03T12:00:00+00:00" }, + { + "name": "getbrevo/brevo-php", + "version": "v2.0.2", + "source": { + "type": "git", + "url": "https://github.com/getbrevo/brevo-php.git", + "reference": "d090995afd88ff9d6f1284d7f9adaff0c6a58949" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/getbrevo/brevo-php/zipball/d090995afd88ff9d6f1284d7f9adaff0c6a58949", + "reference": "d090995afd88ff9d6f1284d7f9adaff0c6a58949", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "ext-json": "*", + "ext-mbstring": "*", + "guzzlehttp/guzzle": "^7.4.0", + "php": ">=5.6" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "~1.12", + "phpunit/phpunit": "^4.8", + "squizlabs/php_codesniffer": "~2.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x.x-dev" + } + }, + "autoload": { + "psr-4": { + "Brevo\\Client\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brevo Developers", + "email": "contact@brevo.com", + "homepage": "https://www.brevo.com/" + } + ], + "description": "Official Brevo provided RESTFul API V3 php library", + "homepage": "https://github.com/getbrevo/brevo-php", + "keywords": [ + "api", + "brevo", + "php", + "sdk", + "swagger" + ], + "support": { + "issues": "https://github.com/getbrevo/brevo-php/issues", + "source": "https://github.com/getbrevo/brevo-php/tree/v2.0.2" + }, + "time": "2024-08-12T07:30:54+00:00" + }, { "name": "getkirby/cms", "version": "4.3.0", @@ -420,6 +483,331 @@ ], "time": "2020-12-28T12:54:39+00:00" }, + { + "name": "guzzlehttp/guzzle", + "version": "7.9.2", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "d281ed313b989f213357e3be1a179f02196ac99b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d281ed313b989f213357e3be1a179f02196ac99b", + "reference": "d281ed313b989f213357e3be1a179f02196ac99b", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/promises": "^1.5.3 || ^2.0.3", + "guzzlehttp/psr7": "^2.7.0", + "php": "^7.2.5 || ^8.0", + "psr/http-client": "^1.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0" + }, + "provide": { + "psr/http-client-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "ext-curl": "*", + "guzzle/client-integration-tests": "3.0.2", + "php-http/message-factory": "^1.1", + "phpunit/phpunit": "^8.5.39 || ^9.6.20", + "psr/log": "^1.1 || ^2.0 || ^3.0" + }, + "suggest": { + "ext-curl": "Required for CURL handler support", + "ext-intl": "Required for Internationalized Domain Name (IDN) support", + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "psr-18", + "psr-7", + "rest", + "web service" + ], + "support": { + "issues": "https://github.com/guzzle/guzzle/issues", + "source": "https://github.com/guzzle/guzzle/tree/7.9.2" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", + "type": "tidelift" + } + ], + "time": "2024-07-24T11:22:20+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8", + "reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.39 || ^9.6.20" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "support": { + "issues": "https://github.com/guzzle/promises/issues", + "source": "https://github.com/guzzle/promises/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", + "type": "tidelift" + } + ], + "time": "2024-07-18T10:29:17+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "2.7.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201", + "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.1 || ^2.0", + "ralouphie/getallheaders": "^3.0" + }, + "provide": { + "psr/http-factory-implementation": "1.0", + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "http-interop/http-factory-tests": "0.9.0", + "phpunit/phpunit": "^8.5.39 || ^9.6.20" + }, + "suggest": { + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "support": { + "issues": "https://github.com/guzzle/psr7/issues", + "source": "https://github.com/guzzle/psr7/tree/2.7.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", + "type": "tidelift" + } + ], + "time": "2024-07-18T11:15:46+00:00" + }, { "name": "laminas/laminas-escaper", "version": "2.13.0", @@ -678,6 +1066,166 @@ ], "time": "2023-11-25T22:23:28+00:00" }, + { + "name": "psr/http-client", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-client.git", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", + "keywords": [ + "http", + "http-client", + "psr", + "psr-18" + ], + "support": { + "source": "https://github.com/php-fig/http-client" + }, + "time": "2023-09-23T14:17:50+00:00" + }, + { + "name": "psr/http-factory", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-factory" + }, + "time": "2024-04-15T12:06:14+00:00" + }, + { + "name": "psr/http-message", + "version": "2.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/2.0" + }, + "time": "2023-04-04T09:54:51+00:00" + }, { "name": "psr/log", "version": "3.0.0", @@ -728,6 +1276,50 @@ }, "time": "2021-07-14T16:46:02+00:00" }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "support": { + "issues": "https://github.com/ralouphie/getallheaders/issues", + "source": "https://github.com/ralouphie/getallheaders/tree/develop" + }, + "time": "2019-03-08T08:55:37+00:00" + }, { "name": "symfony/deprecation-contracts", "version": "v3.5.0", diff --git a/site/config/config.php b/site/config/config.php index 7b49b56..a6f346a 100644 --- a/site/config/config.php +++ b/site/config/config.php @@ -37,6 +37,7 @@ return [ require_once(__DIR__ . '/routes/month-dates.php'), require_once(__DIR__ . '/routes/update-mapado-event.php'), require_once(__DIR__ . '/routes/mapado-fetch.php'), + require_once(__DIR__ . '/routes/brevo-create-contact.php'), ], 'hooks' => [ 'page.update:after' => require_once(__DIR__ . '/hooks/update-mapado-event.php') diff --git a/site/config/routes/brevo-create-contact.php b/site/config/routes/brevo-create-contact.php new file mode 100644 index 0000000..ce4cbdd --- /dev/null +++ b/site/config/routes/brevo-create-contact.php @@ -0,0 +1,45 @@ + + '/brevo-create-contact.json', + 'method' => 'POST', + 'action' => function () { + $jsonRequest = file_get_contents("php://input"); + $request = json_decode($jsonRequest, true); + + $email = $request['email']; + + $apiKey = site()->brevoApiKey()->value(); + + // Configure API key authorization: api-key + $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', $apiKey); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); + // Configure API key authorization: partner-key + $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', $apiKey); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + + $apiInstance = new Brevo\Client\Api\ContactsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config + ); + + $createContact = new \Brevo\Client\Model\CreateContact([ + 'email' => $email, + 'updateEnabled' => true, + ]); + + try { + $result = $apiInstance->createContact($createContact); + return json_encode($email . ' correctement ajouté à Brevo.'); + } catch (Exception $e) { + return json_encode('Exception when calling ContactsApi->createContact: ' . $e->getMessage()); + } + } +]; diff --git a/site/snippets/newsletter-section.php b/site/snippets/newsletter-section.php index 7e1545e..6a517f8 100644 --- a/site/snippets/newsletter-section.php +++ b/site/snippets/newsletter-section.php @@ -1,10 +1,44 @@

Newsletter

-
+

Inscrivez-vous à notre newsletter pour être tenue informé·e·s de nos dernières actualités !

- - + +
\ No newline at end of file diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index e47e258..c6909c7 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -8,6 +8,392 @@ $baseDir = dirname($vendorDir); return array( 'Base32\\Base32' => $vendorDir . '/christian-riesen/base32/src/Base32.php', 'Base32\\Base32Hex' => $vendorDir . '/christian-riesen/base32/src/Base32Hex.php', + 'Brevo\\Client\\ApiException' => $vendorDir . '/getbrevo/brevo-php/lib/ApiException.php', + 'Brevo\\Client\\Api\\AccountApi' => $vendorDir . '/getbrevo/brevo-php/lib/Api/AccountApi.php', + 'Brevo\\Client\\Api\\AttributesApi' => $vendorDir . '/getbrevo/brevo-php/lib/Api/AttributesApi.php', + 'Brevo\\Client\\Api\\CRMApi' => $vendorDir . '/getbrevo/brevo-php/lib/Api/CRMApi.php', + 'Brevo\\Client\\Api\\CompaniesApi' => $vendorDir . '/getbrevo/brevo-php/lib/Api/CompaniesApi.php', + 'Brevo\\Client\\Api\\ContactsApi' => $vendorDir . '/getbrevo/brevo-php/lib/Api/ContactsApi.php', + 'Brevo\\Client\\Api\\ConversationsApi' => $vendorDir . '/getbrevo/brevo-php/lib/Api/ConversationsApi.php', + 'Brevo\\Client\\Api\\CouponsApi' => $vendorDir . '/getbrevo/brevo-php/lib/Api/CouponsApi.php', + 'Brevo\\Client\\Api\\DealsApi' => $vendorDir . '/getbrevo/brevo-php/lib/Api/DealsApi.php', + 'Brevo\\Client\\Api\\DomainsApi' => $vendorDir . '/getbrevo/brevo-php/lib/Api/DomainsApi.php', + 'Brevo\\Client\\Api\\EcommerceApi' => $vendorDir . '/getbrevo/brevo-php/lib/Api/EcommerceApi.php', + 'Brevo\\Client\\Api\\EmailCampaignsApi' => $vendorDir . '/getbrevo/brevo-php/lib/Api/EmailCampaignsApi.php', + 'Brevo\\Client\\Api\\EventsApi' => $vendorDir . '/getbrevo/brevo-php/lib/Api/EventsApi.php', + 'Brevo\\Client\\Api\\ExternalFeedsApi' => $vendorDir . '/getbrevo/brevo-php/lib/Api/ExternalFeedsApi.php', + 'Brevo\\Client\\Api\\FilesApi' => $vendorDir . '/getbrevo/brevo-php/lib/Api/FilesApi.php', + 'Brevo\\Client\\Api\\FoldersApi' => $vendorDir . '/getbrevo/brevo-php/lib/Api/FoldersApi.php', + 'Brevo\\Client\\Api\\InboundParsingApi' => $vendorDir . '/getbrevo/brevo-php/lib/Api/InboundParsingApi.php', + 'Brevo\\Client\\Api\\ListsApi' => $vendorDir . '/getbrevo/brevo-php/lib/Api/ListsApi.php', + 'Brevo\\Client\\Api\\MasterAccountApi' => $vendorDir . '/getbrevo/brevo-php/lib/Api/MasterAccountApi.php', + 'Brevo\\Client\\Api\\NotesApi' => $vendorDir . '/getbrevo/brevo-php/lib/Api/NotesApi.php', + 'Brevo\\Client\\Api\\ProcessApi' => $vendorDir . '/getbrevo/brevo-php/lib/Api/ProcessApi.php', + 'Brevo\\Client\\Api\\ResellerApi' => $vendorDir . '/getbrevo/brevo-php/lib/Api/ResellerApi.php', + 'Brevo\\Client\\Api\\SMSCampaignsApi' => $vendorDir . '/getbrevo/brevo-php/lib/Api/SMSCampaignsApi.php', + 'Brevo\\Client\\Api\\SendersApi' => $vendorDir . '/getbrevo/brevo-php/lib/Api/SendersApi.php', + 'Brevo\\Client\\Api\\TasksApi' => $vendorDir . '/getbrevo/brevo-php/lib/Api/TasksApi.php', + 'Brevo\\Client\\Api\\TransactionalEmailsApi' => $vendorDir . '/getbrevo/brevo-php/lib/Api/TransactionalEmailsApi.php', + 'Brevo\\Client\\Api\\TransactionalSMSApi' => $vendorDir . '/getbrevo/brevo-php/lib/Api/TransactionalSMSApi.php', + 'Brevo\\Client\\Api\\TransactionalWhatsAppApi' => $vendorDir . '/getbrevo/brevo-php/lib/Api/TransactionalWhatsAppApi.php', + 'Brevo\\Client\\Api\\UserApi' => $vendorDir . '/getbrevo/brevo-php/lib/Api/UserApi.php', + 'Brevo\\Client\\Api\\WebhooksApi' => $vendorDir . '/getbrevo/brevo-php/lib/Api/WebhooksApi.php', + 'Brevo\\Client\\Api\\WhatsAppCampaignsApi' => $vendorDir . '/getbrevo/brevo-php/lib/Api/WhatsAppCampaignsApi.php', + 'Brevo\\Client\\Configuration' => $vendorDir . '/getbrevo/brevo-php/lib/Configuration.php', + 'Brevo\\Client\\HeaderSelector' => $vendorDir . '/getbrevo/brevo-php/lib/HeaderSelector.php', + 'Brevo\\Client\\Model\\AbTestCampaignResult' => $vendorDir . '/getbrevo/brevo-php/lib/Model/AbTestCampaignResult.php', + 'Brevo\\Client\\Model\\AbTestCampaignResultClickedLinks' => $vendorDir . '/getbrevo/brevo-php/lib/Model/AbTestCampaignResultClickedLinks.php', + 'Brevo\\Client\\Model\\AbTestCampaignResultStatistics' => $vendorDir . '/getbrevo/brevo-php/lib/Model/AbTestCampaignResultStatistics.php', + 'Brevo\\Client\\Model\\AbTestVersionClicks' => $vendorDir . '/getbrevo/brevo-php/lib/Model/AbTestVersionClicks.php', + 'Brevo\\Client\\Model\\AbTestVersionClicksInner' => $vendorDir . '/getbrevo/brevo-php/lib/Model/AbTestVersionClicksInner.php', + 'Brevo\\Client\\Model\\AbTestVersionStats' => $vendorDir . '/getbrevo/brevo-php/lib/Model/AbTestVersionStats.php', + 'Brevo\\Client\\Model\\AddChildDomain' => $vendorDir . '/getbrevo/brevo-php/lib/Model/AddChildDomain.php', + 'Brevo\\Client\\Model\\AddContactToList' => $vendorDir . '/getbrevo/brevo-php/lib/Model/AddContactToList.php', + 'Brevo\\Client\\Model\\AddCredits' => $vendorDir . '/getbrevo/brevo-php/lib/Model/AddCredits.php', + 'Brevo\\Client\\Model\\AuthenticateDomainModel' => $vendorDir . '/getbrevo/brevo-php/lib/Model/AuthenticateDomainModel.php', + 'Brevo\\Client\\Model\\BlockDomain' => $vendorDir . '/getbrevo/brevo-php/lib/Model/BlockDomain.php', + 'Brevo\\Client\\Model\\Body' => $vendorDir . '/getbrevo/brevo-php/lib/Model/Body.php', + 'Brevo\\Client\\Model\\Body1' => $vendorDir . '/getbrevo/brevo-php/lib/Model/Body1.php', + 'Brevo\\Client\\Model\\Body10' => $vendorDir . '/getbrevo/brevo-php/lib/Model/Body10.php', + 'Brevo\\Client\\Model\\Body11' => $vendorDir . '/getbrevo/brevo-php/lib/Model/Body11.php', + 'Brevo\\Client\\Model\\Body12' => $vendorDir . '/getbrevo/brevo-php/lib/Model/Body12.php', + 'Brevo\\Client\\Model\\Body13' => $vendorDir . '/getbrevo/brevo-php/lib/Model/Body13.php', + 'Brevo\\Client\\Model\\Body14' => $vendorDir . '/getbrevo/brevo-php/lib/Model/Body14.php', + 'Brevo\\Client\\Model\\Body2' => $vendorDir . '/getbrevo/brevo-php/lib/Model/Body2.php', + 'Brevo\\Client\\Model\\Body3' => $vendorDir . '/getbrevo/brevo-php/lib/Model/Body3.php', + 'Brevo\\Client\\Model\\Body4' => $vendorDir . '/getbrevo/brevo-php/lib/Model/Body4.php', + 'Brevo\\Client\\Model\\Body5' => $vendorDir . '/getbrevo/brevo-php/lib/Model/Body5.php', + 'Brevo\\Client\\Model\\Body6' => $vendorDir . '/getbrevo/brevo-php/lib/Model/Body6.php', + 'Brevo\\Client\\Model\\Body7' => $vendorDir . '/getbrevo/brevo-php/lib/Model/Body7.php', + 'Brevo\\Client\\Model\\Body8' => $vendorDir . '/getbrevo/brevo-php/lib/Model/Body8.php', + 'Brevo\\Client\\Model\\Body9' => $vendorDir . '/getbrevo/brevo-php/lib/Model/Body9.php', + 'Brevo\\Client\\Model\\BodyVariablesItems' => $vendorDir . '/getbrevo/brevo-php/lib/Model/BodyVariablesItems.php', + 'Brevo\\Client\\Model\\CompaniesList' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CompaniesList.php', + 'Brevo\\Client\\Model\\Company' => $vendorDir . '/getbrevo/brevo-php/lib/Model/Company.php', + 'Brevo\\Client\\Model\\CompanyAttributes' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CompanyAttributes.php', + 'Brevo\\Client\\Model\\CompanyAttributesInner' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CompanyAttributesInner.php', + 'Brevo\\Client\\Model\\ComponentItems' => $vendorDir . '/getbrevo/brevo-php/lib/Model/ComponentItems.php', + 'Brevo\\Client\\Model\\Contact' => $vendorDir . '/getbrevo/brevo-php/lib/Model/Contact.php', + 'Brevo\\Client\\Model\\ConversationsMessage' => $vendorDir . '/getbrevo/brevo-php/lib/Model/ConversationsMessage.php', + 'Brevo\\Client\\Model\\ConversationsMessageFile' => $vendorDir . '/getbrevo/brevo-php/lib/Model/ConversationsMessageFile.php', + 'Brevo\\Client\\Model\\ConversationsMessageFileImageInfo' => $vendorDir . '/getbrevo/brevo-php/lib/Model/ConversationsMessageFileImageInfo.php', + 'Brevo\\Client\\Model\\CreateApiKeyRequest' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateApiKeyRequest.php', + 'Brevo\\Client\\Model\\CreateApiKeyResponse' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateApiKeyResponse.php', + 'Brevo\\Client\\Model\\CreateAttribute' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateAttribute.php', + 'Brevo\\Client\\Model\\CreateAttributeEnumeration' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateAttributeEnumeration.php', + 'Brevo\\Client\\Model\\CreateCategoryModel' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateCategoryModel.php', + 'Brevo\\Client\\Model\\CreateChild' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateChild.php', + 'Brevo\\Client\\Model\\CreateContact' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateContact.php', + 'Brevo\\Client\\Model\\CreateCouponCollection' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateCouponCollection.php', + 'Brevo\\Client\\Model\\CreateCoupons' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateCoupons.php', + 'Brevo\\Client\\Model\\CreateDoiContact' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateDoiContact.php', + 'Brevo\\Client\\Model\\CreateDomain' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateDomain.php', + 'Brevo\\Client\\Model\\CreateDomainModel' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateDomainModel.php', + 'Brevo\\Client\\Model\\CreateDomainModelDnsRecords' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateDomainModelDnsRecords.php', + 'Brevo\\Client\\Model\\CreateDomainModelDnsRecordsDkimRecord' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateDomainModelDnsRecordsDkimRecord.php', + 'Brevo\\Client\\Model\\CreateEmailCampaign' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateEmailCampaign.php', + 'Brevo\\Client\\Model\\CreateEmailCampaignRecipients' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateEmailCampaignRecipients.php', + 'Brevo\\Client\\Model\\CreateEmailCampaignSender' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateEmailCampaignSender.php', + 'Brevo\\Client\\Model\\CreateExternalFeed' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateExternalFeed.php', + 'Brevo\\Client\\Model\\CreateList' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateList.php', + 'Brevo\\Client\\Model\\CreateModel' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateModel.php', + 'Brevo\\Client\\Model\\CreateProductModel' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateProductModel.php', + 'Brevo\\Client\\Model\\CreateReseller' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateReseller.php', + 'Brevo\\Client\\Model\\CreateSender' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateSender.php', + 'Brevo\\Client\\Model\\CreateSenderIps' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateSenderIps.php', + 'Brevo\\Client\\Model\\CreateSenderModel' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateSenderModel.php', + 'Brevo\\Client\\Model\\CreateSmsCampaign' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateSmsCampaign.php', + 'Brevo\\Client\\Model\\CreateSmsCampaignRecipients' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateSmsCampaignRecipients.php', + 'Brevo\\Client\\Model\\CreateSmtpEmail' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateSmtpEmail.php', + 'Brevo\\Client\\Model\\CreateSmtpTemplate' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateSmtpTemplate.php', + 'Brevo\\Client\\Model\\CreateSmtpTemplateSender' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateSmtpTemplateSender.php', + 'Brevo\\Client\\Model\\CreateSubAccount' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateSubAccount.php', + 'Brevo\\Client\\Model\\CreateSubAccountResponse' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateSubAccountResponse.php', + 'Brevo\\Client\\Model\\CreateUpdateBatchCategory' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateUpdateBatchCategory.php', + 'Brevo\\Client\\Model\\CreateUpdateBatchCategoryModel' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateUpdateBatchCategoryModel.php', + 'Brevo\\Client\\Model\\CreateUpdateBatchProducts' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateUpdateBatchProducts.php', + 'Brevo\\Client\\Model\\CreateUpdateBatchProductsModel' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateUpdateBatchProductsModel.php', + 'Brevo\\Client\\Model\\CreateUpdateCategories' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateUpdateCategories.php', + 'Brevo\\Client\\Model\\CreateUpdateCategory' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateUpdateCategory.php', + 'Brevo\\Client\\Model\\CreateUpdateContactModel' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateUpdateContactModel.php', + 'Brevo\\Client\\Model\\CreateUpdateFolder' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateUpdateFolder.php', + 'Brevo\\Client\\Model\\CreateUpdateProduct' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateUpdateProduct.php', + 'Brevo\\Client\\Model\\CreateUpdateProducts' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateUpdateProducts.php', + 'Brevo\\Client\\Model\\CreateWebhook' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateWebhook.php', + 'Brevo\\Client\\Model\\CreateWhatsAppCampaign' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateWhatsAppCampaign.php', + 'Brevo\\Client\\Model\\CreateWhatsAppCampaignRecipients' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateWhatsAppCampaignRecipients.php', + 'Brevo\\Client\\Model\\CreateWhatsAppTemplate' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreateWhatsAppTemplate.php', + 'Brevo\\Client\\Model\\CreatedBatchId' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreatedBatchId.php', + 'Brevo\\Client\\Model\\CreatedProcessId' => $vendorDir . '/getbrevo/brevo-php/lib/Model/CreatedProcessId.php', + 'Brevo\\Client\\Model\\Deal' => $vendorDir . '/getbrevo/brevo-php/lib/Model/Deal.php', + 'Brevo\\Client\\Model\\DealAttributes' => $vendorDir . '/getbrevo/brevo-php/lib/Model/DealAttributes.php', + 'Brevo\\Client\\Model\\DealAttributesInner' => $vendorDir . '/getbrevo/brevo-php/lib/Model/DealAttributesInner.php', + 'Brevo\\Client\\Model\\DealsList' => $vendorDir . '/getbrevo/brevo-php/lib/Model/DealsList.php', + 'Brevo\\Client\\Model\\DeleteHardbounces' => $vendorDir . '/getbrevo/brevo-php/lib/Model/DeleteHardbounces.php', + 'Brevo\\Client\\Model\\EmailExportRecipients' => $vendorDir . '/getbrevo/brevo-php/lib/Model/EmailExportRecipients.php', + 'Brevo\\Client\\Model\\ErrorModel' => $vendorDir . '/getbrevo/brevo-php/lib/Model/ErrorModel.php', + 'Brevo\\Client\\Model\\Event' => $vendorDir . '/getbrevo/brevo-php/lib/Model/Event.php', + 'Brevo\\Client\\Model\\EventIdentifiers' => $vendorDir . '/getbrevo/brevo-php/lib/Model/EventIdentifiers.php', + 'Brevo\\Client\\Model\\ExportWebhooksHistory' => $vendorDir . '/getbrevo/brevo-php/lib/Model/ExportWebhooksHistory.php', + 'Brevo\\Client\\Model\\FileData' => $vendorDir . '/getbrevo/brevo-php/lib/Model/FileData.php', + 'Brevo\\Client\\Model\\FileDownloadableLink' => $vendorDir . '/getbrevo/brevo-php/lib/Model/FileDownloadableLink.php', + 'Brevo\\Client\\Model\\FileList' => $vendorDir . '/getbrevo/brevo-php/lib/Model/FileList.php', + 'Brevo\\Client\\Model\\GetAccount' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetAccount.php', + 'Brevo\\Client\\Model\\GetAccountActivity' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetAccountActivity.php', + 'Brevo\\Client\\Model\\GetAccountActivityLogs' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetAccountActivityLogs.php', + 'Brevo\\Client\\Model\\GetAccountMarketingAutomation' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetAccountMarketingAutomation.php', + 'Brevo\\Client\\Model\\GetAccountPlan' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetAccountPlan.php', + 'Brevo\\Client\\Model\\GetAccountRelay' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetAccountRelay.php', + 'Brevo\\Client\\Model\\GetAccountRelayData' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetAccountRelayData.php', + 'Brevo\\Client\\Model\\GetAggregatedReport' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetAggregatedReport.php', + 'Brevo\\Client\\Model\\GetAllExternalFeeds' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetAllExternalFeeds.php', + 'Brevo\\Client\\Model\\GetAllExternalFeedsFeeds' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetAllExternalFeedsFeeds.php', + 'Brevo\\Client\\Model\\GetAttributes' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetAttributes.php', + 'Brevo\\Client\\Model\\GetAttributesAttributes' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetAttributesAttributes.php', + 'Brevo\\Client\\Model\\GetAttributesEnumeration' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetAttributesEnumeration.php', + 'Brevo\\Client\\Model\\GetBlockedDomains' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetBlockedDomains.php', + 'Brevo\\Client\\Model\\GetCampaignOverview' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetCampaignOverview.php', + 'Brevo\\Client\\Model\\GetCampaignRecipients' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetCampaignRecipients.php', + 'Brevo\\Client\\Model\\GetCampaignStats' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetCampaignStats.php', + 'Brevo\\Client\\Model\\GetCategories' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetCategories.php', + 'Brevo\\Client\\Model\\GetCategoryDetails' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetCategoryDetails.php', + 'Brevo\\Client\\Model\\GetChildAccountCreationStatus' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetChildAccountCreationStatus.php', + 'Brevo\\Client\\Model\\GetChildDomain' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetChildDomain.php', + 'Brevo\\Client\\Model\\GetChildDomains' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetChildDomains.php', + 'Brevo\\Client\\Model\\GetChildInfo' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetChildInfo.php', + 'Brevo\\Client\\Model\\GetChildInfoApiKeys' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetChildInfoApiKeys.php', + 'Brevo\\Client\\Model\\GetChildInfoApiKeysV2' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetChildInfoApiKeysV2.php', + 'Brevo\\Client\\Model\\GetChildInfoApiKeysV3' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetChildInfoApiKeysV3.php', + 'Brevo\\Client\\Model\\GetChildInfoCredits' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetChildInfoCredits.php', + 'Brevo\\Client\\Model\\GetChildInfoStatistics' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetChildInfoStatistics.php', + 'Brevo\\Client\\Model\\GetChildrenList' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetChildrenList.php', + 'Brevo\\Client\\Model\\GetClient' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetClient.php', + 'Brevo\\Client\\Model\\GetContactCampaignStats' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetContactCampaignStats.php', + 'Brevo\\Client\\Model\\GetContactCampaignStatsClicked' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetContactCampaignStatsClicked.php', + 'Brevo\\Client\\Model\\GetContactCampaignStatsOpened' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetContactCampaignStatsOpened.php', + 'Brevo\\Client\\Model\\GetContactCampaignStatsTransacAttributes' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetContactCampaignStatsTransacAttributes.php', + 'Brevo\\Client\\Model\\GetContactCampaignStatsUnsubscriptions' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetContactCampaignStatsUnsubscriptions.php', + 'Brevo\\Client\\Model\\GetContactDetails' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetContactDetails.php', + 'Brevo\\Client\\Model\\GetContacts' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetContacts.php', + 'Brevo\\Client\\Model\\GetCorporateInvitedUsersList' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetCorporateInvitedUsersList.php', + 'Brevo\\Client\\Model\\GetCorporateInvitedUsersListFeatureAccess' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetCorporateInvitedUsersListFeatureAccess.php', + 'Brevo\\Client\\Model\\GetCorporateInvitedUsersListGroups' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetCorporateInvitedUsersListGroups.php', + 'Brevo\\Client\\Model\\GetCorporateInvitedUsersListUsers' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetCorporateInvitedUsersListUsers.php', + 'Brevo\\Client\\Model\\GetCouponCollection' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetCouponCollection.php', + 'Brevo\\Client\\Model\\GetDeviceBrowserStats' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetDeviceBrowserStats.php', + 'Brevo\\Client\\Model\\GetDomainConfigurationModel' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetDomainConfigurationModel.php', + 'Brevo\\Client\\Model\\GetDomainsList' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetDomainsList.php', + 'Brevo\\Client\\Model\\GetDomainsListDomains' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetDomainsListDomains.php', + 'Brevo\\Client\\Model\\GetEmailCampaign' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetEmailCampaign.php', + 'Brevo\\Client\\Model\\GetEmailCampaigns' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetEmailCampaigns.php', + 'Brevo\\Client\\Model\\GetEmailEventReport' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetEmailEventReport.php', + 'Brevo\\Client\\Model\\GetEmailEventReportEvents' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetEmailEventReportEvents.php', + 'Brevo\\Client\\Model\\GetExtendedCampaignOverview' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetExtendedCampaignOverview.php', + 'Brevo\\Client\\Model\\GetExtendedCampaignOverviewSender' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetExtendedCampaignOverviewSender.php', + 'Brevo\\Client\\Model\\GetExtendedCampaignStats' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetExtendedCampaignStats.php', + 'Brevo\\Client\\Model\\GetExtendedCampaignStatsGlobalStats' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetExtendedCampaignStatsGlobalStats.php', + 'Brevo\\Client\\Model\\GetExtendedClient' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetExtendedClient.php', + 'Brevo\\Client\\Model\\GetExtendedClientAddress' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetExtendedClientAddress.php', + 'Brevo\\Client\\Model\\GetExtendedContactDetails' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetExtendedContactDetails.php', + 'Brevo\\Client\\Model\\GetExtendedContactDetailsStatistics' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatistics.php', + 'Brevo\\Client\\Model\\GetExtendedContactDetailsStatisticsClicked' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsClicked.php', + 'Brevo\\Client\\Model\\GetExtendedContactDetailsStatisticsDelivered' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsDelivered.php', + 'Brevo\\Client\\Model\\GetExtendedContactDetailsStatisticsLinks' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsLinks.php', + 'Brevo\\Client\\Model\\GetExtendedContactDetailsStatisticsMessagesSent' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsMessagesSent.php', + 'Brevo\\Client\\Model\\GetExtendedContactDetailsStatisticsOpened' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsOpened.php', + 'Brevo\\Client\\Model\\GetExtendedContactDetailsStatisticsUnsubscriptions' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsUnsubscriptions.php', + 'Brevo\\Client\\Model\\GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.php', + 'Brevo\\Client\\Model\\GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.php', + 'Brevo\\Client\\Model\\GetExtendedList' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetExtendedList.php', + 'Brevo\\Client\\Model\\GetExtendedListCampaignStats' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetExtendedListCampaignStats.php', + 'Brevo\\Client\\Model\\GetExternalFeedByUUID' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetExternalFeedByUUID.php', + 'Brevo\\Client\\Model\\GetExternalFeedByUUIDHeaders' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetExternalFeedByUUIDHeaders.php', + 'Brevo\\Client\\Model\\GetFolder' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetFolder.php', + 'Brevo\\Client\\Model\\GetFolderLists' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetFolderLists.php', + 'Brevo\\Client\\Model\\GetFolders' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetFolders.php', + 'Brevo\\Client\\Model\\GetInboundEmailEvents' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetInboundEmailEvents.php', + 'Brevo\\Client\\Model\\GetInboundEmailEventsByUuid' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetInboundEmailEventsByUuid.php', + 'Brevo\\Client\\Model\\GetInboundEmailEventsByUuidAttachments' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetInboundEmailEventsByUuidAttachments.php', + 'Brevo\\Client\\Model\\GetInboundEmailEventsByUuidLogs' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetInboundEmailEventsByUuidLogs.php', + 'Brevo\\Client\\Model\\GetInboundEmailEventsEvents' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetInboundEmailEventsEvents.php', + 'Brevo\\Client\\Model\\GetInvitedUsersList' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetInvitedUsersList.php', + 'Brevo\\Client\\Model\\GetInvitedUsersListFeatureAccess' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetInvitedUsersListFeatureAccess.php', + 'Brevo\\Client\\Model\\GetInvitedUsersListUsers' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetInvitedUsersListUsers.php', + 'Brevo\\Client\\Model\\GetIp' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetIp.php', + 'Brevo\\Client\\Model\\GetIpFromSender' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetIpFromSender.php', + 'Brevo\\Client\\Model\\GetIps' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetIps.php', + 'Brevo\\Client\\Model\\GetIpsFromSender' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetIpsFromSender.php', + 'Brevo\\Client\\Model\\GetList' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetList.php', + 'Brevo\\Client\\Model\\GetLists' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetLists.php', + 'Brevo\\Client\\Model\\GetOrders' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetOrders.php', + 'Brevo\\Client\\Model\\GetProcess' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetProcess.php', + 'Brevo\\Client\\Model\\GetProcesses' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetProcesses.php', + 'Brevo\\Client\\Model\\GetProductDetails' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetProductDetails.php', + 'Brevo\\Client\\Model\\GetProducts' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetProducts.php', + 'Brevo\\Client\\Model\\GetReports' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetReports.php', + 'Brevo\\Client\\Model\\GetReportsReports' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetReportsReports.php', + 'Brevo\\Client\\Model\\GetScheduledEmailByBatchId' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetScheduledEmailByBatchId.php', + 'Brevo\\Client\\Model\\GetScheduledEmailByBatchIdBatches' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetScheduledEmailByBatchIdBatches.php', + 'Brevo\\Client\\Model\\GetScheduledEmailByMessageId' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetScheduledEmailByMessageId.php', + 'Brevo\\Client\\Model\\GetSegments' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetSegments.php', + 'Brevo\\Client\\Model\\GetSegmentsSegments' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetSegmentsSegments.php', + 'Brevo\\Client\\Model\\GetSendersList' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetSendersList.php', + 'Brevo\\Client\\Model\\GetSendersListIps' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetSendersListIps.php', + 'Brevo\\Client\\Model\\GetSendersListSenders' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetSendersListSenders.php', + 'Brevo\\Client\\Model\\GetSharedTemplateUrl' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetSharedTemplateUrl.php', + 'Brevo\\Client\\Model\\GetSmsCampaign' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetSmsCampaign.php', + 'Brevo\\Client\\Model\\GetSmsCampaignOverview' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetSmsCampaignOverview.php', + 'Brevo\\Client\\Model\\GetSmsCampaignRecipients' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetSmsCampaignRecipients.php', + 'Brevo\\Client\\Model\\GetSmsCampaignStats' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetSmsCampaignStats.php', + 'Brevo\\Client\\Model\\GetSmsCampaigns' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetSmsCampaigns.php', + 'Brevo\\Client\\Model\\GetSmsEventReport' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetSmsEventReport.php', + 'Brevo\\Client\\Model\\GetSmsEventReportEvents' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetSmsEventReportEvents.php', + 'Brevo\\Client\\Model\\GetSmtpTemplateOverview' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetSmtpTemplateOverview.php', + 'Brevo\\Client\\Model\\GetSmtpTemplateOverviewSender' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetSmtpTemplateOverviewSender.php', + 'Brevo\\Client\\Model\\GetSmtpTemplates' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetSmtpTemplates.php', + 'Brevo\\Client\\Model\\GetSsoToken' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetSsoToken.php', + 'Brevo\\Client\\Model\\GetStatsByBrowser' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetStatsByBrowser.php', + 'Brevo\\Client\\Model\\GetStatsByDevice' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetStatsByDevice.php', + 'Brevo\\Client\\Model\\GetStatsByDomain' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetStatsByDomain.php', + 'Brevo\\Client\\Model\\GetTransacAggregatedSmsReport' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetTransacAggregatedSmsReport.php', + 'Brevo\\Client\\Model\\GetTransacBlockedContacts' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetTransacBlockedContacts.php', + 'Brevo\\Client\\Model\\GetTransacBlockedContactsContacts' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetTransacBlockedContactsContacts.php', + 'Brevo\\Client\\Model\\GetTransacBlockedContactsReason' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetTransacBlockedContactsReason.php', + 'Brevo\\Client\\Model\\GetTransacEmailContent' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetTransacEmailContent.php', + 'Brevo\\Client\\Model\\GetTransacEmailContentEvents' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetTransacEmailContentEvents.php', + 'Brevo\\Client\\Model\\GetTransacEmailsList' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetTransacEmailsList.php', + 'Brevo\\Client\\Model\\GetTransacEmailsListTransactionalEmails' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetTransacEmailsListTransactionalEmails.php', + 'Brevo\\Client\\Model\\GetTransacSmsReport' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetTransacSmsReport.php', + 'Brevo\\Client\\Model\\GetTransacSmsReportReports' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetTransacSmsReportReports.php', + 'Brevo\\Client\\Model\\GetUserPermission' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetUserPermission.php', + 'Brevo\\Client\\Model\\GetUserPermissionPrivileges' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetUserPermissionPrivileges.php', + 'Brevo\\Client\\Model\\GetWATemplates' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetWATemplates.php', + 'Brevo\\Client\\Model\\GetWATemplatesTemplates' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetWATemplatesTemplates.php', + 'Brevo\\Client\\Model\\GetWebhook' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetWebhook.php', + 'Brevo\\Client\\Model\\GetWebhookAuth' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetWebhookAuth.php', + 'Brevo\\Client\\Model\\GetWebhookHeaders' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetWebhookHeaders.php', + 'Brevo\\Client\\Model\\GetWebhooks' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetWebhooks.php', + 'Brevo\\Client\\Model\\GetWhatsAppConfig' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetWhatsAppConfig.php', + 'Brevo\\Client\\Model\\GetWhatsappCampaignOverview' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetWhatsappCampaignOverview.php', + 'Brevo\\Client\\Model\\GetWhatsappCampaigns' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetWhatsappCampaigns.php', + 'Brevo\\Client\\Model\\GetWhatsappCampaignsCampaigns' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetWhatsappCampaignsCampaigns.php', + 'Brevo\\Client\\Model\\GetWhatsappEventReport' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetWhatsappEventReport.php', + 'Brevo\\Client\\Model\\GetWhatsappEventReportEvents' => $vendorDir . '/getbrevo/brevo-php/lib/Model/GetWhatsappEventReportEvents.php', + 'Brevo\\Client\\Model\\InlineResponse200' => $vendorDir . '/getbrevo/brevo-php/lib/Model/InlineResponse200.php', + 'Brevo\\Client\\Model\\InlineResponse2001' => $vendorDir . '/getbrevo/brevo-php/lib/Model/InlineResponse2001.php', + 'Brevo\\Client\\Model\\InlineResponse2002' => $vendorDir . '/getbrevo/brevo-php/lib/Model/InlineResponse2002.php', + 'Brevo\\Client\\Model\\InlineResponse201' => $vendorDir . '/getbrevo/brevo-php/lib/Model/InlineResponse201.php', + 'Brevo\\Client\\Model\\InlineResponse2011' => $vendorDir . '/getbrevo/brevo-php/lib/Model/InlineResponse2011.php', + 'Brevo\\Client\\Model\\InlineResponse2012' => $vendorDir . '/getbrevo/brevo-php/lib/Model/InlineResponse2012.php', + 'Brevo\\Client\\Model\\InlineResponse2013' => $vendorDir . '/getbrevo/brevo-php/lib/Model/InlineResponse2013.php', + 'Brevo\\Client\\Model\\InlineResponse2014' => $vendorDir . '/getbrevo/brevo-php/lib/Model/InlineResponse2014.php', + 'Brevo\\Client\\Model\\InlineResponse2015' => $vendorDir . '/getbrevo/brevo-php/lib/Model/InlineResponse2015.php', + 'Brevo\\Client\\Model\\InviteAdminUser' => $vendorDir . '/getbrevo/brevo-php/lib/Model/InviteAdminUser.php', + 'Brevo\\Client\\Model\\InviteAdminUserPrivileges' => $vendorDir . '/getbrevo/brevo-php/lib/Model/InviteAdminUserPrivileges.php', + 'Brevo\\Client\\Model\\Inviteuser' => $vendorDir . '/getbrevo/brevo-php/lib/Model/Inviteuser.php', + 'Brevo\\Client\\Model\\InviteuserPrivileges' => $vendorDir . '/getbrevo/brevo-php/lib/Model/InviteuserPrivileges.php', + 'Brevo\\Client\\Model\\ManageIp' => $vendorDir . '/getbrevo/brevo-php/lib/Model/ManageIp.php', + 'Brevo\\Client\\Model\\MasterDetailsResponse' => $vendorDir . '/getbrevo/brevo-php/lib/Model/MasterDetailsResponse.php', + 'Brevo\\Client\\Model\\MasterDetailsResponseBillingInfo' => $vendorDir . '/getbrevo/brevo-php/lib/Model/MasterDetailsResponseBillingInfo.php', + 'Brevo\\Client\\Model\\MasterDetailsResponseBillingInfoAddress' => $vendorDir . '/getbrevo/brevo-php/lib/Model/MasterDetailsResponseBillingInfoAddress.php', + 'Brevo\\Client\\Model\\MasterDetailsResponseBillingInfoName' => $vendorDir . '/getbrevo/brevo-php/lib/Model/MasterDetailsResponseBillingInfoName.php', + 'Brevo\\Client\\Model\\MasterDetailsResponsePlanInfo' => $vendorDir . '/getbrevo/brevo-php/lib/Model/MasterDetailsResponsePlanInfo.php', + 'Brevo\\Client\\Model\\MasterDetailsResponsePlanInfoFeatures' => $vendorDir . '/getbrevo/brevo-php/lib/Model/MasterDetailsResponsePlanInfoFeatures.php', + 'Brevo\\Client\\Model\\ModelInterface' => $vendorDir . '/getbrevo/brevo-php/lib/Model/ModelInterface.php', + 'Brevo\\Client\\Model\\Note' => $vendorDir . '/getbrevo/brevo-php/lib/Model/Note.php', + 'Brevo\\Client\\Model\\NoteData' => $vendorDir . '/getbrevo/brevo-php/lib/Model/NoteData.php', + 'Brevo\\Client\\Model\\NoteId' => $vendorDir . '/getbrevo/brevo-php/lib/Model/NoteId.php', + 'Brevo\\Client\\Model\\NoteList' => $vendorDir . '/getbrevo/brevo-php/lib/Model/NoteList.php', + 'Brevo\\Client\\Model\\Order' => $vendorDir . '/getbrevo/brevo-php/lib/Model/Order.php', + 'Brevo\\Client\\Model\\OrderBatch' => $vendorDir . '/getbrevo/brevo-php/lib/Model/OrderBatch.php', + 'Brevo\\Client\\Model\\OrderBilling' => $vendorDir . '/getbrevo/brevo-php/lib/Model/OrderBilling.php', + 'Brevo\\Client\\Model\\OrderProducts' => $vendorDir . '/getbrevo/brevo-php/lib/Model/OrderProducts.php', + 'Brevo\\Client\\Model\\Otp' => $vendorDir . '/getbrevo/brevo-php/lib/Model/Otp.php', + 'Brevo\\Client\\Model\\Pipeline' => $vendorDir . '/getbrevo/brevo-php/lib/Model/Pipeline.php', + 'Brevo\\Client\\Model\\PipelineStage' => $vendorDir . '/getbrevo/brevo-php/lib/Model/PipelineStage.php', + 'Brevo\\Client\\Model\\Pipelines' => $vendorDir . '/getbrevo/brevo-php/lib/Model/Pipelines.php', + 'Brevo\\Client\\Model\\PostContactInfo' => $vendorDir . '/getbrevo/brevo-php/lib/Model/PostContactInfo.php', + 'Brevo\\Client\\Model\\PostContactInfoContacts' => $vendorDir . '/getbrevo/brevo-php/lib/Model/PostContactInfoContacts.php', + 'Brevo\\Client\\Model\\PostSendFailed' => $vendorDir . '/getbrevo/brevo-php/lib/Model/PostSendFailed.php', + 'Brevo\\Client\\Model\\PostSendSmsTestFailed' => $vendorDir . '/getbrevo/brevo-php/lib/Model/PostSendSmsTestFailed.php', + 'Brevo\\Client\\Model\\PutRevokeUserPermission' => $vendorDir . '/getbrevo/brevo-php/lib/Model/PutRevokeUserPermission.php', + 'Brevo\\Client\\Model\\Putresendcancelinvitation' => $vendorDir . '/getbrevo/brevo-php/lib/Model/Putresendcancelinvitation.php', + 'Brevo\\Client\\Model\\RemainingCreditModel' => $vendorDir . '/getbrevo/brevo-php/lib/Model/RemainingCreditModel.php', + 'Brevo\\Client\\Model\\RemainingCreditModelChild' => $vendorDir . '/getbrevo/brevo-php/lib/Model/RemainingCreditModelChild.php', + 'Brevo\\Client\\Model\\RemainingCreditModelReseller' => $vendorDir . '/getbrevo/brevo-php/lib/Model/RemainingCreditModelReseller.php', + 'Brevo\\Client\\Model\\RemoveContactFromList' => $vendorDir . '/getbrevo/brevo-php/lib/Model/RemoveContactFromList.php', + 'Brevo\\Client\\Model\\RemoveCredits' => $vendorDir . '/getbrevo/brevo-php/lib/Model/RemoveCredits.php', + 'Brevo\\Client\\Model\\RequestContactExport' => $vendorDir . '/getbrevo/brevo-php/lib/Model/RequestContactExport.php', + 'Brevo\\Client\\Model\\RequestContactExportCustomContactFilter' => $vendorDir . '/getbrevo/brevo-php/lib/Model/RequestContactExportCustomContactFilter.php', + 'Brevo\\Client\\Model\\RequestContactImport' => $vendorDir . '/getbrevo/brevo-php/lib/Model/RequestContactImport.php', + 'Brevo\\Client\\Model\\RequestContactImportJsonBody' => $vendorDir . '/getbrevo/brevo-php/lib/Model/RequestContactImportJsonBody.php', + 'Brevo\\Client\\Model\\RequestContactImportNewList' => $vendorDir . '/getbrevo/brevo-php/lib/Model/RequestContactImportNewList.php', + 'Brevo\\Client\\Model\\RequestSmsRecipientExport' => $vendorDir . '/getbrevo/brevo-php/lib/Model/RequestSmsRecipientExport.php', + 'Brevo\\Client\\Model\\ScheduleSmtpEmail' => $vendorDir . '/getbrevo/brevo-php/lib/Model/ScheduleSmtpEmail.php', + 'Brevo\\Client\\Model\\SendReport' => $vendorDir . '/getbrevo/brevo-php/lib/Model/SendReport.php', + 'Brevo\\Client\\Model\\SendReportEmail' => $vendorDir . '/getbrevo/brevo-php/lib/Model/SendReportEmail.php', + 'Brevo\\Client\\Model\\SendSms' => $vendorDir . '/getbrevo/brevo-php/lib/Model/SendSms.php', + 'Brevo\\Client\\Model\\SendSmtpEmail' => $vendorDir . '/getbrevo/brevo-php/lib/Model/SendSmtpEmail.php', + 'Brevo\\Client\\Model\\SendSmtpEmailAttachment' => $vendorDir . '/getbrevo/brevo-php/lib/Model/SendSmtpEmailAttachment.php', + 'Brevo\\Client\\Model\\SendSmtpEmailBcc' => $vendorDir . '/getbrevo/brevo-php/lib/Model/SendSmtpEmailBcc.php', + 'Brevo\\Client\\Model\\SendSmtpEmailCc' => $vendorDir . '/getbrevo/brevo-php/lib/Model/SendSmtpEmailCc.php', + 'Brevo\\Client\\Model\\SendSmtpEmailMessageVersions' => $vendorDir . '/getbrevo/brevo-php/lib/Model/SendSmtpEmailMessageVersions.php', + 'Brevo\\Client\\Model\\SendSmtpEmailReplyTo' => $vendorDir . '/getbrevo/brevo-php/lib/Model/SendSmtpEmailReplyTo.php', + 'Brevo\\Client\\Model\\SendSmtpEmailReplyTo1' => $vendorDir . '/getbrevo/brevo-php/lib/Model/SendSmtpEmailReplyTo1.php', + 'Brevo\\Client\\Model\\SendSmtpEmailSender' => $vendorDir . '/getbrevo/brevo-php/lib/Model/SendSmtpEmailSender.php', + 'Brevo\\Client\\Model\\SendSmtpEmailTo' => $vendorDir . '/getbrevo/brevo-php/lib/Model/SendSmtpEmailTo.php', + 'Brevo\\Client\\Model\\SendSmtpEmailTo1' => $vendorDir . '/getbrevo/brevo-php/lib/Model/SendSmtpEmailTo1.php', + 'Brevo\\Client\\Model\\SendTestEmail' => $vendorDir . '/getbrevo/brevo-php/lib/Model/SendTestEmail.php', + 'Brevo\\Client\\Model\\SendTestSms' => $vendorDir . '/getbrevo/brevo-php/lib/Model/SendTestSms.php', + 'Brevo\\Client\\Model\\SendTransacSms' => $vendorDir . '/getbrevo/brevo-php/lib/Model/SendTransacSms.php', + 'Brevo\\Client\\Model\\SendWhatsappMessage' => $vendorDir . '/getbrevo/brevo-php/lib/Model/SendWhatsappMessage.php', + 'Brevo\\Client\\Model\\SsoTokenRequest' => $vendorDir . '/getbrevo/brevo-php/lib/Model/SsoTokenRequest.php', + 'Brevo\\Client\\Model\\SubAccountAppsToggleRequest' => $vendorDir . '/getbrevo/brevo-php/lib/Model/SubAccountAppsToggleRequest.php', + 'Brevo\\Client\\Model\\SubAccountDetailsResponse' => $vendorDir . '/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponse.php', + 'Brevo\\Client\\Model\\SubAccountDetailsResponsePlanInfo' => $vendorDir . '/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponsePlanInfo.php', + 'Brevo\\Client\\Model\\SubAccountDetailsResponsePlanInfoCredits' => $vendorDir . '/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponsePlanInfoCredits.php', + 'Brevo\\Client\\Model\\SubAccountDetailsResponsePlanInfoCreditsEmails' => $vendorDir . '/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponsePlanInfoCreditsEmails.php', + 'Brevo\\Client\\Model\\SubAccountDetailsResponsePlanInfoFeatures' => $vendorDir . '/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponsePlanInfoFeatures.php', + 'Brevo\\Client\\Model\\SubAccountDetailsResponsePlanInfoFeaturesInbox' => $vendorDir . '/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponsePlanInfoFeaturesInbox.php', + 'Brevo\\Client\\Model\\SubAccountDetailsResponsePlanInfoFeaturesLandingPage' => $vendorDir . '/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponsePlanInfoFeaturesLandingPage.php', + 'Brevo\\Client\\Model\\SubAccountDetailsResponsePlanInfoFeaturesUsers' => $vendorDir . '/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponsePlanInfoFeaturesUsers.php', + 'Brevo\\Client\\Model\\SubAccountUpdatePlanRequest' => $vendorDir . '/getbrevo/brevo-php/lib/Model/SubAccountUpdatePlanRequest.php', + 'Brevo\\Client\\Model\\SubAccountUpdatePlanRequestCredits' => $vendorDir . '/getbrevo/brevo-php/lib/Model/SubAccountUpdatePlanRequestCredits.php', + 'Brevo\\Client\\Model\\SubAccountUpdatePlanRequestFeatures' => $vendorDir . '/getbrevo/brevo-php/lib/Model/SubAccountUpdatePlanRequestFeatures.php', + 'Brevo\\Client\\Model\\SubAccountsResponse' => $vendorDir . '/getbrevo/brevo-php/lib/Model/SubAccountsResponse.php', + 'Brevo\\Client\\Model\\SubAccountsResponseSubAccounts' => $vendorDir . '/getbrevo/brevo-php/lib/Model/SubAccountsResponseSubAccounts.php', + 'Brevo\\Client\\Model\\Task' => $vendorDir . '/getbrevo/brevo-php/lib/Model/Task.php', + 'Brevo\\Client\\Model\\TaskList' => $vendorDir . '/getbrevo/brevo-php/lib/Model/TaskList.php', + 'Brevo\\Client\\Model\\TaskReminder' => $vendorDir . '/getbrevo/brevo-php/lib/Model/TaskReminder.php', + 'Brevo\\Client\\Model\\TaskTypes' => $vendorDir . '/getbrevo/brevo-php/lib/Model/TaskTypes.php', + 'Brevo\\Client\\Model\\UpdateAttribute' => $vendorDir . '/getbrevo/brevo-php/lib/Model/UpdateAttribute.php', + 'Brevo\\Client\\Model\\UpdateAttributeEnumeration' => $vendorDir . '/getbrevo/brevo-php/lib/Model/UpdateAttributeEnumeration.php', + 'Brevo\\Client\\Model\\UpdateBatchContacts' => $vendorDir . '/getbrevo/brevo-php/lib/Model/UpdateBatchContacts.php', + 'Brevo\\Client\\Model\\UpdateBatchContactsContacts' => $vendorDir . '/getbrevo/brevo-php/lib/Model/UpdateBatchContactsContacts.php', + 'Brevo\\Client\\Model\\UpdateBatchContactsModel' => $vendorDir . '/getbrevo/brevo-php/lib/Model/UpdateBatchContactsModel.php', + 'Brevo\\Client\\Model\\UpdateCampaignStatus' => $vendorDir . '/getbrevo/brevo-php/lib/Model/UpdateCampaignStatus.php', + 'Brevo\\Client\\Model\\UpdateChild' => $vendorDir . '/getbrevo/brevo-php/lib/Model/UpdateChild.php', + 'Brevo\\Client\\Model\\UpdateChildAccountStatus' => $vendorDir . '/getbrevo/brevo-php/lib/Model/UpdateChildAccountStatus.php', + 'Brevo\\Client\\Model\\UpdateChildDomain' => $vendorDir . '/getbrevo/brevo-php/lib/Model/UpdateChildDomain.php', + 'Brevo\\Client\\Model\\UpdateContact' => $vendorDir . '/getbrevo/brevo-php/lib/Model/UpdateContact.php', + 'Brevo\\Client\\Model\\UpdateCouponCollection' => $vendorDir . '/getbrevo/brevo-php/lib/Model/UpdateCouponCollection.php', + 'Brevo\\Client\\Model\\UpdateEmailCampaign' => $vendorDir . '/getbrevo/brevo-php/lib/Model/UpdateEmailCampaign.php', + 'Brevo\\Client\\Model\\UpdateEmailCampaignRecipients' => $vendorDir . '/getbrevo/brevo-php/lib/Model/UpdateEmailCampaignRecipients.php', + 'Brevo\\Client\\Model\\UpdateEmailCampaignSender' => $vendorDir . '/getbrevo/brevo-php/lib/Model/UpdateEmailCampaignSender.php', + 'Brevo\\Client\\Model\\UpdateExternalFeed' => $vendorDir . '/getbrevo/brevo-php/lib/Model/UpdateExternalFeed.php', + 'Brevo\\Client\\Model\\UpdateList' => $vendorDir . '/getbrevo/brevo-php/lib/Model/UpdateList.php', + 'Brevo\\Client\\Model\\UpdateSender' => $vendorDir . '/getbrevo/brevo-php/lib/Model/UpdateSender.php', + 'Brevo\\Client\\Model\\UpdateSmsCampaign' => $vendorDir . '/getbrevo/brevo-php/lib/Model/UpdateSmsCampaign.php', + 'Brevo\\Client\\Model\\UpdateSmtpTemplate' => $vendorDir . '/getbrevo/brevo-php/lib/Model/UpdateSmtpTemplate.php', + 'Brevo\\Client\\Model\\UpdateSmtpTemplateSender' => $vendorDir . '/getbrevo/brevo-php/lib/Model/UpdateSmtpTemplateSender.php', + 'Brevo\\Client\\Model\\UpdateWebhook' => $vendorDir . '/getbrevo/brevo-php/lib/Model/UpdateWebhook.php', + 'Brevo\\Client\\Model\\UpdateWhatsAppCampaign' => $vendorDir . '/getbrevo/brevo-php/lib/Model/UpdateWhatsAppCampaign.php', + 'Brevo\\Client\\Model\\UploadImageModel' => $vendorDir . '/getbrevo/brevo-php/lib/Model/UploadImageModel.php', + 'Brevo\\Client\\Model\\UploadImageToGallery' => $vendorDir . '/getbrevo/brevo-php/lib/Model/UploadImageToGallery.php', + 'Brevo\\Client\\Model\\VariablesItems' => $vendorDir . '/getbrevo/brevo-php/lib/Model/VariablesItems.php', + 'Brevo\\Client\\Model\\WhatsappCampStats' => $vendorDir . '/getbrevo/brevo-php/lib/Model/WhatsappCampStats.php', + 'Brevo\\Client\\Model\\WhatsappCampTemplate' => $vendorDir . '/getbrevo/brevo-php/lib/Model/WhatsappCampTemplate.php', + 'Brevo\\Client\\ObjectSerializer' => $vendorDir . '/getbrevo/brevo-php/lib/ObjectSerializer.php', 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', 'Composer\\Semver\\Comparator' => $vendorDir . '/composer/semver/src/Comparator.php', 'Composer\\Semver\\CompilingMatcher' => $vendorDir . '/composer/semver/src/CompilingMatcher.php', @@ -21,6 +407,92 @@ return array( 'Composer\\Semver\\Intervals' => $vendorDir . '/composer/semver/src/Intervals.php', 'Composer\\Semver\\Semver' => $vendorDir . '/composer/semver/src/Semver.php', 'Composer\\Semver\\VersionParser' => $vendorDir . '/composer/semver/src/VersionParser.php', + 'GuzzleHttp\\BodySummarizer' => $vendorDir . '/guzzlehttp/guzzle/src/BodySummarizer.php', + 'GuzzleHttp\\BodySummarizerInterface' => $vendorDir . '/guzzlehttp/guzzle/src/BodySummarizerInterface.php', + 'GuzzleHttp\\Client' => $vendorDir . '/guzzlehttp/guzzle/src/Client.php', + 'GuzzleHttp\\ClientInterface' => $vendorDir . '/guzzlehttp/guzzle/src/ClientInterface.php', + 'GuzzleHttp\\ClientTrait' => $vendorDir . '/guzzlehttp/guzzle/src/ClientTrait.php', + 'GuzzleHttp\\Cookie\\CookieJar' => $vendorDir . '/guzzlehttp/guzzle/src/Cookie/CookieJar.php', + 'GuzzleHttp\\Cookie\\CookieJarInterface' => $vendorDir . '/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php', + 'GuzzleHttp\\Cookie\\FileCookieJar' => $vendorDir . '/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php', + 'GuzzleHttp\\Cookie\\SessionCookieJar' => $vendorDir . '/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php', + 'GuzzleHttp\\Cookie\\SetCookie' => $vendorDir . '/guzzlehttp/guzzle/src/Cookie/SetCookie.php', + 'GuzzleHttp\\Exception\\BadResponseException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/BadResponseException.php', + 'GuzzleHttp\\Exception\\ClientException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/ClientException.php', + 'GuzzleHttp\\Exception\\ConnectException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/ConnectException.php', + 'GuzzleHttp\\Exception\\GuzzleException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/GuzzleException.php', + 'GuzzleHttp\\Exception\\InvalidArgumentException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php', + 'GuzzleHttp\\Exception\\RequestException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/RequestException.php', + 'GuzzleHttp\\Exception\\ServerException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/ServerException.php', + 'GuzzleHttp\\Exception\\TooManyRedirectsException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php', + 'GuzzleHttp\\Exception\\TransferException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/TransferException.php', + 'GuzzleHttp\\HandlerStack' => $vendorDir . '/guzzlehttp/guzzle/src/HandlerStack.php', + 'GuzzleHttp\\Handler\\CurlFactory' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/CurlFactory.php', + 'GuzzleHttp\\Handler\\CurlFactoryInterface' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php', + 'GuzzleHttp\\Handler\\CurlHandler' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/CurlHandler.php', + 'GuzzleHttp\\Handler\\CurlMultiHandler' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php', + 'GuzzleHttp\\Handler\\EasyHandle' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/EasyHandle.php', + 'GuzzleHttp\\Handler\\HeaderProcessor' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/HeaderProcessor.php', + 'GuzzleHttp\\Handler\\MockHandler' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/MockHandler.php', + 'GuzzleHttp\\Handler\\Proxy' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/Proxy.php', + 'GuzzleHttp\\Handler\\StreamHandler' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/StreamHandler.php', + 'GuzzleHttp\\MessageFormatter' => $vendorDir . '/guzzlehttp/guzzle/src/MessageFormatter.php', + 'GuzzleHttp\\MessageFormatterInterface' => $vendorDir . '/guzzlehttp/guzzle/src/MessageFormatterInterface.php', + 'GuzzleHttp\\Middleware' => $vendorDir . '/guzzlehttp/guzzle/src/Middleware.php', + 'GuzzleHttp\\Pool' => $vendorDir . '/guzzlehttp/guzzle/src/Pool.php', + 'GuzzleHttp\\PrepareBodyMiddleware' => $vendorDir . '/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php', + 'GuzzleHttp\\Promise\\AggregateException' => $vendorDir . '/guzzlehttp/promises/src/AggregateException.php', + 'GuzzleHttp\\Promise\\CancellationException' => $vendorDir . '/guzzlehttp/promises/src/CancellationException.php', + 'GuzzleHttp\\Promise\\Coroutine' => $vendorDir . '/guzzlehttp/promises/src/Coroutine.php', + 'GuzzleHttp\\Promise\\Create' => $vendorDir . '/guzzlehttp/promises/src/Create.php', + 'GuzzleHttp\\Promise\\Each' => $vendorDir . '/guzzlehttp/promises/src/Each.php', + 'GuzzleHttp\\Promise\\EachPromise' => $vendorDir . '/guzzlehttp/promises/src/EachPromise.php', + 'GuzzleHttp\\Promise\\FulfilledPromise' => $vendorDir . '/guzzlehttp/promises/src/FulfilledPromise.php', + 'GuzzleHttp\\Promise\\Is' => $vendorDir . '/guzzlehttp/promises/src/Is.php', + 'GuzzleHttp\\Promise\\Promise' => $vendorDir . '/guzzlehttp/promises/src/Promise.php', + 'GuzzleHttp\\Promise\\PromiseInterface' => $vendorDir . '/guzzlehttp/promises/src/PromiseInterface.php', + 'GuzzleHttp\\Promise\\PromisorInterface' => $vendorDir . '/guzzlehttp/promises/src/PromisorInterface.php', + 'GuzzleHttp\\Promise\\RejectedPromise' => $vendorDir . '/guzzlehttp/promises/src/RejectedPromise.php', + 'GuzzleHttp\\Promise\\RejectionException' => $vendorDir . '/guzzlehttp/promises/src/RejectionException.php', + 'GuzzleHttp\\Promise\\TaskQueue' => $vendorDir . '/guzzlehttp/promises/src/TaskQueue.php', + 'GuzzleHttp\\Promise\\TaskQueueInterface' => $vendorDir . '/guzzlehttp/promises/src/TaskQueueInterface.php', + 'GuzzleHttp\\Promise\\Utils' => $vendorDir . '/guzzlehttp/promises/src/Utils.php', + 'GuzzleHttp\\Psr7\\AppendStream' => $vendorDir . '/guzzlehttp/psr7/src/AppendStream.php', + 'GuzzleHttp\\Psr7\\BufferStream' => $vendorDir . '/guzzlehttp/psr7/src/BufferStream.php', + 'GuzzleHttp\\Psr7\\CachingStream' => $vendorDir . '/guzzlehttp/psr7/src/CachingStream.php', + 'GuzzleHttp\\Psr7\\DroppingStream' => $vendorDir . '/guzzlehttp/psr7/src/DroppingStream.php', + 'GuzzleHttp\\Psr7\\Exception\\MalformedUriException' => $vendorDir . '/guzzlehttp/psr7/src/Exception/MalformedUriException.php', + 'GuzzleHttp\\Psr7\\FnStream' => $vendorDir . '/guzzlehttp/psr7/src/FnStream.php', + 'GuzzleHttp\\Psr7\\Header' => $vendorDir . '/guzzlehttp/psr7/src/Header.php', + 'GuzzleHttp\\Psr7\\HttpFactory' => $vendorDir . '/guzzlehttp/psr7/src/HttpFactory.php', + 'GuzzleHttp\\Psr7\\InflateStream' => $vendorDir . '/guzzlehttp/psr7/src/InflateStream.php', + 'GuzzleHttp\\Psr7\\LazyOpenStream' => $vendorDir . '/guzzlehttp/psr7/src/LazyOpenStream.php', + 'GuzzleHttp\\Psr7\\LimitStream' => $vendorDir . '/guzzlehttp/psr7/src/LimitStream.php', + 'GuzzleHttp\\Psr7\\Message' => $vendorDir . '/guzzlehttp/psr7/src/Message.php', + 'GuzzleHttp\\Psr7\\MessageTrait' => $vendorDir . '/guzzlehttp/psr7/src/MessageTrait.php', + 'GuzzleHttp\\Psr7\\MimeType' => $vendorDir . '/guzzlehttp/psr7/src/MimeType.php', + 'GuzzleHttp\\Psr7\\MultipartStream' => $vendorDir . '/guzzlehttp/psr7/src/MultipartStream.php', + 'GuzzleHttp\\Psr7\\NoSeekStream' => $vendorDir . '/guzzlehttp/psr7/src/NoSeekStream.php', + 'GuzzleHttp\\Psr7\\PumpStream' => $vendorDir . '/guzzlehttp/psr7/src/PumpStream.php', + 'GuzzleHttp\\Psr7\\Query' => $vendorDir . '/guzzlehttp/psr7/src/Query.php', + 'GuzzleHttp\\Psr7\\Request' => $vendorDir . '/guzzlehttp/psr7/src/Request.php', + 'GuzzleHttp\\Psr7\\Response' => $vendorDir . '/guzzlehttp/psr7/src/Response.php', + 'GuzzleHttp\\Psr7\\Rfc7230' => $vendorDir . '/guzzlehttp/psr7/src/Rfc7230.php', + 'GuzzleHttp\\Psr7\\ServerRequest' => $vendorDir . '/guzzlehttp/psr7/src/ServerRequest.php', + 'GuzzleHttp\\Psr7\\Stream' => $vendorDir . '/guzzlehttp/psr7/src/Stream.php', + 'GuzzleHttp\\Psr7\\StreamDecoratorTrait' => $vendorDir . '/guzzlehttp/psr7/src/StreamDecoratorTrait.php', + 'GuzzleHttp\\Psr7\\StreamWrapper' => $vendorDir . '/guzzlehttp/psr7/src/StreamWrapper.php', + 'GuzzleHttp\\Psr7\\UploadedFile' => $vendorDir . '/guzzlehttp/psr7/src/UploadedFile.php', + 'GuzzleHttp\\Psr7\\Uri' => $vendorDir . '/guzzlehttp/psr7/src/Uri.php', + 'GuzzleHttp\\Psr7\\UriComparator' => $vendorDir . '/guzzlehttp/psr7/src/UriComparator.php', + 'GuzzleHttp\\Psr7\\UriNormalizer' => $vendorDir . '/guzzlehttp/psr7/src/UriNormalizer.php', + 'GuzzleHttp\\Psr7\\UriResolver' => $vendorDir . '/guzzlehttp/psr7/src/UriResolver.php', + 'GuzzleHttp\\Psr7\\Utils' => $vendorDir . '/guzzlehttp/psr7/src/Utils.php', + 'GuzzleHttp\\RedirectMiddleware' => $vendorDir . '/guzzlehttp/guzzle/src/RedirectMiddleware.php', + 'GuzzleHttp\\RequestOptions' => $vendorDir . '/guzzlehttp/guzzle/src/RequestOptions.php', + 'GuzzleHttp\\RetryMiddleware' => $vendorDir . '/guzzlehttp/guzzle/src/RetryMiddleware.php', + 'GuzzleHttp\\TransferStats' => $vendorDir . '/guzzlehttp/guzzle/src/TransferStats.php', + 'GuzzleHttp\\Utils' => $vendorDir . '/guzzlehttp/guzzle/src/Utils.php', 'Kirby\\Api\\Api' => $baseDir . '/kirby/src/Api/Api.php', 'Kirby\\Api\\Collection' => $baseDir . '/kirby/src/Api/Collection.php', 'Kirby\\Api\\Model' => $baseDir . '/kirby/src/Api/Model.php', @@ -361,6 +833,23 @@ return array( 'PHPMailer\\PHPMailer\\SMTP' => $vendorDir . '/phpmailer/phpmailer/src/SMTP.php', 'Parsedown' => $baseDir . '/kirby/dependencies/parsedown/Parsedown.php', 'ParsedownExtra' => $baseDir . '/kirby/dependencies/parsedown-extra/ParsedownExtra.php', + 'Psr\\Http\\Client\\ClientExceptionInterface' => $vendorDir . '/psr/http-client/src/ClientExceptionInterface.php', + 'Psr\\Http\\Client\\ClientInterface' => $vendorDir . '/psr/http-client/src/ClientInterface.php', + 'Psr\\Http\\Client\\NetworkExceptionInterface' => $vendorDir . '/psr/http-client/src/NetworkExceptionInterface.php', + 'Psr\\Http\\Client\\RequestExceptionInterface' => $vendorDir . '/psr/http-client/src/RequestExceptionInterface.php', + 'Psr\\Http\\Message\\MessageInterface' => $vendorDir . '/psr/http-message/src/MessageInterface.php', + 'Psr\\Http\\Message\\RequestFactoryInterface' => $vendorDir . '/psr/http-factory/src/RequestFactoryInterface.php', + 'Psr\\Http\\Message\\RequestInterface' => $vendorDir . '/psr/http-message/src/RequestInterface.php', + 'Psr\\Http\\Message\\ResponseFactoryInterface' => $vendorDir . '/psr/http-factory/src/ResponseFactoryInterface.php', + 'Psr\\Http\\Message\\ResponseInterface' => $vendorDir . '/psr/http-message/src/ResponseInterface.php', + 'Psr\\Http\\Message\\ServerRequestFactoryInterface' => $vendorDir . '/psr/http-factory/src/ServerRequestFactoryInterface.php', + 'Psr\\Http\\Message\\ServerRequestInterface' => $vendorDir . '/psr/http-message/src/ServerRequestInterface.php', + 'Psr\\Http\\Message\\StreamFactoryInterface' => $vendorDir . '/psr/http-factory/src/StreamFactoryInterface.php', + 'Psr\\Http\\Message\\StreamInterface' => $vendorDir . '/psr/http-message/src/StreamInterface.php', + 'Psr\\Http\\Message\\UploadedFileFactoryInterface' => $vendorDir . '/psr/http-factory/src/UploadedFileFactoryInterface.php', + 'Psr\\Http\\Message\\UploadedFileInterface' => $vendorDir . '/psr/http-message/src/UploadedFileInterface.php', + 'Psr\\Http\\Message\\UriFactoryInterface' => $vendorDir . '/psr/http-factory/src/UriFactoryInterface.php', + 'Psr\\Http\\Message\\UriInterface' => $vendorDir . '/psr/http-message/src/UriInterface.php', 'Psr\\Log\\AbstractLogger' => $vendorDir . '/psr/log/src/AbstractLogger.php', 'Psr\\Log\\InvalidArgumentException' => $vendorDir . '/psr/log/src/InvalidArgumentException.php', 'Psr\\Log\\LogLevel' => $vendorDir . '/psr/log/src/LogLevel.php', diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php index 1b9a0ed..817abaf 100644 --- a/vendor/composer/autoload_files.php +++ b/vendor/composer/autoload_files.php @@ -7,8 +7,10 @@ $baseDir = dirname($vendorDir); return array( '6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php', + '7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php', '320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php', 'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php', + '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php', 'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php', '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', 'f864ae44e8154e5ff6f4eec32f46d37f' => $baseDir . '/kirby/config/setup.php', diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index c9abc16..824269f 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -13,10 +13,16 @@ return array( 'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'), 'Symfony\\Component\\Yaml\\' => array($vendorDir . '/symfony/yaml'), 'Psr\\Log\\' => array($vendorDir . '/psr/log/src'), + 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-factory/src', $vendorDir . '/psr/http-message/src'), + 'Psr\\Http\\Client\\' => array($vendorDir . '/psr/http-client/src'), 'PHPMailer\\PHPMailer\\' => array($vendorDir . '/phpmailer/phpmailer/src'), 'League\\ColorExtractor\\' => array($vendorDir . '/league/color-extractor/src'), 'Laminas\\Escaper\\' => array($vendorDir . '/laminas/laminas-escaper/src'), 'Kirby\\' => array($baseDir . '/kirby/src', $vendorDir . '/getkirby/composer-installer/src'), + 'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'), + 'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'), + 'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'), 'Composer\\Semver\\' => array($vendorDir . '/composer/semver/src'), + 'Brevo\\Client\\' => array($vendorDir . '/getbrevo/brevo-php/lib'), 'Base32\\' => array($vendorDir . '/christian-riesen/base32/src'), ); diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 4597964..99dec69 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -8,8 +8,10 @@ class ComposerStaticInit749a661738bcd5b9428c88a1da847bc7 { public static $files = array ( '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php', + '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php', '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php', 'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php', + '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php', 'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php', '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', 'f864ae44e8154e5ff6f4eec32f46d37f' => __DIR__ . '/../..' . '/kirby/config/setup.php', @@ -32,6 +34,8 @@ class ComposerStaticInit749a661738bcd5b9428c88a1da847bc7 'P' => array ( 'Psr\\Log\\' => 8, + 'Psr\\Http\\Message\\' => 17, + 'Psr\\Http\\Client\\' => 16, 'PHPMailer\\PHPMailer\\' => 20, ), 'L' => @@ -43,12 +47,19 @@ class ComposerStaticInit749a661738bcd5b9428c88a1da847bc7 array ( 'Kirby\\' => 6, ), + 'G' => + array ( + 'GuzzleHttp\\Psr7\\' => 16, + 'GuzzleHttp\\Promise\\' => 19, + 'GuzzleHttp\\' => 11, + ), 'C' => array ( 'Composer\\Semver\\' => 16, ), 'B' => array ( + 'Brevo\\Client\\' => 13, 'Base32\\' => 7, ), ); @@ -82,6 +93,15 @@ class ComposerStaticInit749a661738bcd5b9428c88a1da847bc7 array ( 0 => __DIR__ . '/..' . '/psr/log/src', ), + 'Psr\\Http\\Message\\' => + array ( + 0 => __DIR__ . '/..' . '/psr/http-factory/src', + 1 => __DIR__ . '/..' . '/psr/http-message/src', + ), + 'Psr\\Http\\Client\\' => + array ( + 0 => __DIR__ . '/..' . '/psr/http-client/src', + ), 'PHPMailer\\PHPMailer\\' => array ( 0 => __DIR__ . '/..' . '/phpmailer/phpmailer/src', @@ -99,10 +119,26 @@ class ComposerStaticInit749a661738bcd5b9428c88a1da847bc7 0 => __DIR__ . '/../..' . '/kirby/src', 1 => __DIR__ . '/..' . '/getkirby/composer-installer/src', ), + 'GuzzleHttp\\Psr7\\' => + array ( + 0 => __DIR__ . '/..' . '/guzzlehttp/psr7/src', + ), + 'GuzzleHttp\\Promise\\' => + array ( + 0 => __DIR__ . '/..' . '/guzzlehttp/promises/src', + ), + 'GuzzleHttp\\' => + array ( + 0 => __DIR__ . '/..' . '/guzzlehttp/guzzle/src', + ), 'Composer\\Semver\\' => array ( 0 => __DIR__ . '/..' . '/composer/semver/src', ), + 'Brevo\\Client\\' => + array ( + 0 => __DIR__ . '/..' . '/getbrevo/brevo-php/lib', + ), 'Base32\\' => array ( 0 => __DIR__ . '/..' . '/christian-riesen/base32/src', @@ -129,6 +165,392 @@ class ComposerStaticInit749a661738bcd5b9428c88a1da847bc7 public static $classMap = array ( 'Base32\\Base32' => __DIR__ . '/..' . '/christian-riesen/base32/src/Base32.php', 'Base32\\Base32Hex' => __DIR__ . '/..' . '/christian-riesen/base32/src/Base32Hex.php', + 'Brevo\\Client\\ApiException' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/ApiException.php', + 'Brevo\\Client\\Api\\AccountApi' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Api/AccountApi.php', + 'Brevo\\Client\\Api\\AttributesApi' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Api/AttributesApi.php', + 'Brevo\\Client\\Api\\CRMApi' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Api/CRMApi.php', + 'Brevo\\Client\\Api\\CompaniesApi' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Api/CompaniesApi.php', + 'Brevo\\Client\\Api\\ContactsApi' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Api/ContactsApi.php', + 'Brevo\\Client\\Api\\ConversationsApi' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Api/ConversationsApi.php', + 'Brevo\\Client\\Api\\CouponsApi' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Api/CouponsApi.php', + 'Brevo\\Client\\Api\\DealsApi' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Api/DealsApi.php', + 'Brevo\\Client\\Api\\DomainsApi' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Api/DomainsApi.php', + 'Brevo\\Client\\Api\\EcommerceApi' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Api/EcommerceApi.php', + 'Brevo\\Client\\Api\\EmailCampaignsApi' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Api/EmailCampaignsApi.php', + 'Brevo\\Client\\Api\\EventsApi' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Api/EventsApi.php', + 'Brevo\\Client\\Api\\ExternalFeedsApi' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Api/ExternalFeedsApi.php', + 'Brevo\\Client\\Api\\FilesApi' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Api/FilesApi.php', + 'Brevo\\Client\\Api\\FoldersApi' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Api/FoldersApi.php', + 'Brevo\\Client\\Api\\InboundParsingApi' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Api/InboundParsingApi.php', + 'Brevo\\Client\\Api\\ListsApi' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Api/ListsApi.php', + 'Brevo\\Client\\Api\\MasterAccountApi' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Api/MasterAccountApi.php', + 'Brevo\\Client\\Api\\NotesApi' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Api/NotesApi.php', + 'Brevo\\Client\\Api\\ProcessApi' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Api/ProcessApi.php', + 'Brevo\\Client\\Api\\ResellerApi' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Api/ResellerApi.php', + 'Brevo\\Client\\Api\\SMSCampaignsApi' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Api/SMSCampaignsApi.php', + 'Brevo\\Client\\Api\\SendersApi' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Api/SendersApi.php', + 'Brevo\\Client\\Api\\TasksApi' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Api/TasksApi.php', + 'Brevo\\Client\\Api\\TransactionalEmailsApi' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Api/TransactionalEmailsApi.php', + 'Brevo\\Client\\Api\\TransactionalSMSApi' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Api/TransactionalSMSApi.php', + 'Brevo\\Client\\Api\\TransactionalWhatsAppApi' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Api/TransactionalWhatsAppApi.php', + 'Brevo\\Client\\Api\\UserApi' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Api/UserApi.php', + 'Brevo\\Client\\Api\\WebhooksApi' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Api/WebhooksApi.php', + 'Brevo\\Client\\Api\\WhatsAppCampaignsApi' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Api/WhatsAppCampaignsApi.php', + 'Brevo\\Client\\Configuration' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Configuration.php', + 'Brevo\\Client\\HeaderSelector' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/HeaderSelector.php', + 'Brevo\\Client\\Model\\AbTestCampaignResult' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/AbTestCampaignResult.php', + 'Brevo\\Client\\Model\\AbTestCampaignResultClickedLinks' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/AbTestCampaignResultClickedLinks.php', + 'Brevo\\Client\\Model\\AbTestCampaignResultStatistics' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/AbTestCampaignResultStatistics.php', + 'Brevo\\Client\\Model\\AbTestVersionClicks' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/AbTestVersionClicks.php', + 'Brevo\\Client\\Model\\AbTestVersionClicksInner' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/AbTestVersionClicksInner.php', + 'Brevo\\Client\\Model\\AbTestVersionStats' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/AbTestVersionStats.php', + 'Brevo\\Client\\Model\\AddChildDomain' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/AddChildDomain.php', + 'Brevo\\Client\\Model\\AddContactToList' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/AddContactToList.php', + 'Brevo\\Client\\Model\\AddCredits' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/AddCredits.php', + 'Brevo\\Client\\Model\\AuthenticateDomainModel' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/AuthenticateDomainModel.php', + 'Brevo\\Client\\Model\\BlockDomain' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/BlockDomain.php', + 'Brevo\\Client\\Model\\Body' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/Body.php', + 'Brevo\\Client\\Model\\Body1' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/Body1.php', + 'Brevo\\Client\\Model\\Body10' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/Body10.php', + 'Brevo\\Client\\Model\\Body11' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/Body11.php', + 'Brevo\\Client\\Model\\Body12' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/Body12.php', + 'Brevo\\Client\\Model\\Body13' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/Body13.php', + 'Brevo\\Client\\Model\\Body14' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/Body14.php', + 'Brevo\\Client\\Model\\Body2' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/Body2.php', + 'Brevo\\Client\\Model\\Body3' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/Body3.php', + 'Brevo\\Client\\Model\\Body4' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/Body4.php', + 'Brevo\\Client\\Model\\Body5' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/Body5.php', + 'Brevo\\Client\\Model\\Body6' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/Body6.php', + 'Brevo\\Client\\Model\\Body7' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/Body7.php', + 'Brevo\\Client\\Model\\Body8' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/Body8.php', + 'Brevo\\Client\\Model\\Body9' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/Body9.php', + 'Brevo\\Client\\Model\\BodyVariablesItems' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/BodyVariablesItems.php', + 'Brevo\\Client\\Model\\CompaniesList' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CompaniesList.php', + 'Brevo\\Client\\Model\\Company' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/Company.php', + 'Brevo\\Client\\Model\\CompanyAttributes' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CompanyAttributes.php', + 'Brevo\\Client\\Model\\CompanyAttributesInner' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CompanyAttributesInner.php', + 'Brevo\\Client\\Model\\ComponentItems' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/ComponentItems.php', + 'Brevo\\Client\\Model\\Contact' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/Contact.php', + 'Brevo\\Client\\Model\\ConversationsMessage' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/ConversationsMessage.php', + 'Brevo\\Client\\Model\\ConversationsMessageFile' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/ConversationsMessageFile.php', + 'Brevo\\Client\\Model\\ConversationsMessageFileImageInfo' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/ConversationsMessageFileImageInfo.php', + 'Brevo\\Client\\Model\\CreateApiKeyRequest' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateApiKeyRequest.php', + 'Brevo\\Client\\Model\\CreateApiKeyResponse' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateApiKeyResponse.php', + 'Brevo\\Client\\Model\\CreateAttribute' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateAttribute.php', + 'Brevo\\Client\\Model\\CreateAttributeEnumeration' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateAttributeEnumeration.php', + 'Brevo\\Client\\Model\\CreateCategoryModel' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateCategoryModel.php', + 'Brevo\\Client\\Model\\CreateChild' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateChild.php', + 'Brevo\\Client\\Model\\CreateContact' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateContact.php', + 'Brevo\\Client\\Model\\CreateCouponCollection' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateCouponCollection.php', + 'Brevo\\Client\\Model\\CreateCoupons' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateCoupons.php', + 'Brevo\\Client\\Model\\CreateDoiContact' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateDoiContact.php', + 'Brevo\\Client\\Model\\CreateDomain' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateDomain.php', + 'Brevo\\Client\\Model\\CreateDomainModel' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateDomainModel.php', + 'Brevo\\Client\\Model\\CreateDomainModelDnsRecords' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateDomainModelDnsRecords.php', + 'Brevo\\Client\\Model\\CreateDomainModelDnsRecordsDkimRecord' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateDomainModelDnsRecordsDkimRecord.php', + 'Brevo\\Client\\Model\\CreateEmailCampaign' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateEmailCampaign.php', + 'Brevo\\Client\\Model\\CreateEmailCampaignRecipients' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateEmailCampaignRecipients.php', + 'Brevo\\Client\\Model\\CreateEmailCampaignSender' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateEmailCampaignSender.php', + 'Brevo\\Client\\Model\\CreateExternalFeed' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateExternalFeed.php', + 'Brevo\\Client\\Model\\CreateList' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateList.php', + 'Brevo\\Client\\Model\\CreateModel' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateModel.php', + 'Brevo\\Client\\Model\\CreateProductModel' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateProductModel.php', + 'Brevo\\Client\\Model\\CreateReseller' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateReseller.php', + 'Brevo\\Client\\Model\\CreateSender' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateSender.php', + 'Brevo\\Client\\Model\\CreateSenderIps' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateSenderIps.php', + 'Brevo\\Client\\Model\\CreateSenderModel' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateSenderModel.php', + 'Brevo\\Client\\Model\\CreateSmsCampaign' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateSmsCampaign.php', + 'Brevo\\Client\\Model\\CreateSmsCampaignRecipients' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateSmsCampaignRecipients.php', + 'Brevo\\Client\\Model\\CreateSmtpEmail' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateSmtpEmail.php', + 'Brevo\\Client\\Model\\CreateSmtpTemplate' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateSmtpTemplate.php', + 'Brevo\\Client\\Model\\CreateSmtpTemplateSender' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateSmtpTemplateSender.php', + 'Brevo\\Client\\Model\\CreateSubAccount' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateSubAccount.php', + 'Brevo\\Client\\Model\\CreateSubAccountResponse' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateSubAccountResponse.php', + 'Brevo\\Client\\Model\\CreateUpdateBatchCategory' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateUpdateBatchCategory.php', + 'Brevo\\Client\\Model\\CreateUpdateBatchCategoryModel' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateUpdateBatchCategoryModel.php', + 'Brevo\\Client\\Model\\CreateUpdateBatchProducts' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateUpdateBatchProducts.php', + 'Brevo\\Client\\Model\\CreateUpdateBatchProductsModel' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateUpdateBatchProductsModel.php', + 'Brevo\\Client\\Model\\CreateUpdateCategories' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateUpdateCategories.php', + 'Brevo\\Client\\Model\\CreateUpdateCategory' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateUpdateCategory.php', + 'Brevo\\Client\\Model\\CreateUpdateContactModel' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateUpdateContactModel.php', + 'Brevo\\Client\\Model\\CreateUpdateFolder' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateUpdateFolder.php', + 'Brevo\\Client\\Model\\CreateUpdateProduct' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateUpdateProduct.php', + 'Brevo\\Client\\Model\\CreateUpdateProducts' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateUpdateProducts.php', + 'Brevo\\Client\\Model\\CreateWebhook' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateWebhook.php', + 'Brevo\\Client\\Model\\CreateWhatsAppCampaign' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateWhatsAppCampaign.php', + 'Brevo\\Client\\Model\\CreateWhatsAppCampaignRecipients' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateWhatsAppCampaignRecipients.php', + 'Brevo\\Client\\Model\\CreateWhatsAppTemplate' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreateWhatsAppTemplate.php', + 'Brevo\\Client\\Model\\CreatedBatchId' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreatedBatchId.php', + 'Brevo\\Client\\Model\\CreatedProcessId' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/CreatedProcessId.php', + 'Brevo\\Client\\Model\\Deal' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/Deal.php', + 'Brevo\\Client\\Model\\DealAttributes' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/DealAttributes.php', + 'Brevo\\Client\\Model\\DealAttributesInner' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/DealAttributesInner.php', + 'Brevo\\Client\\Model\\DealsList' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/DealsList.php', + 'Brevo\\Client\\Model\\DeleteHardbounces' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/DeleteHardbounces.php', + 'Brevo\\Client\\Model\\EmailExportRecipients' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/EmailExportRecipients.php', + 'Brevo\\Client\\Model\\ErrorModel' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/ErrorModel.php', + 'Brevo\\Client\\Model\\Event' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/Event.php', + 'Brevo\\Client\\Model\\EventIdentifiers' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/EventIdentifiers.php', + 'Brevo\\Client\\Model\\ExportWebhooksHistory' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/ExportWebhooksHistory.php', + 'Brevo\\Client\\Model\\FileData' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/FileData.php', + 'Brevo\\Client\\Model\\FileDownloadableLink' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/FileDownloadableLink.php', + 'Brevo\\Client\\Model\\FileList' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/FileList.php', + 'Brevo\\Client\\Model\\GetAccount' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetAccount.php', + 'Brevo\\Client\\Model\\GetAccountActivity' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetAccountActivity.php', + 'Brevo\\Client\\Model\\GetAccountActivityLogs' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetAccountActivityLogs.php', + 'Brevo\\Client\\Model\\GetAccountMarketingAutomation' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetAccountMarketingAutomation.php', + 'Brevo\\Client\\Model\\GetAccountPlan' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetAccountPlan.php', + 'Brevo\\Client\\Model\\GetAccountRelay' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetAccountRelay.php', + 'Brevo\\Client\\Model\\GetAccountRelayData' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetAccountRelayData.php', + 'Brevo\\Client\\Model\\GetAggregatedReport' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetAggregatedReport.php', + 'Brevo\\Client\\Model\\GetAllExternalFeeds' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetAllExternalFeeds.php', + 'Brevo\\Client\\Model\\GetAllExternalFeedsFeeds' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetAllExternalFeedsFeeds.php', + 'Brevo\\Client\\Model\\GetAttributes' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetAttributes.php', + 'Brevo\\Client\\Model\\GetAttributesAttributes' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetAttributesAttributes.php', + 'Brevo\\Client\\Model\\GetAttributesEnumeration' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetAttributesEnumeration.php', + 'Brevo\\Client\\Model\\GetBlockedDomains' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetBlockedDomains.php', + 'Brevo\\Client\\Model\\GetCampaignOverview' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetCampaignOverview.php', + 'Brevo\\Client\\Model\\GetCampaignRecipients' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetCampaignRecipients.php', + 'Brevo\\Client\\Model\\GetCampaignStats' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetCampaignStats.php', + 'Brevo\\Client\\Model\\GetCategories' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetCategories.php', + 'Brevo\\Client\\Model\\GetCategoryDetails' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetCategoryDetails.php', + 'Brevo\\Client\\Model\\GetChildAccountCreationStatus' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetChildAccountCreationStatus.php', + 'Brevo\\Client\\Model\\GetChildDomain' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetChildDomain.php', + 'Brevo\\Client\\Model\\GetChildDomains' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetChildDomains.php', + 'Brevo\\Client\\Model\\GetChildInfo' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetChildInfo.php', + 'Brevo\\Client\\Model\\GetChildInfoApiKeys' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetChildInfoApiKeys.php', + 'Brevo\\Client\\Model\\GetChildInfoApiKeysV2' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetChildInfoApiKeysV2.php', + 'Brevo\\Client\\Model\\GetChildInfoApiKeysV3' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetChildInfoApiKeysV3.php', + 'Brevo\\Client\\Model\\GetChildInfoCredits' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetChildInfoCredits.php', + 'Brevo\\Client\\Model\\GetChildInfoStatistics' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetChildInfoStatistics.php', + 'Brevo\\Client\\Model\\GetChildrenList' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetChildrenList.php', + 'Brevo\\Client\\Model\\GetClient' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetClient.php', + 'Brevo\\Client\\Model\\GetContactCampaignStats' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetContactCampaignStats.php', + 'Brevo\\Client\\Model\\GetContactCampaignStatsClicked' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetContactCampaignStatsClicked.php', + 'Brevo\\Client\\Model\\GetContactCampaignStatsOpened' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetContactCampaignStatsOpened.php', + 'Brevo\\Client\\Model\\GetContactCampaignStatsTransacAttributes' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetContactCampaignStatsTransacAttributes.php', + 'Brevo\\Client\\Model\\GetContactCampaignStatsUnsubscriptions' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetContactCampaignStatsUnsubscriptions.php', + 'Brevo\\Client\\Model\\GetContactDetails' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetContactDetails.php', + 'Brevo\\Client\\Model\\GetContacts' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetContacts.php', + 'Brevo\\Client\\Model\\GetCorporateInvitedUsersList' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetCorporateInvitedUsersList.php', + 'Brevo\\Client\\Model\\GetCorporateInvitedUsersListFeatureAccess' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetCorporateInvitedUsersListFeatureAccess.php', + 'Brevo\\Client\\Model\\GetCorporateInvitedUsersListGroups' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetCorporateInvitedUsersListGroups.php', + 'Brevo\\Client\\Model\\GetCorporateInvitedUsersListUsers' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetCorporateInvitedUsersListUsers.php', + 'Brevo\\Client\\Model\\GetCouponCollection' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetCouponCollection.php', + 'Brevo\\Client\\Model\\GetDeviceBrowserStats' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetDeviceBrowserStats.php', + 'Brevo\\Client\\Model\\GetDomainConfigurationModel' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetDomainConfigurationModel.php', + 'Brevo\\Client\\Model\\GetDomainsList' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetDomainsList.php', + 'Brevo\\Client\\Model\\GetDomainsListDomains' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetDomainsListDomains.php', + 'Brevo\\Client\\Model\\GetEmailCampaign' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetEmailCampaign.php', + 'Brevo\\Client\\Model\\GetEmailCampaigns' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetEmailCampaigns.php', + 'Brevo\\Client\\Model\\GetEmailEventReport' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetEmailEventReport.php', + 'Brevo\\Client\\Model\\GetEmailEventReportEvents' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetEmailEventReportEvents.php', + 'Brevo\\Client\\Model\\GetExtendedCampaignOverview' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetExtendedCampaignOverview.php', + 'Brevo\\Client\\Model\\GetExtendedCampaignOverviewSender' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetExtendedCampaignOverviewSender.php', + 'Brevo\\Client\\Model\\GetExtendedCampaignStats' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetExtendedCampaignStats.php', + 'Brevo\\Client\\Model\\GetExtendedCampaignStatsGlobalStats' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetExtendedCampaignStatsGlobalStats.php', + 'Brevo\\Client\\Model\\GetExtendedClient' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetExtendedClient.php', + 'Brevo\\Client\\Model\\GetExtendedClientAddress' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetExtendedClientAddress.php', + 'Brevo\\Client\\Model\\GetExtendedContactDetails' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetExtendedContactDetails.php', + 'Brevo\\Client\\Model\\GetExtendedContactDetailsStatistics' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatistics.php', + 'Brevo\\Client\\Model\\GetExtendedContactDetailsStatisticsClicked' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsClicked.php', + 'Brevo\\Client\\Model\\GetExtendedContactDetailsStatisticsDelivered' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsDelivered.php', + 'Brevo\\Client\\Model\\GetExtendedContactDetailsStatisticsLinks' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsLinks.php', + 'Brevo\\Client\\Model\\GetExtendedContactDetailsStatisticsMessagesSent' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsMessagesSent.php', + 'Brevo\\Client\\Model\\GetExtendedContactDetailsStatisticsOpened' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsOpened.php', + 'Brevo\\Client\\Model\\GetExtendedContactDetailsStatisticsUnsubscriptions' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsUnsubscriptions.php', + 'Brevo\\Client\\Model\\GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.php', + 'Brevo\\Client\\Model\\GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.php', + 'Brevo\\Client\\Model\\GetExtendedList' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetExtendedList.php', + 'Brevo\\Client\\Model\\GetExtendedListCampaignStats' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetExtendedListCampaignStats.php', + 'Brevo\\Client\\Model\\GetExternalFeedByUUID' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetExternalFeedByUUID.php', + 'Brevo\\Client\\Model\\GetExternalFeedByUUIDHeaders' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetExternalFeedByUUIDHeaders.php', + 'Brevo\\Client\\Model\\GetFolder' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetFolder.php', + 'Brevo\\Client\\Model\\GetFolderLists' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetFolderLists.php', + 'Brevo\\Client\\Model\\GetFolders' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetFolders.php', + 'Brevo\\Client\\Model\\GetInboundEmailEvents' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetInboundEmailEvents.php', + 'Brevo\\Client\\Model\\GetInboundEmailEventsByUuid' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetInboundEmailEventsByUuid.php', + 'Brevo\\Client\\Model\\GetInboundEmailEventsByUuidAttachments' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetInboundEmailEventsByUuidAttachments.php', + 'Brevo\\Client\\Model\\GetInboundEmailEventsByUuidLogs' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetInboundEmailEventsByUuidLogs.php', + 'Brevo\\Client\\Model\\GetInboundEmailEventsEvents' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetInboundEmailEventsEvents.php', + 'Brevo\\Client\\Model\\GetInvitedUsersList' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetInvitedUsersList.php', + 'Brevo\\Client\\Model\\GetInvitedUsersListFeatureAccess' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetInvitedUsersListFeatureAccess.php', + 'Brevo\\Client\\Model\\GetInvitedUsersListUsers' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetInvitedUsersListUsers.php', + 'Brevo\\Client\\Model\\GetIp' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetIp.php', + 'Brevo\\Client\\Model\\GetIpFromSender' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetIpFromSender.php', + 'Brevo\\Client\\Model\\GetIps' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetIps.php', + 'Brevo\\Client\\Model\\GetIpsFromSender' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetIpsFromSender.php', + 'Brevo\\Client\\Model\\GetList' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetList.php', + 'Brevo\\Client\\Model\\GetLists' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetLists.php', + 'Brevo\\Client\\Model\\GetOrders' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetOrders.php', + 'Brevo\\Client\\Model\\GetProcess' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetProcess.php', + 'Brevo\\Client\\Model\\GetProcesses' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetProcesses.php', + 'Brevo\\Client\\Model\\GetProductDetails' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetProductDetails.php', + 'Brevo\\Client\\Model\\GetProducts' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetProducts.php', + 'Brevo\\Client\\Model\\GetReports' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetReports.php', + 'Brevo\\Client\\Model\\GetReportsReports' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetReportsReports.php', + 'Brevo\\Client\\Model\\GetScheduledEmailByBatchId' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetScheduledEmailByBatchId.php', + 'Brevo\\Client\\Model\\GetScheduledEmailByBatchIdBatches' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetScheduledEmailByBatchIdBatches.php', + 'Brevo\\Client\\Model\\GetScheduledEmailByMessageId' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetScheduledEmailByMessageId.php', + 'Brevo\\Client\\Model\\GetSegments' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetSegments.php', + 'Brevo\\Client\\Model\\GetSegmentsSegments' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetSegmentsSegments.php', + 'Brevo\\Client\\Model\\GetSendersList' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetSendersList.php', + 'Brevo\\Client\\Model\\GetSendersListIps' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetSendersListIps.php', + 'Brevo\\Client\\Model\\GetSendersListSenders' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetSendersListSenders.php', + 'Brevo\\Client\\Model\\GetSharedTemplateUrl' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetSharedTemplateUrl.php', + 'Brevo\\Client\\Model\\GetSmsCampaign' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetSmsCampaign.php', + 'Brevo\\Client\\Model\\GetSmsCampaignOverview' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetSmsCampaignOverview.php', + 'Brevo\\Client\\Model\\GetSmsCampaignRecipients' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetSmsCampaignRecipients.php', + 'Brevo\\Client\\Model\\GetSmsCampaignStats' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetSmsCampaignStats.php', + 'Brevo\\Client\\Model\\GetSmsCampaigns' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetSmsCampaigns.php', + 'Brevo\\Client\\Model\\GetSmsEventReport' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetSmsEventReport.php', + 'Brevo\\Client\\Model\\GetSmsEventReportEvents' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetSmsEventReportEvents.php', + 'Brevo\\Client\\Model\\GetSmtpTemplateOverview' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetSmtpTemplateOverview.php', + 'Brevo\\Client\\Model\\GetSmtpTemplateOverviewSender' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetSmtpTemplateOverviewSender.php', + 'Brevo\\Client\\Model\\GetSmtpTemplates' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetSmtpTemplates.php', + 'Brevo\\Client\\Model\\GetSsoToken' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetSsoToken.php', + 'Brevo\\Client\\Model\\GetStatsByBrowser' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetStatsByBrowser.php', + 'Brevo\\Client\\Model\\GetStatsByDevice' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetStatsByDevice.php', + 'Brevo\\Client\\Model\\GetStatsByDomain' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetStatsByDomain.php', + 'Brevo\\Client\\Model\\GetTransacAggregatedSmsReport' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetTransacAggregatedSmsReport.php', + 'Brevo\\Client\\Model\\GetTransacBlockedContacts' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetTransacBlockedContacts.php', + 'Brevo\\Client\\Model\\GetTransacBlockedContactsContacts' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetTransacBlockedContactsContacts.php', + 'Brevo\\Client\\Model\\GetTransacBlockedContactsReason' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetTransacBlockedContactsReason.php', + 'Brevo\\Client\\Model\\GetTransacEmailContent' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetTransacEmailContent.php', + 'Brevo\\Client\\Model\\GetTransacEmailContentEvents' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetTransacEmailContentEvents.php', + 'Brevo\\Client\\Model\\GetTransacEmailsList' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetTransacEmailsList.php', + 'Brevo\\Client\\Model\\GetTransacEmailsListTransactionalEmails' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetTransacEmailsListTransactionalEmails.php', + 'Brevo\\Client\\Model\\GetTransacSmsReport' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetTransacSmsReport.php', + 'Brevo\\Client\\Model\\GetTransacSmsReportReports' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetTransacSmsReportReports.php', + 'Brevo\\Client\\Model\\GetUserPermission' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetUserPermission.php', + 'Brevo\\Client\\Model\\GetUserPermissionPrivileges' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetUserPermissionPrivileges.php', + 'Brevo\\Client\\Model\\GetWATemplates' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetWATemplates.php', + 'Brevo\\Client\\Model\\GetWATemplatesTemplates' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetWATemplatesTemplates.php', + 'Brevo\\Client\\Model\\GetWebhook' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetWebhook.php', + 'Brevo\\Client\\Model\\GetWebhookAuth' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetWebhookAuth.php', + 'Brevo\\Client\\Model\\GetWebhookHeaders' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetWebhookHeaders.php', + 'Brevo\\Client\\Model\\GetWebhooks' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetWebhooks.php', + 'Brevo\\Client\\Model\\GetWhatsAppConfig' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetWhatsAppConfig.php', + 'Brevo\\Client\\Model\\GetWhatsappCampaignOverview' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetWhatsappCampaignOverview.php', + 'Brevo\\Client\\Model\\GetWhatsappCampaigns' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetWhatsappCampaigns.php', + 'Brevo\\Client\\Model\\GetWhatsappCampaignsCampaigns' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetWhatsappCampaignsCampaigns.php', + 'Brevo\\Client\\Model\\GetWhatsappEventReport' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetWhatsappEventReport.php', + 'Brevo\\Client\\Model\\GetWhatsappEventReportEvents' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/GetWhatsappEventReportEvents.php', + 'Brevo\\Client\\Model\\InlineResponse200' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/InlineResponse200.php', + 'Brevo\\Client\\Model\\InlineResponse2001' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/InlineResponse2001.php', + 'Brevo\\Client\\Model\\InlineResponse2002' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/InlineResponse2002.php', + 'Brevo\\Client\\Model\\InlineResponse201' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/InlineResponse201.php', + 'Brevo\\Client\\Model\\InlineResponse2011' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/InlineResponse2011.php', + 'Brevo\\Client\\Model\\InlineResponse2012' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/InlineResponse2012.php', + 'Brevo\\Client\\Model\\InlineResponse2013' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/InlineResponse2013.php', + 'Brevo\\Client\\Model\\InlineResponse2014' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/InlineResponse2014.php', + 'Brevo\\Client\\Model\\InlineResponse2015' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/InlineResponse2015.php', + 'Brevo\\Client\\Model\\InviteAdminUser' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/InviteAdminUser.php', + 'Brevo\\Client\\Model\\InviteAdminUserPrivileges' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/InviteAdminUserPrivileges.php', + 'Brevo\\Client\\Model\\Inviteuser' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/Inviteuser.php', + 'Brevo\\Client\\Model\\InviteuserPrivileges' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/InviteuserPrivileges.php', + 'Brevo\\Client\\Model\\ManageIp' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/ManageIp.php', + 'Brevo\\Client\\Model\\MasterDetailsResponse' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/MasterDetailsResponse.php', + 'Brevo\\Client\\Model\\MasterDetailsResponseBillingInfo' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/MasterDetailsResponseBillingInfo.php', + 'Brevo\\Client\\Model\\MasterDetailsResponseBillingInfoAddress' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/MasterDetailsResponseBillingInfoAddress.php', + 'Brevo\\Client\\Model\\MasterDetailsResponseBillingInfoName' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/MasterDetailsResponseBillingInfoName.php', + 'Brevo\\Client\\Model\\MasterDetailsResponsePlanInfo' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/MasterDetailsResponsePlanInfo.php', + 'Brevo\\Client\\Model\\MasterDetailsResponsePlanInfoFeatures' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/MasterDetailsResponsePlanInfoFeatures.php', + 'Brevo\\Client\\Model\\ModelInterface' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/ModelInterface.php', + 'Brevo\\Client\\Model\\Note' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/Note.php', + 'Brevo\\Client\\Model\\NoteData' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/NoteData.php', + 'Brevo\\Client\\Model\\NoteId' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/NoteId.php', + 'Brevo\\Client\\Model\\NoteList' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/NoteList.php', + 'Brevo\\Client\\Model\\Order' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/Order.php', + 'Brevo\\Client\\Model\\OrderBatch' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/OrderBatch.php', + 'Brevo\\Client\\Model\\OrderBilling' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/OrderBilling.php', + 'Brevo\\Client\\Model\\OrderProducts' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/OrderProducts.php', + 'Brevo\\Client\\Model\\Otp' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/Otp.php', + 'Brevo\\Client\\Model\\Pipeline' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/Pipeline.php', + 'Brevo\\Client\\Model\\PipelineStage' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/PipelineStage.php', + 'Brevo\\Client\\Model\\Pipelines' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/Pipelines.php', + 'Brevo\\Client\\Model\\PostContactInfo' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/PostContactInfo.php', + 'Brevo\\Client\\Model\\PostContactInfoContacts' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/PostContactInfoContacts.php', + 'Brevo\\Client\\Model\\PostSendFailed' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/PostSendFailed.php', + 'Brevo\\Client\\Model\\PostSendSmsTestFailed' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/PostSendSmsTestFailed.php', + 'Brevo\\Client\\Model\\PutRevokeUserPermission' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/PutRevokeUserPermission.php', + 'Brevo\\Client\\Model\\Putresendcancelinvitation' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/Putresendcancelinvitation.php', + 'Brevo\\Client\\Model\\RemainingCreditModel' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/RemainingCreditModel.php', + 'Brevo\\Client\\Model\\RemainingCreditModelChild' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/RemainingCreditModelChild.php', + 'Brevo\\Client\\Model\\RemainingCreditModelReseller' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/RemainingCreditModelReseller.php', + 'Brevo\\Client\\Model\\RemoveContactFromList' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/RemoveContactFromList.php', + 'Brevo\\Client\\Model\\RemoveCredits' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/RemoveCredits.php', + 'Brevo\\Client\\Model\\RequestContactExport' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/RequestContactExport.php', + 'Brevo\\Client\\Model\\RequestContactExportCustomContactFilter' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/RequestContactExportCustomContactFilter.php', + 'Brevo\\Client\\Model\\RequestContactImport' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/RequestContactImport.php', + 'Brevo\\Client\\Model\\RequestContactImportJsonBody' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/RequestContactImportJsonBody.php', + 'Brevo\\Client\\Model\\RequestContactImportNewList' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/RequestContactImportNewList.php', + 'Brevo\\Client\\Model\\RequestSmsRecipientExport' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/RequestSmsRecipientExport.php', + 'Brevo\\Client\\Model\\ScheduleSmtpEmail' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/ScheduleSmtpEmail.php', + 'Brevo\\Client\\Model\\SendReport' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/SendReport.php', + 'Brevo\\Client\\Model\\SendReportEmail' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/SendReportEmail.php', + 'Brevo\\Client\\Model\\SendSms' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/SendSms.php', + 'Brevo\\Client\\Model\\SendSmtpEmail' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/SendSmtpEmail.php', + 'Brevo\\Client\\Model\\SendSmtpEmailAttachment' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/SendSmtpEmailAttachment.php', + 'Brevo\\Client\\Model\\SendSmtpEmailBcc' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/SendSmtpEmailBcc.php', + 'Brevo\\Client\\Model\\SendSmtpEmailCc' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/SendSmtpEmailCc.php', + 'Brevo\\Client\\Model\\SendSmtpEmailMessageVersions' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/SendSmtpEmailMessageVersions.php', + 'Brevo\\Client\\Model\\SendSmtpEmailReplyTo' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/SendSmtpEmailReplyTo.php', + 'Brevo\\Client\\Model\\SendSmtpEmailReplyTo1' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/SendSmtpEmailReplyTo1.php', + 'Brevo\\Client\\Model\\SendSmtpEmailSender' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/SendSmtpEmailSender.php', + 'Brevo\\Client\\Model\\SendSmtpEmailTo' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/SendSmtpEmailTo.php', + 'Brevo\\Client\\Model\\SendSmtpEmailTo1' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/SendSmtpEmailTo1.php', + 'Brevo\\Client\\Model\\SendTestEmail' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/SendTestEmail.php', + 'Brevo\\Client\\Model\\SendTestSms' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/SendTestSms.php', + 'Brevo\\Client\\Model\\SendTransacSms' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/SendTransacSms.php', + 'Brevo\\Client\\Model\\SendWhatsappMessage' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/SendWhatsappMessage.php', + 'Brevo\\Client\\Model\\SsoTokenRequest' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/SsoTokenRequest.php', + 'Brevo\\Client\\Model\\SubAccountAppsToggleRequest' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/SubAccountAppsToggleRequest.php', + 'Brevo\\Client\\Model\\SubAccountDetailsResponse' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponse.php', + 'Brevo\\Client\\Model\\SubAccountDetailsResponsePlanInfo' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponsePlanInfo.php', + 'Brevo\\Client\\Model\\SubAccountDetailsResponsePlanInfoCredits' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponsePlanInfoCredits.php', + 'Brevo\\Client\\Model\\SubAccountDetailsResponsePlanInfoCreditsEmails' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponsePlanInfoCreditsEmails.php', + 'Brevo\\Client\\Model\\SubAccountDetailsResponsePlanInfoFeatures' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponsePlanInfoFeatures.php', + 'Brevo\\Client\\Model\\SubAccountDetailsResponsePlanInfoFeaturesInbox' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponsePlanInfoFeaturesInbox.php', + 'Brevo\\Client\\Model\\SubAccountDetailsResponsePlanInfoFeaturesLandingPage' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponsePlanInfoFeaturesLandingPage.php', + 'Brevo\\Client\\Model\\SubAccountDetailsResponsePlanInfoFeaturesUsers' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponsePlanInfoFeaturesUsers.php', + 'Brevo\\Client\\Model\\SubAccountUpdatePlanRequest' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/SubAccountUpdatePlanRequest.php', + 'Brevo\\Client\\Model\\SubAccountUpdatePlanRequestCredits' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/SubAccountUpdatePlanRequestCredits.php', + 'Brevo\\Client\\Model\\SubAccountUpdatePlanRequestFeatures' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/SubAccountUpdatePlanRequestFeatures.php', + 'Brevo\\Client\\Model\\SubAccountsResponse' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/SubAccountsResponse.php', + 'Brevo\\Client\\Model\\SubAccountsResponseSubAccounts' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/SubAccountsResponseSubAccounts.php', + 'Brevo\\Client\\Model\\Task' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/Task.php', + 'Brevo\\Client\\Model\\TaskList' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/TaskList.php', + 'Brevo\\Client\\Model\\TaskReminder' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/TaskReminder.php', + 'Brevo\\Client\\Model\\TaskTypes' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/TaskTypes.php', + 'Brevo\\Client\\Model\\UpdateAttribute' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/UpdateAttribute.php', + 'Brevo\\Client\\Model\\UpdateAttributeEnumeration' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/UpdateAttributeEnumeration.php', + 'Brevo\\Client\\Model\\UpdateBatchContacts' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/UpdateBatchContacts.php', + 'Brevo\\Client\\Model\\UpdateBatchContactsContacts' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/UpdateBatchContactsContacts.php', + 'Brevo\\Client\\Model\\UpdateBatchContactsModel' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/UpdateBatchContactsModel.php', + 'Brevo\\Client\\Model\\UpdateCampaignStatus' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/UpdateCampaignStatus.php', + 'Brevo\\Client\\Model\\UpdateChild' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/UpdateChild.php', + 'Brevo\\Client\\Model\\UpdateChildAccountStatus' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/UpdateChildAccountStatus.php', + 'Brevo\\Client\\Model\\UpdateChildDomain' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/UpdateChildDomain.php', + 'Brevo\\Client\\Model\\UpdateContact' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/UpdateContact.php', + 'Brevo\\Client\\Model\\UpdateCouponCollection' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/UpdateCouponCollection.php', + 'Brevo\\Client\\Model\\UpdateEmailCampaign' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/UpdateEmailCampaign.php', + 'Brevo\\Client\\Model\\UpdateEmailCampaignRecipients' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/UpdateEmailCampaignRecipients.php', + 'Brevo\\Client\\Model\\UpdateEmailCampaignSender' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/UpdateEmailCampaignSender.php', + 'Brevo\\Client\\Model\\UpdateExternalFeed' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/UpdateExternalFeed.php', + 'Brevo\\Client\\Model\\UpdateList' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/UpdateList.php', + 'Brevo\\Client\\Model\\UpdateSender' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/UpdateSender.php', + 'Brevo\\Client\\Model\\UpdateSmsCampaign' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/UpdateSmsCampaign.php', + 'Brevo\\Client\\Model\\UpdateSmtpTemplate' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/UpdateSmtpTemplate.php', + 'Brevo\\Client\\Model\\UpdateSmtpTemplateSender' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/UpdateSmtpTemplateSender.php', + 'Brevo\\Client\\Model\\UpdateWebhook' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/UpdateWebhook.php', + 'Brevo\\Client\\Model\\UpdateWhatsAppCampaign' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/UpdateWhatsAppCampaign.php', + 'Brevo\\Client\\Model\\UploadImageModel' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/UploadImageModel.php', + 'Brevo\\Client\\Model\\UploadImageToGallery' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/UploadImageToGallery.php', + 'Brevo\\Client\\Model\\VariablesItems' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/VariablesItems.php', + 'Brevo\\Client\\Model\\WhatsappCampStats' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/WhatsappCampStats.php', + 'Brevo\\Client\\Model\\WhatsappCampTemplate' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/Model/WhatsappCampTemplate.php', + 'Brevo\\Client\\ObjectSerializer' => __DIR__ . '/..' . '/getbrevo/brevo-php/lib/ObjectSerializer.php', 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', 'Composer\\Semver\\Comparator' => __DIR__ . '/..' . '/composer/semver/src/Comparator.php', 'Composer\\Semver\\CompilingMatcher' => __DIR__ . '/..' . '/composer/semver/src/CompilingMatcher.php', @@ -142,6 +564,92 @@ class ComposerStaticInit749a661738bcd5b9428c88a1da847bc7 'Composer\\Semver\\Intervals' => __DIR__ . '/..' . '/composer/semver/src/Intervals.php', 'Composer\\Semver\\Semver' => __DIR__ . '/..' . '/composer/semver/src/Semver.php', 'Composer\\Semver\\VersionParser' => __DIR__ . '/..' . '/composer/semver/src/VersionParser.php', + 'GuzzleHttp\\BodySummarizer' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/BodySummarizer.php', + 'GuzzleHttp\\BodySummarizerInterface' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/BodySummarizerInterface.php', + 'GuzzleHttp\\Client' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Client.php', + 'GuzzleHttp\\ClientInterface' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/ClientInterface.php', + 'GuzzleHttp\\ClientTrait' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/ClientTrait.php', + 'GuzzleHttp\\Cookie\\CookieJar' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Cookie/CookieJar.php', + 'GuzzleHttp\\Cookie\\CookieJarInterface' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php', + 'GuzzleHttp\\Cookie\\FileCookieJar' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php', + 'GuzzleHttp\\Cookie\\SessionCookieJar' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php', + 'GuzzleHttp\\Cookie\\SetCookie' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Cookie/SetCookie.php', + 'GuzzleHttp\\Exception\\BadResponseException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/BadResponseException.php', + 'GuzzleHttp\\Exception\\ClientException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/ClientException.php', + 'GuzzleHttp\\Exception\\ConnectException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/ConnectException.php', + 'GuzzleHttp\\Exception\\GuzzleException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/GuzzleException.php', + 'GuzzleHttp\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php', + 'GuzzleHttp\\Exception\\RequestException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/RequestException.php', + 'GuzzleHttp\\Exception\\ServerException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/ServerException.php', + 'GuzzleHttp\\Exception\\TooManyRedirectsException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php', + 'GuzzleHttp\\Exception\\TransferException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/TransferException.php', + 'GuzzleHttp\\HandlerStack' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/HandlerStack.php', + 'GuzzleHttp\\Handler\\CurlFactory' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/CurlFactory.php', + 'GuzzleHttp\\Handler\\CurlFactoryInterface' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php', + 'GuzzleHttp\\Handler\\CurlHandler' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/CurlHandler.php', + 'GuzzleHttp\\Handler\\CurlMultiHandler' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php', + 'GuzzleHttp\\Handler\\EasyHandle' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/EasyHandle.php', + 'GuzzleHttp\\Handler\\HeaderProcessor' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/HeaderProcessor.php', + 'GuzzleHttp\\Handler\\MockHandler' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/MockHandler.php', + 'GuzzleHttp\\Handler\\Proxy' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/Proxy.php', + 'GuzzleHttp\\Handler\\StreamHandler' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/StreamHandler.php', + 'GuzzleHttp\\MessageFormatter' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/MessageFormatter.php', + 'GuzzleHttp\\MessageFormatterInterface' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/MessageFormatterInterface.php', + 'GuzzleHttp\\Middleware' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Middleware.php', + 'GuzzleHttp\\Pool' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Pool.php', + 'GuzzleHttp\\PrepareBodyMiddleware' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php', + 'GuzzleHttp\\Promise\\AggregateException' => __DIR__ . '/..' . '/guzzlehttp/promises/src/AggregateException.php', + 'GuzzleHttp\\Promise\\CancellationException' => __DIR__ . '/..' . '/guzzlehttp/promises/src/CancellationException.php', + 'GuzzleHttp\\Promise\\Coroutine' => __DIR__ . '/..' . '/guzzlehttp/promises/src/Coroutine.php', + 'GuzzleHttp\\Promise\\Create' => __DIR__ . '/..' . '/guzzlehttp/promises/src/Create.php', + 'GuzzleHttp\\Promise\\Each' => __DIR__ . '/..' . '/guzzlehttp/promises/src/Each.php', + 'GuzzleHttp\\Promise\\EachPromise' => __DIR__ . '/..' . '/guzzlehttp/promises/src/EachPromise.php', + 'GuzzleHttp\\Promise\\FulfilledPromise' => __DIR__ . '/..' . '/guzzlehttp/promises/src/FulfilledPromise.php', + 'GuzzleHttp\\Promise\\Is' => __DIR__ . '/..' . '/guzzlehttp/promises/src/Is.php', + 'GuzzleHttp\\Promise\\Promise' => __DIR__ . '/..' . '/guzzlehttp/promises/src/Promise.php', + 'GuzzleHttp\\Promise\\PromiseInterface' => __DIR__ . '/..' . '/guzzlehttp/promises/src/PromiseInterface.php', + 'GuzzleHttp\\Promise\\PromisorInterface' => __DIR__ . '/..' . '/guzzlehttp/promises/src/PromisorInterface.php', + 'GuzzleHttp\\Promise\\RejectedPromise' => __DIR__ . '/..' . '/guzzlehttp/promises/src/RejectedPromise.php', + 'GuzzleHttp\\Promise\\RejectionException' => __DIR__ . '/..' . '/guzzlehttp/promises/src/RejectionException.php', + 'GuzzleHttp\\Promise\\TaskQueue' => __DIR__ . '/..' . '/guzzlehttp/promises/src/TaskQueue.php', + 'GuzzleHttp\\Promise\\TaskQueueInterface' => __DIR__ . '/..' . '/guzzlehttp/promises/src/TaskQueueInterface.php', + 'GuzzleHttp\\Promise\\Utils' => __DIR__ . '/..' . '/guzzlehttp/promises/src/Utils.php', + 'GuzzleHttp\\Psr7\\AppendStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/AppendStream.php', + 'GuzzleHttp\\Psr7\\BufferStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/BufferStream.php', + 'GuzzleHttp\\Psr7\\CachingStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/CachingStream.php', + 'GuzzleHttp\\Psr7\\DroppingStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/DroppingStream.php', + 'GuzzleHttp\\Psr7\\Exception\\MalformedUriException' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Exception/MalformedUriException.php', + 'GuzzleHttp\\Psr7\\FnStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/FnStream.php', + 'GuzzleHttp\\Psr7\\Header' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Header.php', + 'GuzzleHttp\\Psr7\\HttpFactory' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/HttpFactory.php', + 'GuzzleHttp\\Psr7\\InflateStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/InflateStream.php', + 'GuzzleHttp\\Psr7\\LazyOpenStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/LazyOpenStream.php', + 'GuzzleHttp\\Psr7\\LimitStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/LimitStream.php', + 'GuzzleHttp\\Psr7\\Message' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Message.php', + 'GuzzleHttp\\Psr7\\MessageTrait' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/MessageTrait.php', + 'GuzzleHttp\\Psr7\\MimeType' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/MimeType.php', + 'GuzzleHttp\\Psr7\\MultipartStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/MultipartStream.php', + 'GuzzleHttp\\Psr7\\NoSeekStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/NoSeekStream.php', + 'GuzzleHttp\\Psr7\\PumpStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/PumpStream.php', + 'GuzzleHttp\\Psr7\\Query' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Query.php', + 'GuzzleHttp\\Psr7\\Request' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Request.php', + 'GuzzleHttp\\Psr7\\Response' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Response.php', + 'GuzzleHttp\\Psr7\\Rfc7230' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Rfc7230.php', + 'GuzzleHttp\\Psr7\\ServerRequest' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/ServerRequest.php', + 'GuzzleHttp\\Psr7\\Stream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Stream.php', + 'GuzzleHttp\\Psr7\\StreamDecoratorTrait' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/StreamDecoratorTrait.php', + 'GuzzleHttp\\Psr7\\StreamWrapper' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/StreamWrapper.php', + 'GuzzleHttp\\Psr7\\UploadedFile' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/UploadedFile.php', + 'GuzzleHttp\\Psr7\\Uri' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Uri.php', + 'GuzzleHttp\\Psr7\\UriComparator' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/UriComparator.php', + 'GuzzleHttp\\Psr7\\UriNormalizer' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/UriNormalizer.php', + 'GuzzleHttp\\Psr7\\UriResolver' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/UriResolver.php', + 'GuzzleHttp\\Psr7\\Utils' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Utils.php', + 'GuzzleHttp\\RedirectMiddleware' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/RedirectMiddleware.php', + 'GuzzleHttp\\RequestOptions' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/RequestOptions.php', + 'GuzzleHttp\\RetryMiddleware' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/RetryMiddleware.php', + 'GuzzleHttp\\TransferStats' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/TransferStats.php', + 'GuzzleHttp\\Utils' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Utils.php', 'Kirby\\Api\\Api' => __DIR__ . '/../..' . '/kirby/src/Api/Api.php', 'Kirby\\Api\\Collection' => __DIR__ . '/../..' . '/kirby/src/Api/Collection.php', 'Kirby\\Api\\Model' => __DIR__ . '/../..' . '/kirby/src/Api/Model.php', @@ -482,6 +990,23 @@ class ComposerStaticInit749a661738bcd5b9428c88a1da847bc7 'PHPMailer\\PHPMailer\\SMTP' => __DIR__ . '/..' . '/phpmailer/phpmailer/src/SMTP.php', 'Parsedown' => __DIR__ . '/../..' . '/kirby/dependencies/parsedown/Parsedown.php', 'ParsedownExtra' => __DIR__ . '/../..' . '/kirby/dependencies/parsedown-extra/ParsedownExtra.php', + 'Psr\\Http\\Client\\ClientExceptionInterface' => __DIR__ . '/..' . '/psr/http-client/src/ClientExceptionInterface.php', + 'Psr\\Http\\Client\\ClientInterface' => __DIR__ . '/..' . '/psr/http-client/src/ClientInterface.php', + 'Psr\\Http\\Client\\NetworkExceptionInterface' => __DIR__ . '/..' . '/psr/http-client/src/NetworkExceptionInterface.php', + 'Psr\\Http\\Client\\RequestExceptionInterface' => __DIR__ . '/..' . '/psr/http-client/src/RequestExceptionInterface.php', + 'Psr\\Http\\Message\\MessageInterface' => __DIR__ . '/..' . '/psr/http-message/src/MessageInterface.php', + 'Psr\\Http\\Message\\RequestFactoryInterface' => __DIR__ . '/..' . '/psr/http-factory/src/RequestFactoryInterface.php', + 'Psr\\Http\\Message\\RequestInterface' => __DIR__ . '/..' . '/psr/http-message/src/RequestInterface.php', + 'Psr\\Http\\Message\\ResponseFactoryInterface' => __DIR__ . '/..' . '/psr/http-factory/src/ResponseFactoryInterface.php', + 'Psr\\Http\\Message\\ResponseInterface' => __DIR__ . '/..' . '/psr/http-message/src/ResponseInterface.php', + 'Psr\\Http\\Message\\ServerRequestFactoryInterface' => __DIR__ . '/..' . '/psr/http-factory/src/ServerRequestFactoryInterface.php', + 'Psr\\Http\\Message\\ServerRequestInterface' => __DIR__ . '/..' . '/psr/http-message/src/ServerRequestInterface.php', + 'Psr\\Http\\Message\\StreamFactoryInterface' => __DIR__ . '/..' . '/psr/http-factory/src/StreamFactoryInterface.php', + 'Psr\\Http\\Message\\StreamInterface' => __DIR__ . '/..' . '/psr/http-message/src/StreamInterface.php', + 'Psr\\Http\\Message\\UploadedFileFactoryInterface' => __DIR__ . '/..' . '/psr/http-factory/src/UploadedFileFactoryInterface.php', + 'Psr\\Http\\Message\\UploadedFileInterface' => __DIR__ . '/..' . '/psr/http-message/src/UploadedFileInterface.php', + 'Psr\\Http\\Message\\UriFactoryInterface' => __DIR__ . '/..' . '/psr/http-factory/src/UriFactoryInterface.php', + 'Psr\\Http\\Message\\UriInterface' => __DIR__ . '/..' . '/psr/http-message/src/UriInterface.php', 'Psr\\Log\\AbstractLogger' => __DIR__ . '/..' . '/psr/log/src/AbstractLogger.php', 'Psr\\Log\\InvalidArgumentException' => __DIR__ . '/..' . '/psr/log/src/InvalidArgumentException.php', 'Psr\\Log\\LogLevel' => __DIR__ . '/..' . '/psr/log/src/LogLevel.php', diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 687ae7b..ae31389 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -276,6 +276,72 @@ ], "install-path": "../filp/whoops" }, + { + "name": "getbrevo/brevo-php", + "version": "v2.0.2", + "version_normalized": "2.0.2.0", + "source": { + "type": "git", + "url": "https://github.com/getbrevo/brevo-php.git", + "reference": "d090995afd88ff9d6f1284d7f9adaff0c6a58949" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/getbrevo/brevo-php/zipball/d090995afd88ff9d6f1284d7f9adaff0c6a58949", + "reference": "d090995afd88ff9d6f1284d7f9adaff0c6a58949", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "ext-json": "*", + "ext-mbstring": "*", + "guzzlehttp/guzzle": "^7.4.0", + "php": ">=5.6" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "~1.12", + "phpunit/phpunit": "^4.8", + "squizlabs/php_codesniffer": "~2.6" + }, + "time": "2024-08-12T07:30:54+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Brevo\\Client\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brevo Developers", + "email": "contact@brevo.com", + "homepage": "https://www.brevo.com/" + } + ], + "description": "Official Brevo provided RESTFul API V3 php library", + "homepage": "https://github.com/getbrevo/brevo-php", + "keywords": [ + "api", + "brevo", + "php", + "sdk", + "swagger" + ], + "support": { + "issues": "https://github.com/getbrevo/brevo-php/issues", + "source": "https://github.com/getbrevo/brevo-php/tree/v2.0.2" + }, + "install-path": "../getbrevo/brevo-php" + }, { "name": "getkirby/cms", "version": "4.3.0", @@ -432,6 +498,340 @@ ], "install-path": "../getkirby/composer-installer" }, + { + "name": "guzzlehttp/guzzle", + "version": "7.9.2", + "version_normalized": "7.9.2.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "d281ed313b989f213357e3be1a179f02196ac99b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d281ed313b989f213357e3be1a179f02196ac99b", + "reference": "d281ed313b989f213357e3be1a179f02196ac99b", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/promises": "^1.5.3 || ^2.0.3", + "guzzlehttp/psr7": "^2.7.0", + "php": "^7.2.5 || ^8.0", + "psr/http-client": "^1.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0" + }, + "provide": { + "psr/http-client-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "ext-curl": "*", + "guzzle/client-integration-tests": "3.0.2", + "php-http/message-factory": "^1.1", + "phpunit/phpunit": "^8.5.39 || ^9.6.20", + "psr/log": "^1.1 || ^2.0 || ^3.0" + }, + "suggest": { + "ext-curl": "Required for CURL handler support", + "ext-intl": "Required for Internationalized Domain Name (IDN) support", + "psr/log": "Required for using the Log middleware" + }, + "time": "2024-07-24T11:22:20+00:00", + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "installation-source": "dist", + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "psr-18", + "psr-7", + "rest", + "web service" + ], + "support": { + "issues": "https://github.com/guzzle/guzzle/issues", + "source": "https://github.com/guzzle/guzzle/tree/7.9.2" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", + "type": "tidelift" + } + ], + "install-path": "../guzzlehttp/guzzle" + }, + { + "name": "guzzlehttp/promises", + "version": "2.0.3", + "version_normalized": "2.0.3.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8", + "reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.39 || ^9.6.20" + }, + "time": "2024-07-18T10:29:17+00:00", + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "support": { + "issues": "https://github.com/guzzle/promises/issues", + "source": "https://github.com/guzzle/promises/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", + "type": "tidelift" + } + ], + "install-path": "../guzzlehttp/promises" + }, + { + "name": "guzzlehttp/psr7", + "version": "2.7.0", + "version_normalized": "2.7.0.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201", + "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.1 || ^2.0", + "ralouphie/getallheaders": "^3.0" + }, + "provide": { + "psr/http-factory-implementation": "1.0", + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "http-interop/http-factory-tests": "0.9.0", + "phpunit/phpunit": "^8.5.39 || ^9.6.20" + }, + "suggest": { + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + }, + "time": "2024-07-18T11:15:46+00:00", + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "support": { + "issues": "https://github.com/guzzle/psr7/issues", + "source": "https://github.com/guzzle/psr7/tree/2.7.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", + "type": "tidelift" + } + ], + "install-path": "../guzzlehttp/psr7" + }, { "name": "laminas/laminas-escaper", "version": "2.13.0", @@ -702,6 +1102,175 @@ ], "install-path": "../phpmailer/phpmailer" }, + { + "name": "psr/http-client", + "version": "1.0.3", + "version_normalized": "1.0.3.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-client.git", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0 || ^2.0" + }, + "time": "2023-09-23T14:17:50+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", + "keywords": [ + "http", + "http-client", + "psr", + "psr-18" + ], + "support": { + "source": "https://github.com/php-fig/http-client" + }, + "install-path": "../psr/http-client" + }, + { + "name": "psr/http-factory", + "version": "1.1.0", + "version_normalized": "1.1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "psr/http-message": "^1.0 || ^2.0" + }, + "time": "2024-04-15T12:06:14+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-factory" + }, + "install-path": "../psr/http-factory" + }, + { + "name": "psr/http-message", + "version": "2.0", + "version_normalized": "2.0.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "time": "2023-04-04T09:54:51+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/2.0" + }, + "install-path": "../psr/http-message" + }, { "name": "psr/log", "version": "3.0.0", @@ -755,6 +1324,53 @@ }, "install-path": "../psr/log" }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "version_normalized": "3.0.3.0", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "time": "2019-03-08T08:55:37+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "support": { + "issues": "https://github.com/ralouphie/getallheaders/issues", + "source": "https://github.com/ralouphie/getallheaders/tree/develop" + }, + "install-path": "../ralouphie/getallheaders" + }, { "name": "symfony/deprecation-contracts", "version": "v3.5.0", diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index b7b15d4..ec00682 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => 'getkirby/plainkit', 'pretty_version' => 'dev-main', 'version' => 'dev-main', - 'reference' => 'c98d5eb36b266cd487fe00ac87df199591ee9baa', + 'reference' => '2f836dde20404d744d921c386213a0d7df13313a', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -46,6 +46,15 @@ 'aliases' => array(), 'dev_requirement' => false, ), + 'getbrevo/brevo-php' => array( + 'pretty_version' => 'v2.0.2', + 'version' => '2.0.2.0', + 'reference' => 'd090995afd88ff9d6f1284d7f9adaff0c6a58949', + 'type' => 'library', + 'install_path' => __DIR__ . '/../getbrevo/brevo-php', + 'aliases' => array(), + 'dev_requirement' => false, + ), 'getkirby/cms' => array( 'pretty_version' => '4.3.0', 'version' => '4.3.0.0', @@ -67,12 +76,39 @@ 'getkirby/plainkit' => array( 'pretty_version' => 'dev-main', 'version' => 'dev-main', - 'reference' => 'c98d5eb36b266cd487fe00ac87df199591ee9baa', + 'reference' => '2f836dde20404d744d921c386213a0d7df13313a', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev_requirement' => false, ), + 'guzzlehttp/guzzle' => array( + 'pretty_version' => '7.9.2', + 'version' => '7.9.2.0', + 'reference' => 'd281ed313b989f213357e3be1a179f02196ac99b', + 'type' => 'library', + 'install_path' => __DIR__ . '/../guzzlehttp/guzzle', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'guzzlehttp/promises' => array( + 'pretty_version' => '2.0.3', + 'version' => '2.0.3.0', + 'reference' => '6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8', + 'type' => 'library', + 'install_path' => __DIR__ . '/../guzzlehttp/promises', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'guzzlehttp/psr7' => array( + 'pretty_version' => '2.7.0', + 'version' => '2.7.0.0', + 'reference' => 'a70f5c95fb43bc83f07c9c948baa0dc1829bf201', + 'type' => 'library', + 'install_path' => __DIR__ . '/../guzzlehttp/psr7', + 'aliases' => array(), + 'dev_requirement' => false, + ), 'laminas/laminas-escaper' => array( 'pretty_version' => '2.13.0', 'version' => '2.13.0.0', @@ -115,6 +151,51 @@ 'aliases' => array(), 'dev_requirement' => false, ), + 'psr/http-client' => array( + 'pretty_version' => '1.0.3', + 'version' => '1.0.3.0', + 'reference' => 'bb5906edc1c324c9a05aa0873d40117941e5fa90', + 'type' => 'library', + 'install_path' => __DIR__ . '/../psr/http-client', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'psr/http-client-implementation' => array( + 'dev_requirement' => false, + 'provided' => array( + 0 => '1.0', + ), + ), + 'psr/http-factory' => array( + 'pretty_version' => '1.1.0', + 'version' => '1.1.0.0', + 'reference' => '2b4765fddfe3b508ac62f829e852b1501d3f6e8a', + 'type' => 'library', + 'install_path' => __DIR__ . '/../psr/http-factory', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'psr/http-factory-implementation' => array( + 'dev_requirement' => false, + 'provided' => array( + 0 => '1.0', + ), + ), + 'psr/http-message' => array( + 'pretty_version' => '2.0', + 'version' => '2.0.0.0', + 'reference' => '402d35bcb92c70c026d1a6a9883f06b2ead23d71', + 'type' => 'library', + 'install_path' => __DIR__ . '/../psr/http-message', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'psr/http-message-implementation' => array( + 'dev_requirement' => false, + 'provided' => array( + 0 => '1.0', + ), + ), 'psr/log' => array( 'pretty_version' => '3.0.0', 'version' => '3.0.0.0', @@ -124,6 +205,15 @@ 'aliases' => array(), 'dev_requirement' => false, ), + 'ralouphie/getallheaders' => array( + 'pretty_version' => '3.0.3', + 'version' => '3.0.3.0', + 'reference' => '120b605dfeb996808c31b6477290a714d356e822', + 'type' => 'library', + 'install_path' => __DIR__ . '/../ralouphie/getallheaders', + 'aliases' => array(), + 'dev_requirement' => false, + ), 'symfony/deprecation-contracts' => array( 'pretty_version' => 'v3.5.0', 'version' => '3.5.0.0', diff --git a/vendor/getbrevo/brevo-php/.gitignore b/vendor/getbrevo/brevo-php/.gitignore new file mode 100644 index 0000000..47f36f6 --- /dev/null +++ b/vendor/getbrevo/brevo-php/.gitignore @@ -0,0 +1,2 @@ +.DS_Store +vendor \ No newline at end of file diff --git a/vendor/getbrevo/brevo-php/.travis.yml b/vendor/getbrevo/brevo-php/.travis.yml new file mode 100644 index 0000000..e93086b --- /dev/null +++ b/vendor/getbrevo/brevo-php/.travis.yml @@ -0,0 +1,7 @@ +language: php +sudo: false +php: + - 5.6 + - 7.0 +before_install: "composer install" +script: "vendor/bin/phpunit" \ No newline at end of file diff --git a/vendor/getbrevo/brevo-php/CHANGELOG.md b/vendor/getbrevo/brevo-php/CHANGELOG.md new file mode 100644 index 0000000..d84382b --- /dev/null +++ b/vendor/getbrevo/brevo-php/CHANGELOG.md @@ -0,0 +1,30 @@ +# Changelog + +## 1.0.3 (2024-03-08) +- Modification in Get all the contacts, contact can be filtered by segmentId and listIds as well + **segmentId** | **int**| Id of the segment. **Either listIds or segmentId can be passed.** | [optional] + **listIds** | [**int[]**](../Model/int.md)| Ids of the list. **Either listIds or segmentId can be passed.** | [optional] +- Modification in Get a list's details +startDate and endDate (YYYY-MM-DDTHH:mm:ss.SSSZ) support added. +- Get order details route added in eCommerceAPI +- Below routes added MasterAccountAPI + Update a group of sub-accounts + Create a new group of sub-accounts +- Below routes added In UsersApi + Update permission for a user + Send invitation to user + Revoke user permission + Resend / Cancel invitation +- In Return all your created WhatsApp templates source parameters also now supported + **source** | **string**| source of the template | [optional] + +## 1.0.2 (2023-07-17) +- Added Coupons route +- Added **previewText** | **string** | Preview text or preheader of the email campaign | [optional] +- language support for Whatsapp template creation +- Making WhatsAppCampaignsApi PSR-4 compliant. + +## 1.0.1 (2023-05-28) +- API's changed from sendinblue.com domain to api brevo.com domain +- For installation follow this process +- Follow reference example in order to use this SDK diff --git a/vendor/getbrevo/brevo-php/LICENSE.md b/vendor/getbrevo/brevo-php/LICENSE.md new file mode 100644 index 0000000..6309812 --- /dev/null +++ b/vendor/getbrevo/brevo-php/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2019 Brevo + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/getbrevo/brevo-php/README.md b/vendor/getbrevo/brevo-php/README.md new file mode 100644 index 0000000..9a49a97 --- /dev/null +++ b/vendor/getbrevo/brevo-php/README.md @@ -0,0 +1,725 @@ +# Brevo's API v3 Php Library + +Brevo's API exposes the entire Brevo features via a standardized programmatic interface. Please refer to the full [documentation](https://developers.brevo.com) to learn more. + +This is the wrapper for the API. It implements all the features of the API v3. + +Brevo's API matches the [OpenAPI v2 definition](https://www.openapis.org/). The specification can be downloaded [here](https://api.brevo.com/v3/swagger_definition.yml). + +This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project and is reviewed and maintained by Brevo: + +- API version: 3.0.0 +- Build package: io.swagger.codegen.languages.PhpClientCodegen +For more information, please visit [https://account.brevo.com/support](https://account.brevo.com/support) + +## Requirements + +PHP 5.6 and later + +## Installation & Usage +### Composer + +To install the bindings via [Composer](http://getcomposer.org/): + +Create a ```composer.json``` file in any directory & add below code in composer.json file. + +``` +{ +"require": { +"getbrevo/brevo-php": "1.x.x" +} +} +``` + +Then run below commands in the same directory +``` +composer require getbrevo/brevo-php "1.x.x" +``` + +Further do: +* run ``composer install`` to get these dependencies added to your vendor directory +* add the autoloader to your application with this line: ``require("vendor/autoload.php")`` + + +## Tests + +To run the unit tests: + +``` +composer install +./vendor/bin/phpunit +``` + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\AccountApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); + +try { + $result = $apiInstance->getAccount(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AccountApi->getAccount: ', $e->getMessage(), PHP_EOL; +} + +?> +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.brevo.com/v3* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AccountApi* | [**getAccount**](docs/Api/AccountApi.md#getaccount) | **GET** /account | Get your account information, plan and credits details +*AccountApi* | [**getAccountActivity**](docs/Api/AccountApi.md#getaccountactivity) | **GET** /organization/activities | Get user activity logs +*CompaniesApi* | [**companiesAttributesGet**](docs/Api/CompaniesApi.md#companiesattributesget) | **GET** /companies/attributes | Get company attributes +*CompaniesApi* | [**companiesGet**](docs/Api/CompaniesApi.md#companiesget) | **GET** /companies | Get all companies +*CompaniesApi* | [**companiesIdDelete**](docs/Api/CompaniesApi.md#companiesiddelete) | **DELETE** /companies/{id} | Delete a company +*CompaniesApi* | [**companiesIdGet**](docs/Api/CompaniesApi.md#companiesidget) | **GET** /companies/{id} | Get a company +*CompaniesApi* | [**companiesIdPatch**](docs/Api/CompaniesApi.md#companiesidpatch) | **PATCH** /companies/{id} | Update a company +*CompaniesApi* | [**companiesLinkUnlinkIdPatch**](docs/Api/CompaniesApi.md#companieslinkunlinkidpatch) | **PATCH** /companies/link-unlink/{id} | Link and Unlink company with contacts and deals +*CompaniesApi* | [**companiesPost**](docs/Api/CompaniesApi.md#companiespost) | **POST** /companies | Create a company +*AttributesApi* | [**createAttribute**](docs/Api/AttributesApi.md#createattribute) | **POST** /contacts/attributes/{attributeCategory}/{attributeName} | Create contact attribute +*AttributesApi* | [**deleteAttribute**](docs/Api/AttributesApi.md#deleteattribute) | **DELETE** /contacts/attributes/{attributeCategory}/{attributeName} | Delete an attribute +*AttributesApi* | [**getAttributes**](docs/Api/AttributesApi.md#getattributes) | **GET** /contacts/attributes | List all attributes +*AttributesApi* | [**updateAttribute**](docs/Api/AttributesApi.md#updateattribute) | **PUT** /contacts/attributes/{attributeCategory}/{attributeName} | Update contact attribute +*CRMApi* | [**crmNotesGet**](docs/Api/CRMApi.md#crmnotesget) | **GET** /crm/notes | Get all notes +*CRMApi* | [**crmNotesIdDelete**](docs/Api/CRMApi.md#crmnotesiddelete) | **DELETE** /crm/notes/{id} | Delete a note +*CRMApi* | [**crmNotesIdGet**](docs/Api/CRMApi.md#crmnotesidget) | **GET** /crm/notes/{id} | Get a note +*CRMApi* | [**crmNotesIdPatch**](docs/Api/CRMApi.md#crmnotesidpatch) | **PATCH** /crm/notes/{id} | Update a note +*CRMApi* | [**crmNotesPost**](docs/Api/CRMApi.md#crmnotespost) | **POST** /crm/notes | Create a note +*CRMApi* | [**crmTasksGet**](docs/Api/CRMApi.md#crmtasksget) | **GET** /crm/tasks | Get all tasks +*CRMApi* | [**crmTasksIdDelete**](docs/Api/CRMApi.md#crmtasksiddelete) | **DELETE** /crm/tasks/{id} | Delete a task +*CRMApi* | [**crmTasksIdGet**](docs/Api/CRMApi.md#crmtasksidget) | **GET** /crm/tasks/{id} | Get a task +*CRMApi* | [**crmTasksIdPatch**](docs/Api/CRMApi.md#crmtasksidpatch) | **PATCH** /crm/tasks/{id} | Update a task +*CRMApi* | [**crmTasksPost**](docs/Api/CRMApi.md#crmtaskspost) | **POST** /crm/tasks | Create a task +*CRMApi* | [**crmTasktypesGet**](docs/Api/CRMApi.md#crmtasktypesget) | **GET** /crm/tasktypes | Get all task types +*ContactsApi* | [**addContactToList**](docs/Api/ContactsApi.md#addcontacttolist) | **POST** /contacts/lists/{listId}/contacts/add | Add existing contacts to a list +*ContactsApi* | [**createAttribute**](docs/Api/ContactsApi.md#createattribute) | **POST** /contacts/attributes/{attributeCategory}/{attributeName} | Create contact attribute +*ContactsApi* | [**createContact**](docs/Api/ContactsApi.md#createcontact) | **POST** /contacts | Create a contact +*ContactsApi* | [**createDoiContact**](docs/Api/ContactsApi.md#createdoicontact) | **POST** /contacts/doubleOptinConfirmation | Create Contact via DOI (Double-Opt-In) Flow +*ContactsApi* | [**createFolder**](docs/Api/ContactsApi.md#createfolder) | **POST** /contacts/folders | Create a folder +*ContactsApi* | [**createList**](docs/Api/ContactsApi.md#createlist) | **POST** /contacts/lists | Create a list +*ContactsApi* | [**deleteAttribute**](docs/Api/ContactsApi.md#deleteattribute) | **DELETE** /contacts/attributes/{attributeCategory}/{attributeName} | Delete an attribute +*ContactsApi* | [**deleteContact**](docs/Api/ContactsApi.md#deletecontact) | **DELETE** /contacts/{identifier} | Delete a contact +*ContactsApi* | [**deleteFolder**](docs/Api/ContactsApi.md#deletefolder) | **DELETE** /contacts/folders/{folderId} | Delete a folder (and all its lists) +*ContactsApi* | [**deleteList**](docs/Api/ContactsApi.md#deletelist) | **DELETE** /contacts/lists/{listId} | Delete a list +*ContactsApi* | [**getAttributes**](docs/Api/ContactsApi.md#getattributes) | **GET** /contacts/attributes | List all attributes +*ContactsApi* | [**getContactInfo**](docs/Api/ContactsApi.md#getcontactinfo) | **GET** /contacts/{identifier} | Get a contact's details +*ContactsApi* | [**getContactStats**](docs/Api/ContactsApi.md#getcontactstats) | **GET** /contacts/{identifier}/campaignStats | Get email campaigns' statistics for a contact +*ContactsApi* | [**getContacts**](docs/Api/ContactsApi.md#getcontacts) | **GET** /contacts | Get all the contacts +*ContactsApi* | [**getContactsFromList**](docs/Api/ContactsApi.md#getcontactsfromlist) | **GET** /contacts/lists/{listId}/contacts | Get contacts in a list +*ContactsApi* | [**getFolder**](docs/Api/ContactsApi.md#getfolder) | **GET** /contacts/folders/{folderId} | Returns a folder's details +*ContactsApi* | [**getFolderLists**](docs/Api/ContactsApi.md#getfolderlists) | **GET** /contacts/folders/{folderId}/lists | Get lists in a folder +*ContactsApi* | [**getFolders**](docs/Api/ContactsApi.md#getfolders) | **GET** /contacts/folders | Get all folders +*ContactsApi* | [**getList**](docs/Api/ContactsApi.md#getlist) | **GET** /contacts/lists/{listId} | Get a list's details +*ContactsApi* | [**getLists**](docs/Api/ContactsApi.md#getlists) | **GET** /contacts/lists | Get all the lists +*ContactsApi* | [**getSegments**](docs/Api/ContactsApi.md#getsegments) | **GET** /contacts/segments | Get all the Segments +*ContactsApi* | [**importContacts**](docs/Api/ContactsApi.md#importcontacts) | **POST** /contacts/import | Import contacts +*ContactsApi* | [**removeContactFromList**](docs/Api/ContactsApi.md#removecontactfromlist) | **POST** /contacts/lists/{listId}/contacts/remove | Delete a contact from a list +*ContactsApi* | [**requestContactExport**](docs/Api/ContactsApi.md#requestcontactexport) | **POST** /contacts/export | Export contacts +*ContactsApi* | [**updateAttribute**](docs/Api/ContactsApi.md#updateattribute) | **PUT** /contacts/attributes/{attributeCategory}/{attributeName} | Update contact attribute +*ContactsApi* | [**updateBatchContacts**](docs/Api/ContactsApi.md#updatebatchcontacts) | **POST** /contacts/batch | Update multiple contacts +*ContactsApi* | [**updateContact**](docs/Api/ContactsApi.md#updatecontact) | **PUT** /contacts/{identifier} | Update a contact +*ContactsApi* | [**updateFolder**](docs/Api/ContactsApi.md#updatefolder) | **PUT** /contacts/folders/{folderId} | Update a folder +*ContactsApi* | [**updateList**](docs/Api/ContactsApi.md#updatelist) | **PUT** /contacts/lists/{listId} | Update a list +*ConversationsApi* | [**conversationsAgentOnlinePingPost**](docs/Api/ConversationsApi.md#conversationsagentonlinepingpost) | **POST** /conversations/agentOnlinePing | Sets agent’s status to online for 2-3 minutes +*ConversationsApi* | [**conversationsMessagesIdDelete**](docs/Api/ConversationsApi.md#conversationsmessagesiddelete) | **DELETE** /conversations/messages/{id} | Delete a message sent by an agent +*ConversationsApi* | [**conversationsMessagesIdGet**](docs/Api/ConversationsApi.md#conversationsmessagesidget) | **GET** /conversations/messages/{id} | Get a message +*ConversationsApi* | [**conversationsMessagesIdPut**](docs/Api/ConversationsApi.md#conversationsmessagesidput) | **PUT** /conversations/messages/{id} | Update a message sent by an agent +*ConversationsApi* | [**conversationsMessagesPost**](docs/Api/ConversationsApi.md#conversationsmessagespost) | **POST** /conversations/messages | Send a message as an agent +*ConversationsApi* | [**conversationsPushedMessagesIdDelete**](docs/Api/ConversationsApi.md#conversationspushedmessagesiddelete) | **DELETE** /conversations/pushedMessages/{id} | Delete an automated message +*ConversationsApi* | [**conversationsPushedMessagesIdGet**](docs/Api/ConversationsApi.md#conversationspushedmessagesidget) | **GET** /conversations/pushedMessages/{id} | Get an automated message +*ConversationsApi* | [**conversationsPushedMessagesIdPut**](docs/Api/ConversationsApi.md#conversationspushedmessagesidput) | **PUT** /conversations/pushedMessages/{id} | Update an automated message +*ConversationsApi* | [**conversationsPushedMessagesPost**](docs/Api/ConversationsApi.md#conversationspushedmessagespost) | **POST** /conversations/pushedMessages | Send an automated message to a visitor +*CouponsApi* | [**createCouponCollection**](docs/Api/CouponsApi.md#createcouponcollection) | **POST** /couponCollections | Create а coupon collection +*CouponsApi* | [**createCoupons**](docs/Api/CouponsApi.md#createcoupons) | **POST** /coupons | Create coupons for a coupon collection +*CouponsApi* | [**getCouponCollection**](docs/Api/CouponsApi.md#getcouponcollection) | **GET** /couponCollections/{id} | Get a coupon collection by id +*CouponsApi* | [**getCouponCollections**](docs/Api/CouponsApi.md#getcouponcollections) | **GET** /couponCollections | Get all your coupon collections +*CouponsApi* | [**updateCouponCollection**](docs/Api/CouponsApi.md#updatecouponcollection) | **PATCH** /couponCollections/{id} | Update a coupon collection by id +*DealsApi* | [**crmAttributesDealsGet**](docs/Api/DealsApi.md#crmattributesdealsget) | **GET** /crm/attributes/deals | Get deal attributes +*DealsApi* | [**crmDealsGet**](docs/Api/DealsApi.md#crmdealsget) | **GET** /crm/deals | Get all deals +*DealsApi* | [**crmDealsIdDelete**](docs/Api/DealsApi.md#crmdealsiddelete) | **DELETE** /crm/deals/{id} | Delete a deal +*DealsApi* | [**crmDealsIdGet**](docs/Api/DealsApi.md#crmdealsidget) | **GET** /crm/deals/{id} | Get a deal +*DealsApi* | [**crmDealsIdPatch**](docs/Api/DealsApi.md#crmdealsidpatch) | **PATCH** /crm/deals/{id} | Update a deal +*DealsApi* | [**crmDealsLinkUnlinkIdPatch**](docs/Api/DealsApi.md#crmdealslinkunlinkidpatch) | **PATCH** /crm/deals/link-unlink/{id} | Link and Unlink a deal with contacts and companies +*DealsApi* | [**crmDealsPost**](docs/Api/DealsApi.md#crmdealspost) | **POST** /crm/deals | Create a deal +*DealsApi* | [**crmPipelineDetailsAllGet**](docs/Api/DealsApi.md#crmpipelinedetailsallget) | **GET** /crm/pipeline/details/all | Get all pipelines +*DealsApi* | [**crmPipelineDetailsGet**](docs/Api/DealsApi.md#crmpipelinedetailsget) | **GET** /crm/pipeline/details | Get pipeline stages +*DealsApi* | [**crmPipelineDetailsPipelineIDGet**](docs/Api/DealsApi.md#crmpipelinedetailspipelineidget) | **GET** /crm/pipeline/details/{pipelineID} | Get a pipeline +*DomainsApi* | [**authenticateDomain**](docs/Api/DomainsApi.md#authenticatedomain) | **PUT** /senders/domains/{domainName}/authenticate | Authenticate a domain +*DomainsApi* | [**createDomain**](docs/Api/DomainsApi.md#createdomain) | **POST** /senders/domains | Create a new domain +*DomainsApi* | [**deleteDomain**](docs/Api/DomainsApi.md#deletedomain) | **DELETE** /senders/domains/{domainName} | Delete a domain +*DomainsApi* | [**getDomainConfiguration**](docs/Api/DomainsApi.md#getdomainconfiguration) | **GET** /senders/domains/{domainName} | Validate domain configuration +*DomainsApi* | [**getDomains**](docs/Api/DomainsApi.md#getdomains) | **GET** /senders/domains | Get the list of all your domains +*EcommerceApi* | [**createBatchOrder**](docs/Api/EcommerceApi.md#createbatchorder) | **POST** /orders/status/batch | Create orders in batch +*EcommerceApi* | [**createOrder**](docs/Api/EcommerceApi.md#createorder) | **POST** /orders/status | Managing the status of the order +*EcommerceApi* | [**createUpdateBatchCategory**](docs/Api/EcommerceApi.md#createupdatebatchcategory) | **POST** /categories/batch | Create categories in batch +*EcommerceApi* | [**createUpdateBatchProducts**](docs/Api/EcommerceApi.md#createupdatebatchproducts) | **POST** /products/batch | Create products in batch +*EcommerceApi* | [**createUpdateCategory**](docs/Api/EcommerceApi.md#createupdatecategory) | **POST** /categories | Create/Update a category +*EcommerceApi* | [**createUpdateProduct**](docs/Api/EcommerceApi.md#createupdateproduct) | **POST** /products | Create/Update a product +*EcommerceApi* | [**ecommerceActivatePost**](docs/Api/EcommerceApi.md#ecommerceactivatepost) | **POST** /ecommerce/activate | Activate the eCommerce app +*EcommerceApi* | [**getCategories**](docs/Api/EcommerceApi.md#getcategories) | **GET** /categories | Return all your categories +*EcommerceApi* | [**getCategoryInfo**](docs/Api/EcommerceApi.md#getcategoryinfo) | **GET** /categories/{id} | Get a category details +*EcommerceApi* | [**getOrders**](docs/Api/EcommerceApi.md#getorders) | **GET** /orders | Get order details +*EcommerceApi* | [**getProductInfo**](docs/Api/EcommerceApi.md#getproductinfo) | **GET** /products/{id} | Get a product's details +*EcommerceApi* | [**getProducts**](docs/Api/EcommerceApi.md#getproducts) | **GET** /products | Return all your products +*EmailCampaignsApi* | [**createEmailCampaign**](docs/Api/EmailCampaignsApi.md#createemailcampaign) | **POST** /emailCampaigns | Create an email campaign +*EmailCampaignsApi* | [**deleteEmailCampaign**](docs/Api/EmailCampaignsApi.md#deleteemailcampaign) | **DELETE** /emailCampaigns/{campaignId} | Delete an email campaign +*EmailCampaignsApi* | [**emailExportRecipients**](docs/Api/EmailCampaignsApi.md#emailexportrecipients) | **POST** /emailCampaigns/{campaignId}/exportRecipients | Export the recipients of an email campaign +*EmailCampaignsApi* | [**getAbTestCampaignResult**](docs/Api/EmailCampaignsApi.md#getabtestcampaignresult) | **GET** /emailCampaigns/{campaignId}/abTestCampaignResult | Get an A/B test email campaign results +*EmailCampaignsApi* | [**getEmailCampaign**](docs/Api/EmailCampaignsApi.md#getemailcampaign) | **GET** /emailCampaigns/{campaignId} | Get an email campaign report +*EmailCampaignsApi* | [**getEmailCampaigns**](docs/Api/EmailCampaignsApi.md#getemailcampaigns) | **GET** /emailCampaigns | Return all your created email campaigns +*EmailCampaignsApi* | [**getSharedTemplateUrl**](docs/Api/EmailCampaignsApi.md#getsharedtemplateurl) | **GET** /emailCampaigns/{campaignId}/sharedUrl | Get a shared template url +*EmailCampaignsApi* | [**sendEmailCampaignNow**](docs/Api/EmailCampaignsApi.md#sendemailcampaignnow) | **POST** /emailCampaigns/{campaignId}/sendNow | Send an email campaign immediately, based on campaignId +*EmailCampaignsApi* | [**sendReport**](docs/Api/EmailCampaignsApi.md#sendreport) | **POST** /emailCampaigns/{campaignId}/sendReport | Send the report of a campaign +*EmailCampaignsApi* | [**sendTestEmail**](docs/Api/EmailCampaignsApi.md#sendtestemail) | **POST** /emailCampaigns/{campaignId}/sendTest | Send an email campaign to your test list +*EmailCampaignsApi* | [**updateCampaignStatus**](docs/Api/EmailCampaignsApi.md#updatecampaignstatus) | **PUT** /emailCampaigns/{campaignId}/status | Update an email campaign status +*EmailCampaignsApi* | [**updateEmailCampaign**](docs/Api/EmailCampaignsApi.md#updateemailcampaign) | **PUT** /emailCampaigns/{campaignId} | Update an email campaign +*EmailCampaignsApi* | [**uploadImageToGallery**](docs/Api/EmailCampaignsApi.md#uploadimagetogallery) | **POST** /emailCampaigns/images | Upload an image to your account's image gallery +*EventsApi* | [**createEvent**](docs/Api/EventsApi.md#createEvent) | **POST** /events | Create an event +*FoldersApi* | [**createFolder**](docs/Api/FoldersApi.md#createfolder) | **POST** /contacts/folders | Create a folder +*FoldersApi* | [**deleteFolder**](docs/Api/FoldersApi.md#deletefolder) | **DELETE** /contacts/folders/{folderId} | Delete a folder (and all its lists) +*FoldersApi* | [**getFolder**](docs/Api/FoldersApi.md#getfolder) | **GET** /contacts/folders/{folderId} | Returns a folder's details +*FoldersApi* | [**getFolderLists**](docs/Api/FoldersApi.md#getfolderlists) | **GET** /contacts/folders/{folderId}/lists | Get lists in a folder +*FoldersApi* | [**getFolders**](docs/Api/FoldersApi.md#getfolders) | **GET** /contacts/folders | Get all folders +*FoldersApi* | [**updateFolder**](docs/Api/FoldersApi.md#updatefolder) | **PUT** /contacts/folders/{folderId} | Update a folder +*ExternalFeedsApi* | [**createExternalFeed**](docs/Api/ExternalFeedsApi.md#createexternalfeed) | **POST** /feeds | Create an external feed +*ExternalFeedsApi* | [**deleteExternalFeed**](docs/Api/ExternalFeedsApi.md#deleteexternalfeed) | **DELETE** /feeds/{uuid} | Delete an external feed +*ExternalFeedsApi* | [**getAllExternalFeeds**](docs/Api/ExternalFeedsApi.md#getallexternalfeeds) | **GET** /feeds | Fetch all external feeds +*ExternalFeedsApi* | [**getExternalFeedByUUID**](docs/Api/ExternalFeedsApi.md#getexternalfeedbyuuid) | **GET** /feeds/{uuid} | Get an external feed by UUID +*ExternalFeedsApi* | [**updateExternalFeed**](docs/Api/ExternalFeedsApi.md#updateexternalfeed) | **PUT** /feeds/{uuid} | Update an external feed +*FilesApi* | [**crmFilesGet**](docs/Api/FilesApi.md#crmfilesget) | **GET** /crm/files | Get all files +*FilesApi* | [**crmFilesIdDataGet**](docs/Api/FilesApi.md#crmfilesiddataget) | **GET** /crm/files/{id}/data | Get file details +*FilesApi* | [**crmFilesIdDelete**](docs/Api/FilesApi.md#crmfilesiddelete) | **DELETE** /crm/files/{id} | Delete a file +*FilesApi* | [**crmFilesIdGet**](docs/Api/FilesApi.md#crmfilesidget) | **GET** /crm/files/{id} | Download a file +*FilesApi* | [**crmFilesPost**](docs/Api/FilesApi.md#crmfilespost) | **POST** /crm/files | Upload a file +*InboundParsingApi* | [**getInboundEmailAttachment**](docs/Api/InboundParsingApi.md#getinboundemailattachment) | **GET** /inbound/attachments/{downloadToken} | Retrieve inbound attachment with download token. +*InboundParsingApi* | [**getInboundEmailEvents**](docs/Api/InboundParsingApi.md#getinboundemailevents) | **GET** /inbound/events | Get the list of all the events for the received emails. +*InboundParsingApi* | [**getInboundEmailEventsByUuid**](docs/Api/InboundParsingApi.md#getinboundemaileventsbyuuid) | **GET** /inbound/events/{uuid} | Fetch all events history for one particular received email. +*ListsApi* | [**addContactToList**](docs/Api/ListsApi.md#addcontacttolist) | **POST** /contacts/lists/{listId}/contacts/add | Add existing contacts to a list +*ListsApi* | [**createList**](docs/Api/ListsApi.md#createlist) | **POST** /contacts/lists | Create a list +*ListsApi* | [**deleteList**](docs/Api/ListsApi.md#deletelist) | **DELETE** /contacts/lists/{listId} | Delete a list +*ListsApi* | [**getContactsFromList**](docs/Api/ListsApi.md#getcontactsfromlist) | **GET** /contacts/lists/{listId}/contacts | Get contacts in a list +*ListsApi* | [**getFolderLists**](docs/Api/ListsApi.md#getfolderlists) | **GET** /contacts/folders/{folderId}/lists | Get lists in a folder +*ListsApi* | [**getList**](docs/Api/ListsApi.md#getlist) | **GET** /contacts/lists/{listId} | Get a list's details +*ListsApi* | [**getLists**](docs/Api/ListsApi.md#getlists) | **GET** /contacts/lists | Get all the lists +*ListsApi* | [**removeContactFromList**](docs/Api/ListsApi.md#removecontactfromlist) | **POST** /contacts/lists/{listId}/contacts/remove | Delete a contact from a list +*ListsApi* | [**updateList**](docs/Api/ListsApi.md#updatelist) | **PUT** /contacts/lists/{listId} | Update a list +*MasterAccountApi* | [**corporateGroupIdPut**](docs/Api/MasterAccountApi.md#corporategroupidput) | **PUT** /corporate/group/{id} | Update a group of sub-accounts +*MasterAccountApi* | [**corporateGroupPost**](docs/Api/MasterAccountApi.md#corporategrouppost) | **POST** /corporate/group | Create a new group of sub-accounts +*MasterAccountApi* | [**corporateMasterAccountGet**](docs/Api/MasterAccountApi.md#corporatemasteraccountget) | **GET** /corporate/masterAccount | Get the details of requested master account +*MasterAccountApi* | [**corporateSubAccountGet**](docs/Api/MasterAccountApi.md#corporatesubaccountget) | **GET** /corporate/subAccount | Get the list of all the sub-accounts of the master account. +*MasterAccountApi* | [**corporateSubAccountIdApplicationsTogglePut**](docs/Api/MasterAccountApi.md#corporatesubaccountidapplicationstoggleput) | **PUT** /corporate/subAccount/{id}/applications/toggle | Enable/disable sub-account application(s) +*MasterAccountApi* | [**corporateSubAccountIdDelete**](docs/Api/MasterAccountApi.md#corporatesubaccountiddelete) | **DELETE** /corporate/subAccount/{id} | Delete a sub-account +*MasterAccountApi* | [**corporateSubAccountIdGet**](docs/Api/MasterAccountApi.md#corporatesubaccountidget) | **GET** /corporate/subAccount/{id} | Get sub-account details +*MasterAccountApi* | [**corporateSubAccountIdPlanPut**](docs/Api/MasterAccountApi.md#corporatesubaccountidplanput) | **PUT** /corporate/subAccount/{id}/plan | Update sub-account plan +*MasterAccountApi* | [**corporateSubAccountKeyPost**](docs/Api/MasterAccountApi.md#corporatesubaccountkeypost) | **POST** /corporate/subAccount/key | Create an API key for a sub-account +*MasterAccountApi* | [**corporateSubAccountPost**](docs/Api/MasterAccountApi.md#corporatesubaccountpost) | **POST** /corporate/subAccount | Create a new sub-account under a master account. +*MasterAccountApi* | [**corporateSubAccountSsoTokenPost**](docs/Api/MasterAccountApi.md#corporatesubaccountssotokenpost) | **POST** /corporate/subAccount/ssoToken | Generate SSO token to access Brevo +*MasterAccountApi* | [**corporateUserRevokeEmailDelete**](docs/Api/MasterAccountApi.md#corporateuserrevokeemaildelete) | **DELETE** /corporate/user/revoke/{email} | Revoke an admin user +*MasterAccountApi* | [**getAccountActivity**](docs/Api/MasterAccountApi.md#getaccountactivity) | **GET** /organization/activities | Get user activity logs +*MasterAccountApi* | [**getCorporateInvitedUsersList**](docs/Api/MasterAccountApi.md#getcorporateinviteduserslist) | **GET** /corporate/invited/users | Get the list of all admin users +*MasterAccountApi* | [**getSubAccountGroups**](docs/Api/MasterAccountApi.md#getsubaccountgroups) | **GET** /corporate/groups | Get the list of groups +*MasterAccountApi* | [**inviteAdminUser**](docs/Api/MasterAccountApi.md#inviteadminuser) | **POST** /corporate/user/invitation/send | Send invitation to an admin user +*NotesApi* | [**crmNotesGet**](docs/Api/NotesApi.md#crmnotesget) | **GET** /crm/notes | Get all notes +*NotesApi* | [**crmNotesIdDelete**](docs/Api/NotesApi.md#crmnotesiddelete) | **DELETE** /crm/notes/{id} | Delete a note +*NotesApi* | [**crmNotesIdGet**](docs/Api/NotesApi.md#crmnotesidget) | **GET** /crm/notes/{id} | Get a note +*NotesApi* | [**crmNotesIdPatch**](docs/Api/NotesApi.md#crmnotesidpatch) | **PATCH** /crm/notes/{id} | Update a note +*NotesApi* | [**crmNotesPost**](docs/Api/NotesApi.md#crmnotespost) | **POST** /crm/notes | Create a note +*ProcessApi* | [**getProcess**](docs/Api/ProcessApi.md#getprocess) | **GET** /processes/{processId} | Return the informations for a process +*ProcessApi* | [**getProcesses**](docs/Api/ProcessApi.md#getprocesses) | **GET** /processes | Return all the processes for your account +*ResellerApi* | [**addCredits**](docs/Api/ResellerApi.md#addcredits) | **POST** /reseller/children/{childIdentifier}/credits/add | Add Email and/or SMS credits to a specific child account +*ResellerApi* | [**associateIpToChild**](docs/Api/ResellerApi.md#associateiptochild) | **POST** /reseller/children/{childIdentifier}/ips/associate | Associate a dedicated IP to the child +*ResellerApi* | [**createChildDomain**](docs/Api/ResellerApi.md#createchilddomain) | **POST** /reseller/children/{childIdentifier}/domains | Create a domain for a child account +*ResellerApi* | [**createResellerChild**](docs/Api/ResellerApi.md#createresellerchild) | **POST** /reseller/children | Creates a reseller child +*ResellerApi* | [**deleteChildDomain**](docs/Api/ResellerApi.md#deletechilddomain) | **DELETE** /reseller/children/{childIdentifier}/domains/{domainName} | Delete the sender domain of the reseller child based on the childIdentifier and domainName passed +*ResellerApi* | [**deleteResellerChild**](docs/Api/ResellerApi.md#deleteresellerchild) | **DELETE** /reseller/children/{childIdentifier} | Delete a single reseller child based on the child identifier supplied +*ResellerApi* | [**dissociateIpFromChild**](docs/Api/ResellerApi.md#dissociateipfromchild) | **POST** /reseller/children/{childIdentifier}/ips/dissociate | Dissociate a dedicated IP to the child +*ResellerApi* | [**getChildAccountCreationStatus**](docs/Api/ResellerApi.md#getchildaccountcreationstatus) | **GET** /reseller/children/{childIdentifier}/accountCreationStatus | Get the status of a reseller's child account creation, whether it is successfully created (exists) or not based on the identifier supplied +*ResellerApi* | [**getChildDomains**](docs/Api/ResellerApi.md#getchilddomains) | **GET** /reseller/children/{childIdentifier}/domains | Get all sender domains for a specific child account +*ResellerApi* | [**getChildInfo**](docs/Api/ResellerApi.md#getchildinfo) | **GET** /reseller/children/{childIdentifier} | Get a child account's details +*ResellerApi* | [**getResellerChilds**](docs/Api/ResellerApi.md#getresellerchilds) | **GET** /reseller/children | Get the list of all children accounts +*ResellerApi* | [**getSsoToken**](docs/Api/ResellerApi.md#getssotoken) | **GET** /reseller/children/{childIdentifier}/auth | Get session token to access Brevo (SSO) +*ResellerApi* | [**removeCredits**](docs/Api/ResellerApi.md#removecredits) | **POST** /reseller/children/{childIdentifier}/credits/remove | Remove Email and/or SMS credits from a specific child account +*ResellerApi* | [**updateChildAccountStatus**](docs/Api/ResellerApi.md#updatechildaccountstatus) | **PUT** /reseller/children/{childIdentifier}/accountStatus | Update info of reseller's child account status based on the childIdentifier supplied +*ResellerApi* | [**updateChildDomain**](docs/Api/ResellerApi.md#updatechilddomain) | **PUT** /reseller/children/{childIdentifier}/domains/{domainName} | Update the sender domain of reseller's child based on the childIdentifier and domainName passed +*ResellerApi* | [**updateResellerChild**](docs/Api/ResellerApi.md#updateresellerchild) | **PUT** /reseller/children/{childIdentifier} | Update info of reseller's child based on the child identifier supplied +*SMSCampaignsApi* | [**createSmsCampaign**](docs/Api/SMSCampaignsApi.md#createsmscampaign) | **POST** /smsCampaigns | Creates an SMS campaign +*SMSCampaignsApi* | [**deleteSmsCampaign**](docs/Api/SMSCampaignsApi.md#deletesmscampaign) | **DELETE** /smsCampaigns/{campaignId} | Delete an SMS campaign +*SMSCampaignsApi* | [**getSmsCampaign**](docs/Api/SMSCampaignsApi.md#getsmscampaign) | **GET** /smsCampaigns/{campaignId} | Get an SMS campaign +*SMSCampaignsApi* | [**getSmsCampaigns**](docs/Api/SMSCampaignsApi.md#getsmscampaigns) | **GET** /smsCampaigns | Returns the information for all your created SMS campaigns +*SMSCampaignsApi* | [**requestSmsRecipientExport**](docs/Api/SMSCampaignsApi.md#requestsmsrecipientexport) | **POST** /smsCampaigns/{campaignId}/exportRecipients | Export an SMS campaign's recipients +*SMSCampaignsApi* | [**sendSmsCampaignNow**](docs/Api/SMSCampaignsApi.md#sendsmscampaignnow) | **POST** /smsCampaigns/{campaignId}/sendNow | Send your SMS campaign immediately +*SMSCampaignsApi* | [**sendSmsReport**](docs/Api/SMSCampaignsApi.md#sendsmsreport) | **POST** /smsCampaigns/{campaignId}/sendReport | Send an SMS campaign's report +*SMSCampaignsApi* | [**sendTestSms**](docs/Api/SMSCampaignsApi.md#sendtestsms) | **POST** /smsCampaigns/{campaignId}/sendTest | Send a test SMS campaign +*SMSCampaignsApi* | [**updateSmsCampaign**](docs/Api/SMSCampaignsApi.md#updatesmscampaign) | **PUT** /smsCampaigns/{campaignId} | Update an SMS campaign +*SMSCampaignsApi* | [**updateSmsCampaignStatus**](docs/Api/SMSCampaignsApi.md#updatesmscampaignstatus) | **PUT** /smsCampaigns/{campaignId}/status | Update a campaign's status +*SendersApi* | [**createSender**](docs/Api/SendersApi.md#createsender) | **POST** /senders | Create a new sender +*SendersApi* | [**deleteSender**](docs/Api/SendersApi.md#deletesender) | **DELETE** /senders/{senderId} | Delete a sender +*SendersApi* | [**getIps**](docs/Api/SendersApi.md#getips) | **GET** /senders/ips | Get all the dedicated IPs for your account +*SendersApi* | [**getIpsFromSender**](docs/Api/SendersApi.md#getipsfromsender) | **GET** /senders/{senderId}/ips | Get all the dedicated IPs for a sender +*SendersApi* | [**getSenders**](docs/Api/SendersApi.md#getsenders) | **GET** /senders | Get the list of all your senders +*SendersApi* | [**updateSender**](docs/Api/SendersApi.md#updatesender) | **PUT** /senders/{senderId} | Update a sender +*SendersApi* | [**validateSenderByOTP**](docs/Api/SendersApi.md#validatesenderbyotp) | **PUT** /senders/{senderId}/validate | Update a sender +*TasksApi* | [**crmTasksGet**](docs/Api/TasksApi.md#crmtasksget) | **GET** /crm/tasks | Get all tasks +*TasksApi* | [**crmTasksIdDelete**](docs/Api/TasksApi.md#crmtasksiddelete) | **DELETE** /crm/tasks/{id} | Delete a task +*TasksApi* | [**crmTasksIdGet**](docs/Api/TasksApi.md#crmtasksidget) | **GET** /crm/tasks/{id} | Get a task +*TasksApi* | [**crmTasksIdPatch**](docs/Api/TasksApi.md#crmtasksidpatch) | **PATCH** /crm/tasks/{id} | Update a task +*TasksApi* | [**crmTasksPost**](docs/Api/TasksApi.md#crmtaskspost) | **POST** /crm/tasks | Create a task +*TasksApi* | [**crmTasktypesGet**](docs/Api/TasksApi.md#crmtasktypesget) | **GET** /crm/tasktypes | Get all task types +*TransactionalEmailsApi* | [**blockNewDomain**](docs/Api/TransactionalEmailsApi.md#blocknewdomain) | **POST** /smtp/blockedDomains | Add a new domain to the list of blocked domains +*TransactionalEmailsApi* | [**createSmtpTemplate**](docs/Api/TransactionalEmailsApi.md#createsmtptemplate) | **POST** /smtp/templates | Create an email template +*TransactionalEmailsApi* | [**deleteBlockedDomain**](docs/Api/TransactionalEmailsApi.md#deleteblockeddomain) | **DELETE** /smtp/blockedDomains/{domain} | Unblock an existing domain from the list of blocked domains +*TransactionalEmailsApi* | [**deleteHardbounces**](docs/Api/TransactionalEmailsApi.md#deletehardbounces) | **POST** /smtp/deleteHardbounces | Delete hardbounces +*TransactionalEmailsApi* | [**deleteScheduledEmailById**](docs/Api/TransactionalEmailsApi.md#deletescheduledemailbyid) | **DELETE** /smtp/email/{identifier} | Delete scheduled emails by batchId or messageId +*TransactionalEmailsApi* | [**deleteSmtpTemplate**](docs/Api/TransactionalEmailsApi.md#deletesmtptemplate) | **DELETE** /smtp/templates/{templateId} | Delete an inactive email template +*TransactionalEmailsApi* | [**getAggregatedSmtpReport**](docs/Api/TransactionalEmailsApi.md#getaggregatedsmtpreport) | **GET** /smtp/statistics/aggregatedReport | Get your transactional email activity aggregated over a period of time +*TransactionalEmailsApi* | [**getBlockedDomains**](docs/Api/TransactionalEmailsApi.md#getblockeddomains) | **GET** /smtp/blockedDomains | Get the list of blocked domains +*TransactionalEmailsApi* | [**getEmailEventReport**](docs/Api/TransactionalEmailsApi.md#getemaileventreport) | **GET** /smtp/statistics/events | Get all your transactional email activity (unaggregated events) +*TransactionalEmailsApi* | [**getScheduledEmailByBatchId**](docs/Api/TransactionalEmailsApi.md#getscheduledemailbybatchid) | **GET** /smtp/emailStatus/{batchId} | Fetch scheduled emails by batchId +*TransactionalEmailsApi* | [**getScheduledEmailByMessageId**](docs/Api/TransactionalEmailsApi.md#getscheduledemailbymessageid) | **GET** /smtp/emailStatus/{messageId} | Fetch scheduled email by messageId +*TransactionalEmailsApi* | [**getSmtpReport**](docs/Api/TransactionalEmailsApi.md#getsmtpreport) | **GET** /smtp/statistics/reports | Get your transactional email activity aggregated per day +*TransactionalEmailsApi* | [**getSmtpTemplate**](docs/Api/TransactionalEmailsApi.md#getsmtptemplate) | **GET** /smtp/templates/{templateId} | Returns the template information +*TransactionalEmailsApi* | [**getSmtpTemplates**](docs/Api/TransactionalEmailsApi.md#getsmtptemplates) | **GET** /smtp/templates | Get the list of email templates +*TransactionalEmailsApi* | [**getTransacBlockedContacts**](docs/Api/TransactionalEmailsApi.md#gettransacblockedcontacts) | **GET** /smtp/blockedContacts | Get the list of blocked or unsubscribed transactional contacts +*TransactionalEmailsApi* | [**getTransacEmailContent**](docs/Api/TransactionalEmailsApi.md#gettransacemailcontent) | **GET** /smtp/emails/{uuid} | Get the personalized content of a sent transactional email +*TransactionalEmailsApi* | [**getTransacEmailsList**](docs/Api/TransactionalEmailsApi.md#gettransacemailslist) | **GET** /smtp/emails | Get the list of transactional emails on the basis of allowed filters +*TransactionalEmailsApi* | [**sendTestTemplate**](docs/Api/TransactionalEmailsApi.md#sendtesttemplate) | **POST** /smtp/templates/{templateId}/sendTest | Send a template to your test list +*TransactionalEmailsApi* | [**sendTransacEmail**](docs/Api/TransactionalEmailsApi.md#sendtransacemail) | **POST** /smtp/email | Send a transactional email +*TransactionalEmailsApi* | [**smtpBlockedContactsEmailDelete**](docs/Api/TransactionalEmailsApi.md#smtpblockedcontactsemaildelete) | **DELETE** /smtp/blockedContacts/{email} | Unblock or resubscribe a transactional contact +*TransactionalEmailsApi* | [**smtpLogIdentifierDelete**](docs/Api/TransactionalEmailsApi.md#smtplogidentifierdelete) | **DELETE** /smtp/log/{identifier} | Delete an SMTP transactional log +*TransactionalEmailsApi* | [**updateSmtpTemplate**](docs/Api/TransactionalEmailsApi.md#updatesmtptemplate) | **PUT** /smtp/templates/{templateId} | Update an email template +*TransactionalSMSApi* | [**getSmsEvents**](docs/Api/TransactionalSMSApi.md#getsmsevents) | **GET** /transactionalSMS/statistics/events | Get all your SMS activity (unaggregated events) +*TransactionalSMSApi* | [**getTransacAggregatedSmsReport**](docs/Api/TransactionalSMSApi.md#gettransacaggregatedsmsreport) | **GET** /transactionalSMS/statistics/aggregatedReport | Get your SMS activity aggregated over a period of time +*TransactionalSMSApi* | [**getTransacSmsReport**](docs/Api/TransactionalSMSApi.md#gettransacsmsreport) | **GET** /transactionalSMS/statistics/reports | Get your SMS activity aggregated per day +*TransactionalSMSApi* | [**sendTransacSms**](docs/Api/TransactionalSMSApi.md#sendtransacsms) | **POST** /transactionalSMS/sms | Send SMS message to a mobile number +*TransactionalWhatsAppApi* | [**getWhatsappEventReport**](docs/Api/TransactionalWhatsAppApi.md#getwhatsappeventreport) | **GET** /whatsapp/statistics/events | Get all your WhatsApp activity (unaggregated events) +*TransactionalWhatsAppApi* | [**sendWhatsappMessage**](docs/Api/TransactionalWhatsAppApi.md#sendwhatsappmessage) | **POST** /whatsapp/sendMessage | Send a WhatsApp message +*UserApi* | [**editUserPermission**](docs/Api/UserApi.md#edituserpermission) | **POST** /organization/user/update/permissions | Update permission for a user +*UserApi* | [**getInvitedUsersList**](docs/Api/UserApi.md#getinviteduserslist) | **GET** /organization/invited/users | Get the list of all your users +*UserApi* | [**getUserPermission**](docs/Api/UserApi.md#getuserpermission) | **GET** /organization/user/{email}/permissions | Check user permission +*UserApi* | [**inviteuser**](docs/Api/UserApi.md#inviteuser) | **POST** /organization/user/invitation/send | Send invitation to user +*UserApi* | [**putRevokeUserPermission**](docs/Api/UserApi.md#putrevokeuserpermission) | **PUT** /organization/user/invitation/revoke/{email} | Revoke user permission +*UserApi* | [**putresendcancelinvitation**](docs/Api/UserApi.md#putresendcancelinvitation) | **PUT** /organization/user/invitation/{action}/{email} | Resend / Cancel invitation +*WebhooksApi* | [**createWebhook**](docs/Api/WebhooksApi.md#createwebhook) | **POST** /webhooks | Create a webhook +*WebhooksApi* | [**deleteWebhook**](docs/Api/WebhooksApi.md#deletewebhook) | **DELETE** /webhooks/{webhookId} | Delete a webhook +*WebhooksApi* | [**exportWebhooksHistory**](docs/Api/WebhooksApi.md#exportwebhookshistory) | **POST** /webhooks/export | Export all webhook events +*WebhooksApi* | [**getWebhook**](docs/Api/WebhooksApi.md#getwebhook) | **GET** /webhooks/{webhookId} | Get a webhook details +*WebhooksApi* | [**getWebhooks**](docs/Api/WebhooksApi.md#getwebhooks) | **GET** /webhooks | Get all webhooks +*WebhooksApi* | [**updateWebhook**](docs/Api/WebhooksApi.md#updatewebhook) | **PUT** /webhooks/{webhookId} | Update a webhook +*WhatsAppCampaignsApi* | [**createWhatsAppCampaign**](docs/Api/WhatsAppCampaignsApi.md#createwhatsappcampaign) | **POST** /whatsappCampaigns | Create and Send a WhatsApp campaign +*WhatsAppCampaignsApi* | [**createWhatsAppTemplate**](docs/Api/WhatsAppCampaignsApi.md#createwhatsapptemplate) | **POST** /whatsppCampaigns/template | Create a WhatsApp template +*WhatsAppCampaignsApi* | [**deleteWhatsAppCampaign**](docs/Api/WhatsAppCampaignsApi.md#deletewhatsappcampaign) | **DELETE** /whatsappCampaigns/{campaignId} | Delete a WhatsApp campaign +*WhatsAppCampaignsApi* | [**getWhatsAppCampaign**](docs/Api/WhatsAppCampaignsApi.md#getwhatsappcampaign) | **GET** /whatsappCampaigns/{campaignId} | Get a WhatsApp campaign +*WhatsAppCampaignsApi* | [**getWhatsAppCampaigns**](docs/Api/WhatsAppCampaignsApi.md#getwhatsappcampaigns) | **GET** /whatsappCampaigns | Return all your created WhatsApp campaigns +*WhatsAppCampaignsApi* | [**getWhatsAppConfig**](docs/Api/WhatsAppCampaignsApi.md#getwhatsappconfig) | **GET** /whatsappCampaigns/config | Get your WhatsApp API account information +*WhatsAppCampaignsApi* | [**getWhatsAppTemplates**](docs/Api/WhatsAppCampaignsApi.md#getwhatsapptemplates) | **GET** /whatsappCampaigns/template-list | Return all your created WhatsApp templates +*WhatsAppCampaignsApi* | [**sendWhatsAppTemplateApproval**](docs/Api/WhatsAppCampaignsApi.md#sendwhatsapptemplateapproval) | **POST** /whatsappCampaigns/template/approval/{templateId} | Send your WhatsApp template for approval +*WhatsAppCampaignsApi* | [**updateWhatsAppCampaign**](docs/Api/WhatsAppCampaignsApi.md#updatewhatsappcampaign) | **PUT** /whatsappCampaigns/{campaignId} | Update a WhatsApp campaign + + +## Documentation For Models + + - [AbTestCampaignResult](docs/Model/AbTestCampaignResult.md) + - [AbTestCampaignResultClickedLinks](docs/Model/AbTestCampaignResultClickedLinks.md) + - [AbTestCampaignResultStatistics](docs/Model/AbTestCampaignResultStatistics.md) + - [AbTestVersionClicks](docs/Model/AbTestVersionClicks.md) + - [AbTestVersionClicksInner](docs/Model/AbTestVersionClicksInner.md) + - [AbTestVersionStats](docs/Model/AbTestVersionStats.md) + - [AddChildDomain](docs/Model/AddChildDomain.md) + - [AddContactToList](docs/Model/AddContactToList.md) + - [AddCredits](docs/Model/AddCredits.md) + - [AuthenticateDomainModel](docs/Model/AuthenticateDomainModel.md) + - [BlockDomain](docs/Model/BlockDomain.md) + - [Body](docs/Model/Body.md) + - [Body1](docs/Model/Body1.md) + - [Body10](docs/Model/Body10.md) + - [Body11](docs/Model/Body11.md) + - [Body12](docs/Model/Body12.md) + - [Body13](docs/Model/Body13.md) + - [Body14](docs/Model/Body14.md) + - [Body2](docs/Model/Body2.md) + - [Body3](docs/Model/Body3.md) + - [Body4](docs/Model/Body4.md) + - [Body5](docs/Model/Body5.md) + - [Body6](docs/Model/Body6.md) + - [Body7](docs/Model/Body7.md) + - [Body8](docs/Model/Body8.md) + - [Body9](docs/Model/Body9.md) + - [BodyVariablesItems](docs/Model/BodyVariablesItems.md) + - [CompaniesList](docs/Model/CompaniesList.md) + - [Company](docs/Model/Company.md) + - [CompanyAttributes](docs/Model/CompanyAttributes.md) + - [CompanyAttributesInner](docs/Model/CompanyAttributesInner.md) + - [ComponentItems](docs/Model/ComponentItems.md) + - [ConversationsMessage](docs/Model/ConversationsMessage.md) + - [ConversationsMessageFile](docs/Model/ConversationsMessageFile.md) + - [ConversationsMessageFileImageInfo](docs/Model/ConversationsMessageFileImageInfo.md) + - [CreateApiKeyRequest](docs/Model/CreateApiKeyRequest.md) + - [CreateApiKeyResponse](docs/Model/CreateApiKeyResponse.md) + - [CreateAttribute](docs/Model/CreateAttribute.md) + - [CreateAttributeEnumeration](docs/Model/CreateAttributeEnumeration.md) + - [CreateCategoryModel](docs/Model/CreateCategoryModel.md) + - [CreateChild](docs/Model/CreateChild.md) + - [CreateContact](docs/Model/CreateContact.md) + - [CreateCouponCollection](docs/Model/CreateCouponCollection.md) + - [CreateCoupons](docs/Model/CreateCoupons.md) + - [CreateDoiContact](docs/Model/CreateDoiContact.md) + - [CreateDomain](docs/Model/CreateDomain.md) + - [CreateDomainModel](docs/Model/CreateDomainModel.md) + - [CreateDomainModelDnsRecords](docs/Model/CreateDomainModelDnsRecords.md) + - [CreateDomainModelDnsRecordsDkimRecord](docs/Model/CreateDomainModelDnsRecordsDkimRecord.md) + - [CreateEmailCampaign](docs/Model/CreateEmailCampaign.md) + - [CreateEmailCampaignRecipients](docs/Model/CreateEmailCampaignRecipients.md) + - [CreateEmailCampaignSender](docs/Model/CreateEmailCampaignSender.md) + - [CreateExternalFeed](docs/Model/CreateExternalFeed.md) + - [CreateList](docs/Model/CreateList.md) + - [CreateModel](docs/Model/CreateModel.md) + - [CreateProductModel](docs/Model/CreateProductModel.md) + - [CreateReseller](docs/Model/CreateReseller.md) + - [CreateSender](docs/Model/CreateSender.md) + - [CreateSenderIps](docs/Model/CreateSenderIps.md) + - [CreateSenderModel](docs/Model/CreateSenderModel.md) + - [CreateSmsCampaign](docs/Model/CreateSmsCampaign.md) + - [CreateSmsCampaignRecipients](docs/Model/CreateSmsCampaignRecipients.md) + - [CreateSmtpEmail](docs/Model/CreateSmtpEmail.md) + - [CreateSmtpTemplate](docs/Model/CreateSmtpTemplate.md) + - [CreateSmtpTemplateSender](docs/Model/CreateSmtpTemplateSender.md) + - [CreateSubAccount](docs/Model/CreateSubAccount.md) + - [CreateSubAccountResponse](docs/Model/CreateSubAccountResponse.md) + - [CreateUpdateBatchCategory](docs/Model/CreateUpdateBatchCategory.md) + - [CreateUpdateBatchCategoryModel](docs/Model/CreateUpdateBatchCategoryModel.md) + - [CreateUpdateBatchProducts](docs/Model/CreateUpdateBatchProducts.md) + - [CreateUpdateBatchProductsModel](docs/Model/CreateUpdateBatchProductsModel.md) + - [CreateUpdateCategories](docs/Model/CreateUpdateCategories.md) + - [CreateUpdateCategory](docs/Model/CreateUpdateCategory.md) + - [CreateUpdateContactModel](docs/Model/CreateUpdateContactModel.md) + - [CreateUpdateFolder](docs/Model/CreateUpdateFolder.md) + - [CreateUpdateProduct](docs/Model/CreateUpdateProduct.md) + - [CreateUpdateProducts](docs/Model/CreateUpdateProducts.md) + - [CreateWebhook](docs/Model/CreateWebhook.md) + - [CreateWhatsAppCampaign](docs/Model/CreateWhatsAppCampaign.md) + - [CreateWhatsAppCampaignRecipients](docs/Model/CreateWhatsAppCampaignRecipients.md) + - [CreateWhatsAppTemplate](docs/Model/CreateWhatsAppTemplate.md) + - [CreatedBatchId](docs/Model/CreatedBatchId.md) + - [CreatedProcessId](docs/Model/CreatedProcessId.md) + - [Deal](docs/Model/Deal.md) + - [DealAttributes](docs/Model/DealAttributes.md) + - [DealAttributesInner](docs/Model/DealAttributesInner.md) + - [DealsList](docs/Model/DealsList.md) + - [DeleteHardbounces](docs/Model/DeleteHardbounces.md) + - [EmailExportRecipients](docs/Model/EmailExportRecipients.md) + - [ErrorModel](docs/Model/ErrorModel.md) + - [Event](docs/Model/Event.md) + - [ExportWebhooksHistory](docs/Model/ExportWebhooksHistory.md) + - [FileData](docs/Model/FileData.md) + - [FileDownloadableLink](docs/Model/FileDownloadableLink.md) + - [FileList](docs/Model/FileList.md) + - [GetAccount](docs/Model/GetAccount.md) + - [GetAccountActivity](docs/Model/GetAccountActivity.md) + - [GetAccountActivityLogs](docs/Model/GetAccountActivityLogs.md) + - [GetAccountMarketingAutomation](docs/Model/GetAccountMarketingAutomation.md) + - [GetAccountPlan](docs/Model/GetAccountPlan.md) + - [GetAccountRelay](docs/Model/GetAccountRelay.md) + - [GetAccountRelayData](docs/Model/GetAccountRelayData.md) + - [GetAggregatedReport](docs/Model/GetAggregatedReport.md) + - [GetAllExternalFeeds](docs/Model/GetAllExternalFeeds.md) + - [GetAllExternalFeedsFeeds](docs/Model/GetAllExternalFeedsFeeds.md) + - [GetAttributes](docs/Model/GetAttributes.md) + - [GetAttributesAttributes](docs/Model/GetAttributesAttributes.md) + - [GetAttributesEnumeration](docs/Model/GetAttributesEnumeration.md) + - [GetBlockedDomains](docs/Model/GetBlockedDomains.md) + - [GetCampaignOverview](docs/Model/GetCampaignOverview.md) + - [GetCampaignRecipients](docs/Model/GetCampaignRecipients.md) + - [GetCampaignStats](docs/Model/GetCampaignStats.md) + - [GetCategories](docs/Model/GetCategories.md) + - [GetCategoryDetails](docs/Model/GetCategoryDetails.md) + - [GetChildAccountCreationStatus](docs/Model/GetChildAccountCreationStatus.md) + - [GetChildDomain](docs/Model/GetChildDomain.md) + - [GetChildDomains](docs/Model/GetChildDomains.md) + - [GetChildInfo](docs/Model/GetChildInfo.md) + - [GetChildInfoApiKeys](docs/Model/GetChildInfoApiKeys.md) + - [GetChildInfoApiKeysV2](docs/Model/GetChildInfoApiKeysV2.md) + - [GetChildInfoApiKeysV3](docs/Model/GetChildInfoApiKeysV3.md) + - [GetChildInfoCredits](docs/Model/GetChildInfoCredits.md) + - [GetChildInfoStatistics](docs/Model/GetChildInfoStatistics.md) + - [GetChildrenList](docs/Model/GetChildrenList.md) + - [GetClient](docs/Model/GetClient.md) + - [GetContactCampaignStats](docs/Model/GetContactCampaignStats.md) + - [GetContactCampaignStatsClicked](docs/Model/GetContactCampaignStatsClicked.md) + - [GetContactCampaignStatsOpened](docs/Model/GetContactCampaignStatsOpened.md) + - [GetContactCampaignStatsTransacAttributes](docs/Model/GetContactCampaignStatsTransacAttributes.md) + - [GetContactCampaignStatsUnsubscriptions](docs/Model/GetContactCampaignStatsUnsubscriptions.md) + - [GetContactDetails](docs/Model/GetContactDetails.md) + - [GetContacts](docs/Model/GetContacts.md) + - [GetCorporateInvitedUsersList](docs/Model/GetCorporateInvitedUsersList.md) + - [GetCorporateInvitedUsersListFeatureAccess](docs/Model/GetCorporateInvitedUsersListFeatureAccess.md) + - [GetCorporateInvitedUsersListGroups](docs/Model/GetCorporateInvitedUsersListGroups.md) + - [GetCorporateInvitedUsersListUsers](docs/Model/GetCorporateInvitedUsersListUsers.md) + - [GetCouponCollection](docs/Model/GetCouponCollection.md) + - [GetDeviceBrowserStats](docs/Model/GetDeviceBrowserStats.md) + - [GetDomainConfigurationModel](docs/Model/GetDomainConfigurationModel.md) + - [GetDomainsList](docs/Model/GetDomainsList.md) + - [GetDomainsListDomains](docs/Model/GetDomainsListDomains.md) + - [GetEmailCampaign](docs/Model/GetEmailCampaign.md) + - [GetEmailCampaigns](docs/Model/GetEmailCampaigns.md) + - [GetEmailEventReport](docs/Model/GetEmailEventReport.md) + - [GetEmailEventReportEvents](docs/Model/GetEmailEventReportEvents.md) + - [GetExtendedCampaignOverview](docs/Model/GetExtendedCampaignOverview.md) + - [GetExtendedCampaignOverviewSender](docs/Model/GetExtendedCampaignOverviewSender.md) + - [GetExtendedCampaignStats](docs/Model/GetExtendedCampaignStats.md) + - [GetExtendedCampaignStatsGlobalStats](docs/Model/GetExtendedCampaignStatsGlobalStats.md) + - [GetExtendedClient](docs/Model/GetExtendedClient.md) + - [GetExtendedClientAddress](docs/Model/GetExtendedClientAddress.md) + - [GetExtendedContactDetails](docs/Model/GetExtendedContactDetails.md) + - [GetExtendedContactDetailsStatistics](docs/Model/GetExtendedContactDetailsStatistics.md) + - [GetExtendedContactDetailsStatisticsClicked](docs/Model/GetExtendedContactDetailsStatisticsClicked.md) + - [GetExtendedContactDetailsStatisticsDelivered](docs/Model/GetExtendedContactDetailsStatisticsDelivered.md) + - [GetExtendedContactDetailsStatisticsLinks](docs/Model/GetExtendedContactDetailsStatisticsLinks.md) + - [GetExtendedContactDetailsStatisticsMessagesSent](docs/Model/GetExtendedContactDetailsStatisticsMessagesSent.md) + - [GetExtendedContactDetailsStatisticsOpened](docs/Model/GetExtendedContactDetailsStatisticsOpened.md) + - [GetExtendedContactDetailsStatisticsUnsubscriptions](docs/Model/GetExtendedContactDetailsStatisticsUnsubscriptions.md) + - [GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription](docs/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.md) + - [GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription](docs/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.md) + - [GetExtendedList](docs/Model/GetExtendedList.md) + - [GetExtendedListCampaignStats](docs/Model/GetExtendedListCampaignStats.md) + - [GetExternalFeedByUUID](docs/Model/GetExternalFeedByUUID.md) + - [GetExternalFeedByUUIDHeaders](docs/Model/GetExternalFeedByUUIDHeaders.md) + - [GetFolder](docs/Model/GetFolder.md) + - [GetFolderLists](docs/Model/GetFolderLists.md) + - [GetFolders](docs/Model/GetFolders.md) + - [GetInboundEmailEvents](docs/Model/GetInboundEmailEvents.md) + - [GetInboundEmailEventsByUuid](docs/Model/GetInboundEmailEventsByUuid.md) + - [GetInboundEmailEventsByUuidAttachments](docs/Model/GetInboundEmailEventsByUuidAttachments.md) + - [GetInboundEmailEventsByUuidLogs](docs/Model/GetInboundEmailEventsByUuidLogs.md) + - [GetInboundEmailEventsEvents](docs/Model/GetInboundEmailEventsEvents.md) + - [GetInvitedUsersList](docs/Model/GetInvitedUsersList.md) + - [GetInvitedUsersListFeatureAccess](docs/Model/GetInvitedUsersListFeatureAccess.md) + - [GetInvitedUsersListUsers](docs/Model/GetInvitedUsersListUsers.md) + - [GetIp](docs/Model/GetIp.md) + - [GetIpFromSender](docs/Model/GetIpFromSender.md) + - [GetIps](docs/Model/GetIps.md) + - [GetIpsFromSender](docs/Model/GetIpsFromSender.md) + - [GetList](docs/Model/GetList.md) + - [GetLists](docs/Model/GetLists.md) + - [GetOrders](docs/Model/GetOrders.md) + - [GetProcess](docs/Model/GetProcess.md) + - [GetProcesses](docs/Model/GetProcesses.md) + - [GetProductDetails](docs/Model/GetProductDetails.md) + - [GetProducts](docs/Model/GetProducts.md) + - [GetReports](docs/Model/GetReports.md) + - [GetReportsReports](docs/Model/GetReportsReports.md) + - [GetScheduledEmailByBatchId](docs/Model/GetScheduledEmailByBatchId.md) + - [GetScheduledEmailByBatchIdBatches](docs/Model/GetScheduledEmailByBatchIdBatches.md) + - [GetScheduledEmailByMessageId](docs/Model/GetScheduledEmailByMessageId.md) + - [GetSegments](docs/Model/GetSegments.md) + - [GetSegmentsSegments](docs/Model/GetSegmentsSegments.md) + - [GetSendersList](docs/Model/GetSendersList.md) + - [GetSendersListIps](docs/Model/GetSendersListIps.md) + - [GetSendersListSenders](docs/Model/GetSendersListSenders.md) + - [GetSharedTemplateUrl](docs/Model/GetSharedTemplateUrl.md) + - [GetSmsCampaign](docs/Model/GetSmsCampaign.md) + - [GetSmsCampaignOverview](docs/Model/GetSmsCampaignOverview.md) + - [GetSmsCampaignRecipients](docs/Model/GetSmsCampaignRecipients.md) + - [GetSmsCampaignStats](docs/Model/GetSmsCampaignStats.md) + - [GetSmsCampaigns](docs/Model/GetSmsCampaigns.md) + - [GetSmsEventReport](docs/Model/GetSmsEventReport.md) + - [GetSmsEventReportEvents](docs/Model/GetSmsEventReportEvents.md) + - [GetSmtpTemplateOverview](docs/Model/GetSmtpTemplateOverview.md) + - [GetSmtpTemplateOverviewSender](docs/Model/GetSmtpTemplateOverviewSender.md) + - [GetSmtpTemplates](docs/Model/GetSmtpTemplates.md) + - [GetSsoToken](docs/Model/GetSsoToken.md) + - [GetStatsByBrowser](docs/Model/GetStatsByBrowser.md) + - [GetStatsByDevice](docs/Model/GetStatsByDevice.md) + - [GetStatsByDomain](docs/Model/GetStatsByDomain.md) + - [GetTransacAggregatedSmsReport](docs/Model/GetTransacAggregatedSmsReport.md) + - [GetTransacBlockedContacts](docs/Model/GetTransacBlockedContacts.md) + - [GetTransacBlockedContactsContacts](docs/Model/GetTransacBlockedContactsContacts.md) + - [GetTransacBlockedContactsReason](docs/Model/GetTransacBlockedContactsReason.md) + - [GetTransacEmailContent](docs/Model/GetTransacEmailContent.md) + - [GetTransacEmailContentEvents](docs/Model/GetTransacEmailContentEvents.md) + - [GetTransacEmailsList](docs/Model/GetTransacEmailsList.md) + - [GetTransacEmailsListTransactionalEmails](docs/Model/GetTransacEmailsListTransactionalEmails.md) + - [GetTransacSmsReport](docs/Model/GetTransacSmsReport.md) + - [GetTransacSmsReportReports](docs/Model/GetTransacSmsReportReports.md) + - [GetUserPermission](docs/Model/GetUserPermission.md) + - [GetUserPermissionPrivileges](docs/Model/GetUserPermissionPrivileges.md) + - [GetWATemplates](docs/Model/GetWATemplates.md) + - [GetWATemplatesTemplates](docs/Model/GetWATemplatesTemplates.md) + - [GetWebhook](docs/Model/GetWebhook.md) + - [GetWebhookAuth](docs/Model/GetWebhookAuth.md) + - [GetWebhookHeaders](docs/Model/GetWebhookHeaders.md) + - [GetWebhooks](docs/Model/GetWebhooks.md) + - [GetWhatsAppConfig](docs/Model/GetWhatsAppConfig.md) + - [GetWhatsappCampaignOverview](docs/Model/GetWhatsappCampaignOverview.md) + - [GetWhatsappCampaigns](docs/Model/GetWhatsappCampaigns.md) + - [GetWhatsappCampaignsCampaigns](docs/Model/GetWhatsappCampaignsCampaigns.md) + - [GetWhatsappEventReport](docs/Model/GetWhatsappEventReport.md) + - [GetWhatsappEventReportEvents](docs/Model/GetWhatsappEventReportEvents.md) + - [InlineResponse200](docs/Model/InlineResponse200.md) + - [InlineResponse2001](docs/Model/InlineResponse2001.md) + - [InlineResponse2002](docs/Model/InlineResponse2002.md) + - [InlineResponse201](docs/Model/InlineResponse201.md) + - [InlineResponse2011](docs/Model/InlineResponse2011.md) + - [InlineResponse2012](docs/Model/InlineResponse2012.md) + - [InlineResponse2013](docs/Model/InlineResponse2013.md) + - [InlineResponse2014](docs/Model/InlineResponse2014.md) + - [InlineResponse2015](docs/Model/InlineResponse2015.md) + - [InviteAdminUser](docs/Model/InviteAdminUser.md) + - [InviteAdminUserPrivileges](docs/Model/InviteAdminUserPrivileges.md) + - [Inviteuser](docs/Model/Inviteuser.md) + - [InviteuserPrivileges](docs/Model/InviteuserPrivileges.md) + - [ManageIp](docs/Model/ManageIp.md) + - [MasterDetailsResponse](docs/Model/MasterDetailsResponse.md) + - [MasterDetailsResponseBillingInfo](docs/Model/MasterDetailsResponseBillingInfo.md) + - [MasterDetailsResponseBillingInfoAddress](docs/Model/MasterDetailsResponseBillingInfoAddress.md) + - [MasterDetailsResponseBillingInfoName](docs/Model/MasterDetailsResponseBillingInfoName.md) + - [MasterDetailsResponsePlanInfo](docs/Model/MasterDetailsResponsePlanInfo.md) + - [MasterDetailsResponsePlanInfoFeatures](docs/Model/MasterDetailsResponsePlanInfoFeatures.md) + - [Note](docs/Model/Note.md) + - [NoteData](docs/Model/NoteData.md) + - [NoteId](docs/Model/NoteId.md) + - [NoteList](docs/Model/NoteList.md) + - [Order](docs/Model/Order.md) + - [OrderBatch](docs/Model/OrderBatch.md) + - [OrderBilling](docs/Model/OrderBilling.md) + - [OrderProducts](docs/Model/OrderProducts.md) + - [Otp](docs/Model/Otp.md) + - [Pipeline](docs/Model/Pipeline.md) + - [PipelineStage](docs/Model/PipelineStage.md) + - [Pipelines](docs/Model/Pipelines.md) + - [PostContactInfo](docs/Model/PostContactInfo.md) + - [PostContactInfoContacts](docs/Model/PostContactInfoContacts.md) + - [PostSendFailed](docs/Model/PostSendFailed.md) + - [PostSendSmsTestFailed](docs/Model/PostSendSmsTestFailed.md) + - [PutRevokeUserPermission](docs/Model/PutRevokeUserPermission.md) + - [Putresendcancelinvitation](docs/Model/Putresendcancelinvitation.md) + - [RemainingCreditModel](docs/Model/RemainingCreditModel.md) + - [RemainingCreditModelChild](docs/Model/RemainingCreditModelChild.md) + - [RemainingCreditModelReseller](docs/Model/RemainingCreditModelReseller.md) + - [RemoveContactFromList](docs/Model/RemoveContactFromList.md) + - [RemoveCredits](docs/Model/RemoveCredits.md) + - [RequestContactExport](docs/Model/RequestContactExport.md) + - [RequestContactExportCustomContactFilter](docs/Model/RequestContactExportCustomContactFilter.md) + - [RequestContactImport](docs/Model/RequestContactImport.md) + - [RequestContactImportJsonBody](docs/Model/RequestContactImportJsonBody.md) + - [RequestContactImportNewList](docs/Model/RequestContactImportNewList.md) + - [RequestSmsRecipientExport](docs/Model/RequestSmsRecipientExport.md) + - [ScheduleSmtpEmail](docs/Model/ScheduleSmtpEmail.md) + - [SendReport](docs/Model/SendReport.md) + - [SendReportEmail](docs/Model/SendReportEmail.md) + - [SendSms](docs/Model/SendSms.md) + - [SendSmtpEmail](docs/Model/SendSmtpEmail.md) + - [SendSmtpEmailAttachment](docs/Model/SendSmtpEmailAttachment.md) + - [SendSmtpEmailBcc](docs/Model/SendSmtpEmailBcc.md) + - [SendSmtpEmailCc](docs/Model/SendSmtpEmailCc.md) + - [SendSmtpEmailMessageVersions](docs/Model/SendSmtpEmailMessageVersions.md) + - [SendSmtpEmailReplyTo](docs/Model/SendSmtpEmailReplyTo.md) + - [SendSmtpEmailReplyTo1](docs/Model/SendSmtpEmailReplyTo1.md) + - [SendSmtpEmailSender](docs/Model/SendSmtpEmailSender.md) + - [SendSmtpEmailTo](docs/Model/SendSmtpEmailTo.md) + - [SendSmtpEmailTo1](docs/Model/SendSmtpEmailTo1.md) + - [SendTestEmail](docs/Model/SendTestEmail.md) + - [SendTestSms](docs/Model/SendTestSms.md) + - [SendTransacSms](docs/Model/SendTransacSms.md) + - [SendWhatsappMessage](docs/Model/SendWhatsappMessage.md) + - [SsoTokenRequest](docs/Model/SsoTokenRequest.md) + - [SubAccountAppsToggleRequest](docs/Model/SubAccountAppsToggleRequest.md) + - [SubAccountDetailsResponse](docs/Model/SubAccountDetailsResponse.md) + - [SubAccountDetailsResponsePlanInfo](docs/Model/SubAccountDetailsResponsePlanInfo.md) + - [SubAccountDetailsResponsePlanInfoCredits](docs/Model/SubAccountDetailsResponsePlanInfoCredits.md) + - [SubAccountDetailsResponsePlanInfoCreditsEmails](docs/Model/SubAccountDetailsResponsePlanInfoCreditsEmails.md) + - [SubAccountDetailsResponsePlanInfoFeatures](docs/Model/SubAccountDetailsResponsePlanInfoFeatures.md) + - [SubAccountDetailsResponsePlanInfoFeaturesInbox](docs/Model/SubAccountDetailsResponsePlanInfoFeaturesInbox.md) + - [SubAccountDetailsResponsePlanInfoFeaturesLandingPage](docs/Model/SubAccountDetailsResponsePlanInfoFeaturesLandingPage.md) + - [SubAccountDetailsResponsePlanInfoFeaturesUsers](docs/Model/SubAccountDetailsResponsePlanInfoFeaturesUsers.md) + - [SubAccountUpdatePlanRequest](docs/Model/SubAccountUpdatePlanRequest.md) + - [SubAccountUpdatePlanRequestCredits](docs/Model/SubAccountUpdatePlanRequestCredits.md) + - [SubAccountUpdatePlanRequestFeatures](docs/Model/SubAccountUpdatePlanRequestFeatures.md) + - [SubAccountsResponse](docs/Model/SubAccountsResponse.md) + - [SubAccountsResponseSubAccounts](docs/Model/SubAccountsResponseSubAccounts.md) + - [Task](docs/Model/Task.md) + - [TaskList](docs/Model/TaskList.md) + - [TaskReminder](docs/Model/TaskReminder.md) + - [TaskTypes](docs/Model/TaskTypes.md) + - [UpdateAttribute](docs/Model/UpdateAttribute.md) + - [UpdateAttributeEnumeration](docs/Model/UpdateAttributeEnumeration.md) + - [UpdateBatchContacts](docs/Model/UpdateBatchContacts.md) + - [UpdateBatchContactsContacts](docs/Model/UpdateBatchContactsContacts.md) + - [UpdateBatchContactsModel](docs/Model/UpdateBatchContactsModel.md) + - [UpdateCampaignStatus](docs/Model/UpdateCampaignStatus.md) + - [UpdateChild](docs/Model/UpdateChild.md) + - [UpdateChildAccountStatus](docs/Model/UpdateChildAccountStatus.md) + - [UpdateChildDomain](docs/Model/UpdateChildDomain.md) + - [UpdateContact](docs/Model/UpdateContact.md) + - [UpdateCouponCollection](docs/Model/UpdateCouponCollection.md) + - [UpdateEmailCampaign](docs/Model/UpdateEmailCampaign.md) + - [UpdateEmailCampaignRecipients](docs/Model/UpdateEmailCampaignRecipients.md) + - [UpdateEmailCampaignSender](docs/Model/UpdateEmailCampaignSender.md) + - [UpdateExternalFeed](docs/Model/UpdateExternalFeed.md) + - [UpdateList](docs/Model/UpdateList.md) + - [UpdateSender](docs/Model/UpdateSender.md) + - [UpdateSmsCampaign](docs/Model/UpdateSmsCampaign.md) + - [UpdateSmtpTemplate](docs/Model/UpdateSmtpTemplate.md) + - [UpdateSmtpTemplateSender](docs/Model/UpdateSmtpTemplateSender.md) + - [UpdateWebhook](docs/Model/UpdateWebhook.md) + - [UpdateWhatsAppCampaign](docs/Model/UpdateWhatsAppCampaign.md) + - [UploadImageModel](docs/Model/UploadImageModel.md) + - [UploadImageToGallery](docs/Model/UploadImageToGallery.md) + - [GetChildInfo](docs/Model/GetChildInfo.md) + - [GetExtendedCampaignOverview](docs/Model/GetExtendedCampaignOverview.md) + - [GetExtendedClient](docs/Model/GetExtendedClient.md) + - [GetExtendedContactDetails](docs/Model/GetExtendedContactDetails.md) + - [GetExtendedList](docs/Model/GetExtendedList.md) + - [GetSmsCampaign](docs/Model/GetSmsCampaign.md) + - [GetAccount](docs/Model/GetAccount.md) + - [GetEmailCampaign](docs/Model/GetEmailCampaign.md) + - [VariablesItems](docs/Model/VariablesItems.md) + - [WhatsappCampStats](docs/Model/WhatsappCampStats.md) + - [WhatsappCampTemplate](docs/Model/WhatsappCampTemplate.md) + + +## Documentation For Authorization + + +## api-key + +The API key should be passed in the request headers as `api-key` for authentication. + +- **Type**: API key +- **API key parameter name**: api-key +- **Location**: HTTP header + +## partner-key + +The partner key should be passed in the request headers as `partner-key` along with `api-key` pair for successful authentication of partner (Optional). + +- **Type**: API key +- **API key parameter name**: partner-key +- **Location**: HTTP header + + +If you find a bug, please post the issue on [Github](https://github.com/getbrevo/brevo-php/issues). + +As always, if you need additional assistance, drop us a note [here](https://account.brevo.com/support). diff --git a/vendor/getbrevo/brevo-php/composer.json b/vendor/getbrevo/brevo-php/composer.json new file mode 100755 index 0000000..176f1d7 --- /dev/null +++ b/vendor/getbrevo/brevo-php/composer.json @@ -0,0 +1,43 @@ +{ + "name": "getbrevo/brevo-php", + "description": "Official Brevo provided RESTFul API V3 php library", + "keywords": [ + "brevo", + "swagger", + "php", + "sdk", + "api" + ], + "homepage": "https://github.com/getbrevo/brevo-php", + "license": "MIT", + "authors": [ + { + "name": "Brevo Developers", + "email": "contact@brevo.com", + "homepage": "https://www.brevo.com/" + } + ], + "require": { + "php": ">=5.6", + "ext-curl": "*", + "ext-json": "*", + "ext-mbstring": "*", + "guzzlehttp/guzzle": "^7.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8", + "squizlabs/php_codesniffer": "~2.6", + "friendsofphp/php-cs-fixer": "~1.12" + }, + "autoload": { + "psr-4": { "Brevo\\Client\\" : "lib/" } + }, + "autoload-dev": { + "psr-4": { "Brevo\\Client\\" : "test/" } + }, + "extra": { + "branch-alias": { + "dev-master": "1.x.x-dev" + } + } +} \ No newline at end of file diff --git a/vendor/getbrevo/brevo-php/composer.lock b/vendor/getbrevo/brevo-php/composer.lock new file mode 100644 index 0000000..fb002d7 --- /dev/null +++ b/vendor/getbrevo/brevo-php/composer.lock @@ -0,0 +1,2107 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "fc3a3187a6ed0508923186df909358ff", + "packages": [ + { + "name": "guzzlehttp/guzzle", + "version": "6.3.3", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "shasum": "" + }, + "require": { + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.4", + "php": ">=5.5" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", + "psr/log": "^1.0" + }, + "suggest": { + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.3-dev" + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "time": "2018-04-22T15:46:56+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "v1.3.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "shasum": "" + }, + "require": { + "php": ">=5.5.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "time": "2016-12-20T10:07:11+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "1.5.2", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "9f83dded91781a01c63574e387eaa769be769115" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/9f83dded91781a01c63574e387eaa769be769115", + "reference": "9f83dded91781a01c63574e387eaa769be769115", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.5-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "time": "2018-12-04T20:46:45+00:00" + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2016-08-06T14:39:51+00:00" + }, + { + "name": "ralouphie/getallheaders", + "version": "2.0.5", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/5601c8a83fbba7ef674a7369456d12f1e0d0eafa", + "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa", + "shasum": "" + }, + "require": { + "php": ">=5.3" + }, + "require-dev": { + "phpunit/phpunit": "~3.7.0", + "satooshi/php-coveralls": ">=1.0" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "time": "2016-02-11T07:05:27+00:00" + } + ], + "packages-dev": [ + { + "name": "doctrine/instantiator", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", + "shasum": "" + }, + "require": { + "php": ">=5.3,<8.0-DEV" + }, + "require-dev": { + "athletic/athletic": "~0.1.8", + "ext-pdo": "*", + "ext-phar": "*", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://github.com/doctrine/instantiator", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2015-06-14T21:17:01+00:00" + }, + { + "name": "friendsofphp/php-cs-fixer", + "version": "v1.13.3", + "source": { + "type": "git", + "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", + "reference": "387e4c86c9dc0e1e4c475291fc114ec45b98e624" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/387e4c86c9dc0e1e4c475291fc114ec45b98e624", + "reference": "387e4c86c9dc0e1e4c475291fc114ec45b98e624", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": "^5.3.6 || >=7.0 <7.2", + "sebastian/diff": "^1.1", + "symfony/console": "^2.3 || ^3.0", + "symfony/event-dispatcher": "^2.1 || ^3.0", + "symfony/filesystem": "^2.1 || ^3.0", + "symfony/finder": "^2.1 || ^3.0", + "symfony/process": "^2.3 || ^3.0", + "symfony/stopwatch": "^2.5 || ^3.0" + }, + "conflict": { + "hhvm": "<3.9" + }, + "require-dev": { + "phpunit/phpunit": "^4.5|^5", + "satooshi/php-coveralls": "^1.0" + }, + "bin": [ + "php-cs-fixer" + ], + "type": "application", + "autoload": { + "psr-4": { + "Symfony\\CS\\": "Symfony/CS/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dariusz Rumiński", + "email": "dariusz.ruminski@gmail.com" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "A tool to automatically fix PHP code style", + "time": "2017-09-11T14:11:16+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "time": "2017-09-11T18:02:19+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "3.3.2", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "bf329f6c1aadea3299f08ee804682b7c45b326a2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/bf329f6c1aadea3299f08ee804682b7c45b326a2", + "reference": "bf329f6c1aadea3299f08ee804682b7c45b326a2", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0", + "phpdocumentor/reflection-common": "^1.0.0", + "phpdocumentor/type-resolver": "^0.4.0", + "webmozart/assert": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^4.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "time": "2017-11-10T14:09:06+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "0.4.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", + "shasum": "" + }, + "require": { + "php": "^5.5 || ^7.0", + "phpdocumentor/reflection-common": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^5.2||^4.8.24" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "time": "2017-07-14T14:27:02+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "1.8.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4ba436b55987b4bf311cb7c6ba82aa528aac0a06", + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", + "sebastian/comparator": "^1.1|^2.0|^3.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0" + }, + "require-dev": { + "phpspec/phpspec": "^2.5|^3.2", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.8.x-dev" + } + }, + "autoload": { + "psr-0": { + "Prophecy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "time": "2018-08-05T17:53:17+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "2.2.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "phpunit/php-file-iterator": "~1.3", + "phpunit/php-text-template": "~1.2", + "phpunit/php-token-stream": "~1.3", + "sebastian/environment": "^1.3.2", + "sebastian/version": "~1.0" + }, + "require-dev": { + "ext-xdebug": ">=2.1.4", + "phpunit/phpunit": "~4" + }, + "suggest": { + "ext-dom": "*", + "ext-xdebug": ">=2.2.1", + "ext-xmlwriter": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "time": "2015-10-06T15:47:00+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "1.4.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "time": "2017-11-27T13:52:08+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "time": "2015-06-21T13:50:34+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "1.0.9", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2017-02-26T11:10:40+00:00" + }, + { + "name": "phpunit/php-token-stream", + "version": "1.4.12", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/1ce90ba27c42e4e44e6d8458241466380b51fa16", + "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "time": "2017-12-04T08:55:13+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "4.8.36", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "46023de9a91eec7dfb06cc56cb4e260017298517" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/46023de9a91eec7dfb06cc56cb4e260017298517", + "reference": "46023de9a91eec7dfb06cc56cb4e260017298517", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "php": ">=5.3.3", + "phpspec/prophecy": "^1.3.1", + "phpunit/php-code-coverage": "~2.1", + "phpunit/php-file-iterator": "~1.4", + "phpunit/php-text-template": "~1.2", + "phpunit/php-timer": "^1.0.6", + "phpunit/phpunit-mock-objects": "~2.3", + "sebastian/comparator": "~1.2.2", + "sebastian/diff": "~1.2", + "sebastian/environment": "~1.3", + "sebastian/exporter": "~1.2", + "sebastian/global-state": "~1.0", + "sebastian/version": "~1.0", + "symfony/yaml": "~2.1|~3.0" + }, + "suggest": { + "phpunit/php-invoker": "~1.1" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.8.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "time": "2017-06-21T08:07:12+00:00" + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "2.3.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": ">=5.3.3", + "phpunit/php-text-template": "~1.2", + "sebastian/exporter": "~1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "suggest": { + "ext-soap": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "keywords": [ + "mock", + "xunit" + ], + "abandoned": true, + "time": "2015-10-02T06:51:40+00:00" + }, + { + "name": "psr/log", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2018-11-20T15:27:04+00:00" + }, + { + "name": "sebastian/comparator", + "version": "1.2.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/diff": "~1.2", + "sebastian/exporter": "~1.2 || ~2.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "http://www.github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2017-01-29T09:50:25+00:00" + }, + { + "name": "sebastian/diff", + "version": "1.4.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff" + ], + "time": "2017-05-22T07:24:03+00:00" + }, + { + "name": "sebastian/environment", + "version": "1.3.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea", + "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8 || ^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "time": "2016-08-18T05:49:44+00:00" + }, + { + "name": "sebastian/exporter", + "version": "1.2.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/recursion-context": "~1.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "time": "2016-06-17T09:04:28+00:00" + }, + { + "name": "sebastian/global-state", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "time": "2015-10-12T03:26:01+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b19cc3298482a335a95f3016d2f8a6950f0fbcd7", + "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "time": "2016-10-03T07:41:43+00:00" + }, + { + "name": "sebastian/version", + "version": "1.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "shasum": "" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "time": "2015-06-21T13:59:46+00:00" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "2.9.2", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "2acf168de78487db620ab4bc524135a13cfe6745" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/2acf168de78487db620ab4bc524135a13cfe6745", + "reference": "2acf168de78487db620ab4bc524135a13cfe6745", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "bin": [ + "scripts/phpcs", + "scripts/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "classmap": [ + "CodeSniffer.php", + "CodeSniffer/CLI.php", + "CodeSniffer/Exception.php", + "CodeSniffer/File.php", + "CodeSniffer/Fixer.php", + "CodeSniffer/Report.php", + "CodeSniffer/Reporting.php", + "CodeSniffer/Sniff.php", + "CodeSniffer/Tokens.php", + "CodeSniffer/Reports/", + "CodeSniffer/Tokenizers/", + "CodeSniffer/DocGenerators/", + "CodeSniffer/Standards/AbstractPatternSniff.php", + "CodeSniffer/Standards/AbstractScopeSniff.php", + "CodeSniffer/Standards/AbstractVariableSniff.php", + "CodeSniffer/Standards/IncorrectPatternException.php", + "CodeSniffer/Standards/Generic/Sniffs/", + "CodeSniffer/Standards/MySource/Sniffs/", + "CodeSniffer/Standards/PEAR/Sniffs/", + "CodeSniffer/Standards/PSR1/Sniffs/", + "CodeSniffer/Standards/PSR2/Sniffs/", + "CodeSniffer/Standards/Squiz/Sniffs/", + "CodeSniffer/Standards/Zend/Sniffs/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "http://www.squizlabs.com/php-codesniffer", + "keywords": [ + "phpcs", + "standards" + ], + "time": "2018-11-07T22:31:41+00:00" + }, + { + "name": "symfony/console", + "version": "v3.4.26", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "15a9104356436cb26e08adab97706654799d31d8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/15a9104356436cb26e08adab97706654799d31d8", + "reference": "15a9104356436cb26e08adab97706654799d31d8", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "symfony/debug": "~2.8|~3.0|~4.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/dependency-injection": "<3.4", + "symfony/process": "<3.3" + }, + "provide": { + "psr/log-implementation": "1.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~3.3|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/event-dispatcher": "~2.8|~3.0|~4.0", + "symfony/lock": "~3.4|~4.0", + "symfony/process": "~3.3|~4.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Console Component", + "homepage": "https://symfony.com", + "time": "2019-04-08T09:29:13+00:00" + }, + { + "name": "symfony/debug", + "version": "v3.4.26", + "source": { + "type": "git", + "url": "https://github.com/symfony/debug.git", + "reference": "681afbb26488903c5ac15e63734f1d8ac430c9b9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/debug/zipball/681afbb26488903c5ac15e63734f1d8ac430c9b9", + "reference": "681afbb26488903c5ac15e63734f1d8ac430c9b9", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "psr/log": "~1.0" + }, + "conflict": { + "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" + }, + "require-dev": { + "symfony/http-kernel": "~2.8|~3.0|~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Debug\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Debug Component", + "homepage": "https://symfony.com", + "time": "2019-04-11T09:48:14+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v3.4.26", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "a088aafcefb4eef2520a290ed82e4374092a6dff" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a088aafcefb4eef2520a290ed82e4374092a6dff", + "reference": "a088aafcefb4eef2520a290ed82e4374092a6dff", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8" + }, + "conflict": { + "symfony/dependency-injection": "<3.3" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~2.8|~3.0|~4.0", + "symfony/dependency-injection": "~3.3|~4.0", + "symfony/expression-language": "~2.8|~3.0|~4.0", + "symfony/stopwatch": "~2.8|~3.0|~4.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony EventDispatcher Component", + "homepage": "https://symfony.com", + "time": "2019-04-02T08:51:52+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v3.4.26", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "acf99758b1df8e9295e6b85aa69f294565c9fedb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/acf99758b1df8e9295e6b85aa69f294565c9fedb", + "reference": "acf99758b1df8e9295e6b85aa69f294565c9fedb", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "symfony/polyfill-ctype": "~1.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Filesystem Component", + "homepage": "https://symfony.com", + "time": "2019-02-04T21:34:32+00:00" + }, + { + "name": "symfony/finder", + "version": "v3.4.26", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "61af5ce0b34b942d414fe8f1b11950d0e9a90e98" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/61af5ce0b34b942d414fe8f1b11950d0e9a90e98", + "reference": "61af5ce0b34b942d414fe8f1b11950d0e9a90e98", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Finder Component", + "homepage": "https://symfony.com", + "time": "2019-04-02T19:54:57+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.11.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "82ebae02209c21113908c229e9883c419720738a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/82ebae02209c21113908c229e9883c419720738a", + "reference": "82ebae02209c21113908c229e9883c419720738a", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.11-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + }, + { + "name": "Gert de Pagter", + "email": "backendtea@gmail.com" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "time": "2019-02-06T07:57:58+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.11.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "fe5e94c604826c35a32fa832f35bd036b6799609" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fe5e94c604826c35a32fa832f35bd036b6799609", + "reference": "fe5e94c604826c35a32fa832f35bd036b6799609", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.11-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2019-02-06T07:57:58+00:00" + }, + { + "name": "symfony/process", + "version": "v3.4.26", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "a9c4dfbf653023b668c282e4e02609d131f4057a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/a9c4dfbf653023b668c282e4e02609d131f4057a", + "reference": "a9c4dfbf653023b668c282e4e02609d131f4057a", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Process Component", + "homepage": "https://symfony.com", + "time": "2019-04-08T16:15:54+00:00" + }, + { + "name": "symfony/stopwatch", + "version": "v3.4.26", + "source": { + "type": "git", + "url": "https://github.com/symfony/stopwatch.git", + "reference": "2a651c2645c10bbedd21170771f122d935e0dd58" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/2a651c2645c10bbedd21170771f122d935e0dd58", + "reference": "2a651c2645c10bbedd21170771f122d935e0dd58", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Stopwatch\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Stopwatch Component", + "homepage": "https://symfony.com", + "time": "2019-01-16T09:39:14+00:00" + }, + { + "name": "symfony/yaml", + "version": "v3.4.26", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "212a27b731e5bfb735679d1ffaac82bd6a1dc996" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/212a27b731e5bfb735679d1ffaac82bd6a1dc996", + "reference": "212a27b731e5bfb735679d1ffaac82bd6a1dc996", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/console": "<3.4" + }, + "require-dev": { + "symfony/console": "~3.4|~4.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Yaml Component", + "homepage": "https://symfony.com", + "time": "2019-03-25T07:48:46+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/83e253c8e0be5b0257b881e1827274667c5c17a9", + "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0", + "symfony/polyfill-ctype": "^1.8" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "time": "2018-12-25T11:19:39+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=5.6", + "ext-curl": "*", + "ext-json": "*", + "ext-mbstring": "*" + }, + "platform-dev": [] +} \ No newline at end of file diff --git a/vendor/getbrevo/brevo-php/docs/Api/AccountApi.md b/vendor/getbrevo/brevo-php/docs/Api/AccountApi.md new file mode 100644 index 0000000..fb8a867 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Api/AccountApi.md @@ -0,0 +1,126 @@ +# Brevo\Client\AccountApi + +All URIs are relative to *https://api.brevo.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getAccount**](AccountApi.md#getAccount) | **GET** /account | Get your account information, plan and credits details +[**getAccountActivity**](AccountApi.md#getAccountActivity) | **GET** /organization/activities | Get user activity logs + + +# **getAccount** +> \Brevo\Client\Model\GetAccount getAccount() + +Get your account information, plan and credits details + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\AccountApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); + +try { + $result = $apiInstance->getAccount(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AccountApi->getAccount: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**\Brevo\Client\Model\GetAccount**](../Model/GetAccount.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getAccountActivity** +> \Brevo\Client\Model\GetAccountActivity getAccountActivity($startDate, $endDate, $limit, $offset) + +Get user activity logs + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\AccountApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$startDate = "startDate_example"; // string | Mandatory if endDate is used. Enter start date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. Additionally, you can retrieve activity logs from the past 12 months from the date of your search. +$endDate = "endDate_example"; // string | Mandatory if startDate is used. Enter end date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. +$limit = 10; // int | Number of documents per page +$offset = 0; // int | Index of the first document in the page. + +try { + $result = $apiInstance->getAccountActivity($startDate, $endDate, $limit, $offset); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AccountApi->getAccountActivity: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **startDate** | **string**| Mandatory if endDate is used. Enter start date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. Additionally, you can retrieve activity logs from the past 12 months from the date of your search. | [optional] + **endDate** | **string**| Mandatory if startDate is used. Enter end date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. | [optional] + **limit** | **int**| Number of documents per page | [optional] [default to 10] + **offset** | **int**| Index of the first document in the page. | [optional] [default to 0] + +### Return type + +[**\Brevo\Client\Model\GetAccountActivity**](../Model/GetAccountActivity.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + diff --git a/vendor/getbrevo/brevo-php/docs/Api/AttributesApi.md b/vendor/getbrevo/brevo-php/docs/Api/AttributesApi.md new file mode 100644 index 0000000..03be401 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Api/AttributesApi.md @@ -0,0 +1,243 @@ +# Brevo\Client\AttributesApi + +All URIs are relative to *https://api.brevo.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createAttribute**](AttributesApi.md#createAttribute) | **POST** /contacts/attributes/{attributeCategory}/{attributeName} | Create contact attribute +[**deleteAttribute**](AttributesApi.md#deleteAttribute) | **DELETE** /contacts/attributes/{attributeCategory}/{attributeName} | Delete an attribute +[**getAttributes**](AttributesApi.md#getAttributes) | **GET** /contacts/attributes | List all attributes +[**updateAttribute**](AttributesApi.md#updateAttribute) | **PUT** /contacts/attributes/{attributeCategory}/{attributeName} | Update contact attribute + + +# **createAttribute** +> createAttribute($attributeCategory, $attributeName, $createAttribute) + +Create contact attribute + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\AttributesApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$attributeCategory = "attributeCategory_example"; // string | Category of the attribute +$attributeName = "attributeName_example"; // string | Name of the attribute +$createAttribute = new \Brevo\Client\Model\CreateAttribute(); // \Brevo\Client\Model\CreateAttribute | Values to create an attribute + +try { + $apiInstance->createAttribute($attributeCategory, $attributeName, $createAttribute); +} catch (Exception $e) { + echo 'Exception when calling AttributesApi->createAttribute: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **attributeCategory** | **string**| Category of the attribute | + **attributeName** | **string**| Name of the attribute | + **createAttribute** | [**\Brevo\Client\Model\CreateAttribute**](../Model/CreateAttribute.md)| Values to create an attribute | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **deleteAttribute** +> deleteAttribute($attributeCategory, $attributeName) + +Delete an attribute + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\AttributesApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$attributeCategory = "attributeCategory_example"; // string | Category of the attribute +$attributeName = "attributeName_example"; // string | Name of the existing attribute + +try { + $apiInstance->deleteAttribute($attributeCategory, $attributeName); +} catch (Exception $e) { + echo 'Exception when calling AttributesApi->deleteAttribute: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **attributeCategory** | **string**| Category of the attribute | + **attributeName** | **string**| Name of the existing attribute | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getAttributes** +> \Brevo\Client\Model\GetAttributes getAttributes() + +List all attributes + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\AttributesApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); + +try { + $result = $apiInstance->getAttributes(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AttributesApi->getAttributes: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**\Brevo\Client\Model\GetAttributes**](../Model/GetAttributes.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **updateAttribute** +> updateAttribute($attributeCategory, $attributeName, $updateAttribute) + +Update contact attribute + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\AttributesApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$attributeCategory = "attributeCategory_example"; // string | Category of the attribute +$attributeName = "attributeName_example"; // string | Name of the existing attribute +$updateAttribute = new \Brevo\Client\Model\UpdateAttribute(); // \Brevo\Client\Model\UpdateAttribute | Values to update an attribute + +try { + $apiInstance->updateAttribute($attributeCategory, $attributeName, $updateAttribute); +} catch (Exception $e) { + echo 'Exception when calling AttributesApi->updateAttribute: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **attributeCategory** | **string**| Category of the attribute | + **attributeName** | **string**| Name of the existing attribute | + **updateAttribute** | [**\Brevo\Client\Model\UpdateAttribute**](../Model/UpdateAttribute.md)| Values to update an attribute | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + diff --git a/vendor/getbrevo/brevo-php/docs/Api/CRMApi.md b/vendor/getbrevo/brevo-php/docs/Api/CRMApi.md new file mode 100644 index 0000000..1802918 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Api/CRMApi.md @@ -0,0 +1,678 @@ +# Brevo\Client\CRMApi + +All URIs are relative to *https://api.brevo.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**crmNotesGet**](CRMApi.md#crmNotesGet) | **GET** /crm/notes | Get all notes +[**crmNotesIdDelete**](CRMApi.md#crmNotesIdDelete) | **DELETE** /crm/notes/{id} | Delete a note +[**crmNotesIdGet**](CRMApi.md#crmNotesIdGet) | **GET** /crm/notes/{id} | Get a note +[**crmNotesIdPatch**](CRMApi.md#crmNotesIdPatch) | **PATCH** /crm/notes/{id} | Update a note +[**crmNotesPost**](CRMApi.md#crmNotesPost) | **POST** /crm/notes | Create a note +[**crmTasksGet**](CRMApi.md#crmTasksGet) | **GET** /crm/tasks | Get all tasks +[**crmTasksIdDelete**](CRMApi.md#crmTasksIdDelete) | **DELETE** /crm/tasks/{id} | Delete a task +[**crmTasksIdGet**](CRMApi.md#crmTasksIdGet) | **GET** /crm/tasks/{id} | Get a task +[**crmTasksIdPatch**](CRMApi.md#crmTasksIdPatch) | **PATCH** /crm/tasks/{id} | Update a task +[**crmTasksPost**](CRMApi.md#crmTasksPost) | **POST** /crm/tasks | Create a task +[**crmTasktypesGet**](CRMApi.md#crmTasktypesGet) | **GET** /crm/tasktypes | Get all task types + + +# **crmNotesGet** +> \Brevo\Client\Model\NoteList crmNotesGet($entity, $entityIds, $dateFrom, $dateTo, $offset, $limit, $sort) + +Get all notes + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\CRMApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$entity = "entity_example"; // string | Filter by note entity type +$entityIds = "entityIds_example"; // string | Filter by note entity IDs +$dateFrom = 56; // int | dateFrom to date range filter type (timestamp in milliseconds) +$dateTo = 56; // int | dateTo to date range filter type (timestamp in milliseconds) +$offset = 789; // int | Index of the first document of the page +$limit = 50; // int | Number of documents per page +$sort = "sort_example"; // string | Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed + +try { + $result = $apiInstance->crmNotesGet($entity, $entityIds, $dateFrom, $dateTo, $offset, $limit, $sort); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CRMApi->crmNotesGet: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **entity** | **string**| Filter by note entity type | [optional] + **entityIds** | **string**| Filter by note entity IDs | [optional] + **dateFrom** | **int**| dateFrom to date range filter type (timestamp in milliseconds) | [optional] + **dateTo** | **int**| dateTo to date range filter type (timestamp in milliseconds) | [optional] + **offset** | **int**| Index of the first document of the page | [optional] + **limit** | **int**| Number of documents per page | [optional] [default to 50] + **sort** | **string**| Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed | [optional] + +### Return type + +[**\Brevo\Client\Model\NoteList**](../Model/NoteList.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **crmNotesIdDelete** +> crmNotesIdDelete($id) + +Delete a note + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\CRMApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = "id_example"; // string | Note ID to delete + +try { + $apiInstance->crmNotesIdDelete($id); +} catch (Exception $e) { + echo 'Exception when calling CRMApi->crmNotesIdDelete: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| Note ID to delete | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **crmNotesIdGet** +> \Brevo\Client\Model\Note crmNotesIdGet($id) + +Get a note + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\CRMApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = "id_example"; // string | Note ID to get + +try { + $result = $apiInstance->crmNotesIdGet($id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CRMApi->crmNotesIdGet: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| Note ID to get | + +### Return type + +[**\Brevo\Client\Model\Note**](../Model/Note.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **crmNotesIdPatch** +> crmNotesIdPatch($id, $body) + +Update a note + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\CRMApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = "id_example"; // string | Note ID to update +$body = new \Brevo\Client\Model\NoteData(); // \Brevo\Client\Model\NoteData | Note data to update a note + +try { + $apiInstance->crmNotesIdPatch($id, $body); +} catch (Exception $e) { + echo 'Exception when calling CRMApi->crmNotesIdPatch: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| Note ID to update | + **body** | [**\Brevo\Client\Model\NoteData**](../Model/NoteData.md)| Note data to update a note | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **crmNotesPost** +> \Brevo\Client\Model\NoteId crmNotesPost($body) + +Create a note + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\CRMApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$body = new \Brevo\Client\Model\NoteData(); // \Brevo\Client\Model\NoteData | Note data to create a note. + +try { + $result = $apiInstance->crmNotesPost($body); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CRMApi->crmNotesPost: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**\Brevo\Client\Model\NoteData**](../Model/NoteData.md)| Note data to create a note. | + +### Return type + +[**\Brevo\Client\Model\NoteId**](../Model/NoteId.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **crmTasksGet** +> \Brevo\Client\Model\TaskList crmTasksGet($filterType, $filterStatus, $filterDate, $filterAssignTo, $filterContacts, $filterDeals, $filterCompanies, $dateFrom, $dateTo, $offset, $limit, $sort, $sortBy) + +Get all tasks + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\CRMApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$filterType = "filterType_example"; // string | Filter by task type (ID) +$filterStatus = "filterStatus_example"; // string | Filter by task status +$filterDate = "filterDate_example"; // string | Filter by date +$filterAssignTo = "filterAssignTo_example"; // string | Filter by assignTo id +$filterContacts = "filterContacts_example"; // string | Filter by contact ids +$filterDeals = "filterDeals_example"; // string | Filter by deals ids +$filterCompanies = "filterCompanies_example"; // string | Filter by companies ids +$dateFrom = 56; // int | dateFrom to date range filter type (timestamp in milliseconds) +$dateTo = 56; // int | dateTo to date range filter type (timestamp in milliseconds) +$offset = 789; // int | Index of the first document of the page +$limit = 50; // int | Number of documents per page +$sort = "sort_example"; // string | Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed +$sortBy = "sortBy_example"; // string | The field used to sort field names. + +try { + $result = $apiInstance->crmTasksGet($filterType, $filterStatus, $filterDate, $filterAssignTo, $filterContacts, $filterDeals, $filterCompanies, $dateFrom, $dateTo, $offset, $limit, $sort, $sortBy); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CRMApi->crmTasksGet: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **filterType** | **string**| Filter by task type (ID) | [optional] + **filterStatus** | **string**| Filter by task status | [optional] + **filterDate** | **string**| Filter by date | [optional] + **filterAssignTo** | **string**| Filter by assignTo id | [optional] + **filterContacts** | **string**| Filter by contact ids | [optional] + **filterDeals** | **string**| Filter by deals ids | [optional] + **filterCompanies** | **string**| Filter by companies ids | [optional] + **dateFrom** | **int**| dateFrom to date range filter type (timestamp in milliseconds) | [optional] + **dateTo** | **int**| dateTo to date range filter type (timestamp in milliseconds) | [optional] + **offset** | **int**| Index of the first document of the page | [optional] + **limit** | **int**| Number of documents per page | [optional] [default to 50] + **sort** | **string**| Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed | [optional] + **sortBy** | **string**| The field used to sort field names. | [optional] + +### Return type + +[**\Brevo\Client\Model\TaskList**](../Model/TaskList.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **crmTasksIdDelete** +> crmTasksIdDelete($id) + +Delete a task + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\CRMApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = "id_example"; // string | + +try { + $apiInstance->crmTasksIdDelete($id); +} catch (Exception $e) { + echo 'Exception when calling CRMApi->crmTasksIdDelete: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **crmTasksIdGet** +> \Brevo\Client\Model\Task crmTasksIdGet($id) + +Get a task + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\CRMApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = "id_example"; // string | + +try { + $result = $apiInstance->crmTasksIdGet($id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CRMApi->crmTasksIdGet: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| | + +### Return type + +[**\Brevo\Client\Model\Task**](../Model/Task.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **crmTasksIdPatch** +> crmTasksIdPatch($id, $body) + +Update a task + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\CRMApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = "id_example"; // string | +$body = new \Brevo\Client\Model\Body1(); // \Brevo\Client\Model\Body1 | Updated task details. + +try { + $apiInstance->crmTasksIdPatch($id, $body); +} catch (Exception $e) { + echo 'Exception when calling CRMApi->crmTasksIdPatch: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| | + **body** | [**\Brevo\Client\Model\Body1**](../Model/Body1.md)| Updated task details. | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **crmTasksPost** +> \Brevo\Client\Model\InlineResponse201 crmTasksPost($body) + +Create a task + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\CRMApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$body = new \Brevo\Client\Model\Body(); // \Brevo\Client\Model\Body | Task name. + +try { + $result = $apiInstance->crmTasksPost($body); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CRMApi->crmTasksPost: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**\Brevo\Client\Model\Body**](../Model/Body.md)| Task name. | + +### Return type + +[**\Brevo\Client\Model\InlineResponse201**](../Model/InlineResponse201.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **crmTasktypesGet** +> \Brevo\Client\Model\TaskTypes crmTasktypesGet() + +Get all task types + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\CRMApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); + +try { + $result = $apiInstance->crmTasktypesGet(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CRMApi->crmTasktypesGet: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**\Brevo\Client\Model\TaskTypes**](../Model/TaskTypes.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + diff --git a/vendor/getbrevo/brevo-php/docs/Api/CompaniesApi.md b/vendor/getbrevo/brevo-php/docs/Api/CompaniesApi.md new file mode 100644 index 0000000..a17f87a --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Api/CompaniesApi.md @@ -0,0 +1,424 @@ +# Brevo\Client\CompaniesApi + +All URIs are relative to *https://api.brevo.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**companiesAttributesGet**](CompaniesApi.md#companiesAttributesGet) | **GET** /companies/attributes | Get company attributes +[**companiesGet**](CompaniesApi.md#companiesGet) | **GET** /companies | Get all companies +[**companiesIdDelete**](CompaniesApi.md#companiesIdDelete) | **DELETE** /companies/{id} | Delete a company +[**companiesIdGet**](CompaniesApi.md#companiesIdGet) | **GET** /companies/{id} | Get a company +[**companiesIdPatch**](CompaniesApi.md#companiesIdPatch) | **PATCH** /companies/{id} | Update a company +[**companiesLinkUnlinkIdPatch**](CompaniesApi.md#companiesLinkUnlinkIdPatch) | **PATCH** /companies/link-unlink/{id} | Link and Unlink company with contacts and deals +[**companiesPost**](CompaniesApi.md#companiesPost) | **POST** /companies | Create a company + + +# **companiesAttributesGet** +> \Brevo\Client\Model\CompanyAttributes companiesAttributesGet() + +Get company attributes + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\CompaniesApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); + +try { + $result = $apiInstance->companiesAttributesGet(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompaniesApi->companiesAttributesGet: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**\Brevo\Client\Model\CompanyAttributes**](../Model/CompanyAttributes.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **companiesGet** +> \Brevo\Client\Model\CompaniesList companiesGet($filters, $linkedContactsIds, $linkedDealsIds, $page, $limit, $sort, $sortBy) + +Get all companies + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\CompaniesApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$filters = "filters_example"; // string | Filter by attrbutes. If you have filter for owner on your side please send it as {\"attributes.owner\":\"5b1a17d914b73d35a76ca0c7\"} +$linkedContactsIds = 789; // int | Filter by linked contacts ids +$linkedDealsIds = "linkedDealsIds_example"; // string | Filter by linked deals ids +$page = 789; // int | Index of the first document of the page +$limit = 50; // int | Number of documents per page +$sort = "sort_example"; // string | Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed +$sortBy = "sortBy_example"; // string | The field used to sort field names. + +try { + $result = $apiInstance->companiesGet($filters, $linkedContactsIds, $linkedDealsIds, $page, $limit, $sort, $sortBy); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompaniesApi->companiesGet: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **filters** | **string**| Filter by attrbutes. If you have filter for owner on your side please send it as {\"attributes.owner\":\"5b1a17d914b73d35a76ca0c7\"} | [optional] + **linkedContactsIds** | **int**| Filter by linked contacts ids | [optional] + **linkedDealsIds** | **string**| Filter by linked deals ids | [optional] + **page** | **int**| Index of the first document of the page | [optional] + **limit** | **int**| Number of documents per page | [optional] [default to 50] + **sort** | **string**| Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed | [optional] + **sortBy** | **string**| The field used to sort field names. | [optional] + +### Return type + +[**\Brevo\Client\Model\CompaniesList**](../Model/CompaniesList.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **companiesIdDelete** +> companiesIdDelete($id) + +Delete a company + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\CompaniesApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = "id_example"; // string | + +try { + $apiInstance->companiesIdDelete($id); +} catch (Exception $e) { + echo 'Exception when calling CompaniesApi->companiesIdDelete: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **companiesIdGet** +> \Brevo\Client\Model\Company companiesIdGet($id) + +Get a company + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\CompaniesApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = "id_example"; // string | + +try { + $result = $apiInstance->companiesIdGet($id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompaniesApi->companiesIdGet: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| | + +### Return type + +[**\Brevo\Client\Model\Company**](../Model/Company.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **companiesIdPatch** +> \Brevo\Client\Model\Company companiesIdPatch($id, $body) + +Update a company + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\CompaniesApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = "id_example"; // string | +$body = new \Brevo\Client\Model\Body3(); // \Brevo\Client\Model\Body3 | Updated company details. + +try { + $result = $apiInstance->companiesIdPatch($id, $body); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompaniesApi->companiesIdPatch: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| | + **body** | [**\Brevo\Client\Model\Body3**](../Model/Body3.md)| Updated company details. | + +### Return type + +[**\Brevo\Client\Model\Company**](../Model/Company.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **companiesLinkUnlinkIdPatch** +> companiesLinkUnlinkIdPatch($id, $body) + +Link and Unlink company with contacts and deals + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\CompaniesApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = "id_example"; // string | +$body = new \Brevo\Client\Model\Body4(); // \Brevo\Client\Model\Body4 | Linked / Unlinked contacts and deals ids. + +try { + $apiInstance->companiesLinkUnlinkIdPatch($id, $body); +} catch (Exception $e) { + echo 'Exception when calling CompaniesApi->companiesLinkUnlinkIdPatch: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| | + **body** | [**\Brevo\Client\Model\Body4**](../Model/Body4.md)| Linked / Unlinked contacts and deals ids. | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **companiesPost** +> \Brevo\Client\Model\InlineResponse2001 companiesPost($body) + +Create a company + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\CompaniesApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$body = new \Brevo\Client\Model\Body2(); // \Brevo\Client\Model\Body2 | Company create data. + +try { + $result = $apiInstance->companiesPost($body); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompaniesApi->companiesPost: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**\Brevo\Client\Model\Body2**](../Model/Body2.md)| Company create data. | + +### Return type + +[**\Brevo\Client\Model\InlineResponse2001**](../Model/InlineResponse2001.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + diff --git a/vendor/getbrevo/brevo-php/docs/Api/ContactsApi.md b/vendor/getbrevo/brevo-php/docs/Api/ContactsApi.md new file mode 100644 index 0000000..ed75ced --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Api/ContactsApi.md @@ -0,0 +1,1751 @@ +# Brevo\Client\ContactsApi + +All URIs are relative to *https://api.brevo.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addContactToList**](ContactsApi.md#addContactToList) | **POST** /contacts/lists/{listId}/contacts/add | Add existing contacts to a list +[**createAttribute**](ContactsApi.md#createAttribute) | **POST** /contacts/attributes/{attributeCategory}/{attributeName} | Create contact attribute +[**createContact**](ContactsApi.md#createContact) | **POST** /contacts | Create a contact +[**createDoiContact**](ContactsApi.md#createDoiContact) | **POST** /contacts/doubleOptinConfirmation | Create Contact via DOI (Double-Opt-In) Flow +[**createFolder**](ContactsApi.md#createFolder) | **POST** /contacts/folders | Create a folder +[**createList**](ContactsApi.md#createList) | **POST** /contacts/lists | Create a list +[**deleteAttribute**](ContactsApi.md#deleteAttribute) | **DELETE** /contacts/attributes/{attributeCategory}/{attributeName} | Delete an attribute +[**deleteContact**](ContactsApi.md#deleteContact) | **DELETE** /contacts/{identifier} | Delete a contact +[**deleteFolder**](ContactsApi.md#deleteFolder) | **DELETE** /contacts/folders/{folderId} | Delete a folder (and all its lists) +[**deleteList**](ContactsApi.md#deleteList) | **DELETE** /contacts/lists/{listId} | Delete a list +[**getAttributes**](ContactsApi.md#getAttributes) | **GET** /contacts/attributes | List all attributes +[**getContactInfo**](ContactsApi.md#getContactInfo) | **GET** /contacts/{identifier} | Get a contact's details +[**getContactStats**](ContactsApi.md#getContactStats) | **GET** /contacts/{identifier}/campaignStats | Get email campaigns' statistics for a contact +[**getContacts**](ContactsApi.md#getContacts) | **GET** /contacts | Get all the contacts +[**getContactsFromList**](ContactsApi.md#getContactsFromList) | **GET** /contacts/lists/{listId}/contacts | Get contacts in a list +[**getFolder**](ContactsApi.md#getFolder) | **GET** /contacts/folders/{folderId} | Returns a folder's details +[**getFolderLists**](ContactsApi.md#getFolderLists) | **GET** /contacts/folders/{folderId}/lists | Get lists in a folder +[**getFolders**](ContactsApi.md#getFolders) | **GET** /contacts/folders | Get all folders +[**getList**](ContactsApi.md#getList) | **GET** /contacts/lists/{listId} | Get a list's details +[**getLists**](ContactsApi.md#getLists) | **GET** /contacts/lists | Get all the lists +[**getSegments**](ContactsApi.md#getSegments) | **GET** /contacts/segments | Get all the Segments +[**importContacts**](ContactsApi.md#importContacts) | **POST** /contacts/import | Import contacts +[**removeContactFromList**](ContactsApi.md#removeContactFromList) | **POST** /contacts/lists/{listId}/contacts/remove | Delete a contact from a list +[**requestContactExport**](ContactsApi.md#requestContactExport) | **POST** /contacts/export | Export contacts +[**updateAttribute**](ContactsApi.md#updateAttribute) | **PUT** /contacts/attributes/{attributeCategory}/{attributeName} | Update contact attribute +[**updateBatchContacts**](ContactsApi.md#updateBatchContacts) | **POST** /contacts/batch | Update multiple contacts +[**updateContact**](ContactsApi.md#updateContact) | **PUT** /contacts/{identifier} | Update a contact +[**updateFolder**](ContactsApi.md#updateFolder) | **PUT** /contacts/folders/{folderId} | Update a folder +[**updateList**](ContactsApi.md#updateList) | **PUT** /contacts/lists/{listId} | Update a list + + +# **addContactToList** +> \Brevo\Client\Model\PostContactInfo addContactToList($listId, $contactEmails) + +Add existing contacts to a list + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ContactsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$listId = 789; // int | Id of the list +$contactEmails = new \Brevo\Client\Model\AddContactToList(); // \Brevo\Client\Model\AddContactToList | Emails addresses OR IDs of the contacts + +try { + $result = $apiInstance->addContactToList($listId, $contactEmails); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ContactsApi->addContactToList: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **listId** | **int**| Id of the list | + **contactEmails** | [**\Brevo\Client\Model\AddContactToList**](../Model/AddContactToList.md)| Emails addresses OR IDs of the contacts | + +### Return type + +[**\Brevo\Client\Model\PostContactInfo**](../Model/PostContactInfo.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **createAttribute** +> createAttribute($attributeCategory, $attributeName, $createAttribute) + +Create contact attribute + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ContactsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$attributeCategory = "attributeCategory_example"; // string | Category of the attribute +$attributeName = "attributeName_example"; // string | Name of the attribute +$createAttribute = new \Brevo\Client\Model\CreateAttribute(); // \Brevo\Client\Model\CreateAttribute | Values to create an attribute + +try { + $apiInstance->createAttribute($attributeCategory, $attributeName, $createAttribute); +} catch (Exception $e) { + echo 'Exception when calling ContactsApi->createAttribute: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **attributeCategory** | **string**| Category of the attribute | + **attributeName** | **string**| Name of the attribute | + **createAttribute** | [**\Brevo\Client\Model\CreateAttribute**](../Model/CreateAttribute.md)| Values to create an attribute | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **createContact** +> \Brevo\Client\Model\CreateUpdateContactModel createContact($createContact) + +Create a contact + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ContactsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$createContact = new \Brevo\Client\Model\CreateContact(); // \Brevo\Client\Model\CreateContact | Values to create a contact + +try { + $result = $apiInstance->createContact($createContact); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ContactsApi->createContact: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createContact** | [**\Brevo\Client\Model\CreateContact**](../Model/CreateContact.md)| Values to create a contact | + +### Return type + +[**\Brevo\Client\Model\CreateUpdateContactModel**](../Model/CreateUpdateContactModel.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **createDoiContact** +> createDoiContact($createDoiContact) + +Create Contact via DOI (Double-Opt-In) Flow + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ContactsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$createDoiContact = new \Brevo\Client\Model\CreateDoiContact(); // \Brevo\Client\Model\CreateDoiContact | Values to create the Double opt-in (DOI) contact + +try { + $apiInstance->createDoiContact($createDoiContact); +} catch (Exception $e) { + echo 'Exception when calling ContactsApi->createDoiContact: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createDoiContact** | [**\Brevo\Client\Model\CreateDoiContact**](../Model/CreateDoiContact.md)| Values to create the Double opt-in (DOI) contact | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **createFolder** +> \Brevo\Client\Model\CreateModel createFolder($createFolder) + +Create a folder + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ContactsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$createFolder = new \Brevo\Client\Model\CreateUpdateFolder(); // \Brevo\Client\Model\CreateUpdateFolder | Name of the folder + +try { + $result = $apiInstance->createFolder($createFolder); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ContactsApi->createFolder: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createFolder** | [**\Brevo\Client\Model\CreateUpdateFolder**](../Model/CreateUpdateFolder.md)| Name of the folder | + +### Return type + +[**\Brevo\Client\Model\CreateModel**](../Model/CreateModel.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **createList** +> \Brevo\Client\Model\CreateModel createList($createList) + +Create a list + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ContactsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$createList = new \Brevo\Client\Model\CreateList(); // \Brevo\Client\Model\CreateList | Values to create a list + +try { + $result = $apiInstance->createList($createList); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ContactsApi->createList: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createList** | [**\Brevo\Client\Model\CreateList**](../Model/CreateList.md)| Values to create a list | + +### Return type + +[**\Brevo\Client\Model\CreateModel**](../Model/CreateModel.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **deleteAttribute** +> deleteAttribute($attributeCategory, $attributeName) + +Delete an attribute + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ContactsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$attributeCategory = "attributeCategory_example"; // string | Category of the attribute +$attributeName = "attributeName_example"; // string | Name of the existing attribute + +try { + $apiInstance->deleteAttribute($attributeCategory, $attributeName); +} catch (Exception $e) { + echo 'Exception when calling ContactsApi->deleteAttribute: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **attributeCategory** | **string**| Category of the attribute | + **attributeName** | **string**| Name of the existing attribute | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **deleteContact** +> deleteContact($identifier) + +Delete a contact + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ContactsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$identifier = "identifier_example"; // string | Email (urlencoded) OR ID of the contact + +try { + $apiInstance->deleteContact($identifier); +} catch (Exception $e) { + echo 'Exception when calling ContactsApi->deleteContact: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **identifier** | **string**| Email (urlencoded) OR ID of the contact | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **deleteFolder** +> deleteFolder($folderId) + +Delete a folder (and all its lists) + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ContactsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$folderId = 789; // int | Id of the folder + +try { + $apiInstance->deleteFolder($folderId); +} catch (Exception $e) { + echo 'Exception when calling ContactsApi->deleteFolder: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **folderId** | **int**| Id of the folder | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **deleteList** +> deleteList($listId) + +Delete a list + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ContactsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$listId = 789; // int | Id of the list + +try { + $apiInstance->deleteList($listId); +} catch (Exception $e) { + echo 'Exception when calling ContactsApi->deleteList: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **listId** | **int**| Id of the list | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getAttributes** +> \Brevo\Client\Model\GetAttributes getAttributes() + +List all attributes + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ContactsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); + +try { + $result = $apiInstance->getAttributes(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ContactsApi->getAttributes: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**\Brevo\Client\Model\GetAttributes**](../Model/GetAttributes.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getContactInfo** +> \Brevo\Client\Model\GetExtendedContactDetails getContactInfo($identifier, $startDate, $endDate) + +Get a contact's details + +Along with the contact details, this endpoint will show the statistics of contact for the recent 90 days by default. To fetch the earlier statistics, please use Get contact campaign stats (https://developers.brevo.com/reference/contacts-7#getcontactstats) endpoint with the appropriate date ranges. + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ContactsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$identifier = "identifier_example"; // string | Email (urlencoded) OR ID of the contact OR its SMS attribute value +$startDate = "startDate_example"; // string | **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate +$endDate = "endDate_example"; // string | **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. + +try { + $result = $apiInstance->getContactInfo($identifier, $startDate, $endDate); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ContactsApi->getContactInfo: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **identifier** | **string**| Email (urlencoded) OR ID of the contact OR its SMS attribute value | + **startDate** | **string**| **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate | [optional] + **endDate** | **string**| **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. | [optional] + +### Return type + +[**\Brevo\Client\Model\GetExtendedContactDetails**](../Model/GetExtendedContactDetails.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getContactStats** +> \Brevo\Client\Model\GetContactCampaignStats getContactStats($identifier, $startDate, $endDate) + +Get email campaigns' statistics for a contact + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ContactsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$identifier = "identifier_example"; // string | Email (urlencoded) OR ID of the contact +$startDate = "startDate_example"; // string | Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate +$endDate = "endDate_example"; // string | Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Maximum difference between startDate and endDate should not be greater than 90 days + +try { + $result = $apiInstance->getContactStats($identifier, $startDate, $endDate); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ContactsApi->getContactStats: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **identifier** | **string**| Email (urlencoded) OR ID of the contact | + **startDate** | **string**| Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate | [optional] + **endDate** | **string**| Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Maximum difference between startDate and endDate should not be greater than 90 days | [optional] + +### Return type + +[**\Brevo\Client\Model\GetContactCampaignStats**](../Model/GetContactCampaignStats.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getContacts** +> \Brevo\Client\Model\GetContacts getContacts($limit, $offset, $modifiedSince, $createdSince, $sort, $segmentId, $listIds) + +Get all the contacts + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ContactsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$limit = 50; // int | Number of documents per page +$offset = 0; // int | Index of the first document of the page +$modifiedSince = "modifiedSince_example"; // string | Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. +$createdSince = "createdSince_example"; // string | Filter (urlencoded) the contacts created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. +$sort = "desc"; // string | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed +$segmentId = 789; // int | Id of the segment. **Either listIds or segmentId can be passed.** +$listIds = array(56); // int[] | Ids of the list. **Either listIds or segmentId can be passed.** + +try { + $result = $apiInstance->getContacts($limit, $offset, $modifiedSince, $createdSince, $sort, $segmentId, $listIds); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ContactsApi->getContacts: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| Number of documents per page | [optional] [default to 50] + **offset** | **int**| Index of the first document of the page | [optional] [default to 0] + **modifiedSince** | **string**| Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. | [optional] + **createdSince** | **string**| Filter (urlencoded) the contacts created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. | [optional] + **sort** | **string**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [optional] [default to desc] + **segmentId** | **int**| Id of the segment. **Either listIds or segmentId can be passed.** | [optional] + **listIds** | [**int[]**](../Model/int.md)| Ids of the list. **Either listIds or segmentId can be passed.** | [optional] + +### Return type + +[**\Brevo\Client\Model\GetContacts**](../Model/GetContacts.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getContactsFromList** +> \Brevo\Client\Model\GetContacts getContactsFromList($listId, $modifiedSince, $limit, $offset, $sort) + +Get contacts in a list + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ContactsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$listId = 789; // int | Id of the list +$modifiedSince = "modifiedSince_example"; // string | Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. +$limit = 50; // int | Number of documents per page +$offset = 0; // int | Index of the first document of the page +$sort = "desc"; // string | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + +try { + $result = $apiInstance->getContactsFromList($listId, $modifiedSince, $limit, $offset, $sort); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ContactsApi->getContactsFromList: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **listId** | **int**| Id of the list | + **modifiedSince** | **string**| Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. | [optional] + **limit** | **int**| Number of documents per page | [optional] [default to 50] + **offset** | **int**| Index of the first document of the page | [optional] [default to 0] + **sort** | **string**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [optional] [default to desc] + +### Return type + +[**\Brevo\Client\Model\GetContacts**](../Model/GetContacts.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getFolder** +> \Brevo\Client\Model\GetFolder getFolder($folderId) + +Returns a folder's details + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ContactsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$folderId = 789; // int | id of the folder + +try { + $result = $apiInstance->getFolder($folderId); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ContactsApi->getFolder: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **folderId** | **int**| id of the folder | + +### Return type + +[**\Brevo\Client\Model\GetFolder**](../Model/GetFolder.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getFolderLists** +> \Brevo\Client\Model\GetFolderLists getFolderLists($folderId, $limit, $offset, $sort) + +Get lists in a folder + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ContactsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$folderId = 789; // int | Id of the folder +$limit = 10; // int | Number of documents per page +$offset = 0; // int | Index of the first document of the page +$sort = "desc"; // string | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + +try { + $result = $apiInstance->getFolderLists($folderId, $limit, $offset, $sort); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ContactsApi->getFolderLists: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **folderId** | **int**| Id of the folder | + **limit** | **int**| Number of documents per page | [optional] [default to 10] + **offset** | **int**| Index of the first document of the page | [optional] [default to 0] + **sort** | **string**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [optional] [default to desc] + +### Return type + +[**\Brevo\Client\Model\GetFolderLists**](../Model/GetFolderLists.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getFolders** +> \Brevo\Client\Model\GetFolders getFolders($limit, $offset, $sort) + +Get all folders + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ContactsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$limit = 10; // int | Number of documents per page +$offset = 0; // int | Index of the first document of the page +$sort = "desc"; // string | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + +try { + $result = $apiInstance->getFolders($limit, $offset, $sort); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ContactsApi->getFolders: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| Number of documents per page | [default to 10] + **offset** | **int**| Index of the first document of the page | [default to 0] + **sort** | **string**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [optional] [default to desc] + +### Return type + +[**\Brevo\Client\Model\GetFolders**](../Model/GetFolders.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getList** +> \Brevo\Client\Model\GetExtendedList getList($listId, $startDate, $endDate) + +Get a list's details + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ContactsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$listId = 789; // int | Id of the list +$startDate = "startDate_example"; // string | Mandatory if endDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id.Prefer to pass your timezone in date-time format for accurate result +$endDate = "endDate_example"; // string | Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id.Prefer to pass your timezone in date-time format for accurate result + +try { + $result = $apiInstance->getList($listId, $startDate, $endDate); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ContactsApi->getList: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **listId** | **int**| Id of the list | + **startDate** | **string**| Mandatory if endDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id.Prefer to pass your timezone in date-time format for accurate result | [optional] + **endDate** | **string**| Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id.Prefer to pass your timezone in date-time format for accurate result | [optional] + +### Return type + +[**\Brevo\Client\Model\GetExtendedList**](../Model/GetExtendedList.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getLists** +> \Brevo\Client\Model\GetLists getLists($limit, $offset, $sort) + +Get all the lists + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ContactsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$limit = 10; // int | Number of documents per page +$offset = 0; // int | Index of the first document of the page +$sort = "desc"; // string | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + +try { + $result = $apiInstance->getLists($limit, $offset, $sort); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ContactsApi->getLists: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| Number of documents per page | [optional] [default to 10] + **offset** | **int**| Index of the first document of the page | [optional] [default to 0] + **sort** | **string**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [optional] [default to desc] + +### Return type + +[**\Brevo\Client\Model\GetLists**](../Model/GetLists.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getSegments** +> \Brevo\Client\Model\GetSegments getSegments($limit, $offset, $sort) + +Get all the Segments + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ContactsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$limit = 10; // int | Number of documents per page +$offset = 0; // int | Index of the first document of the page +$sort = "desc"; // string | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + +try { + $result = $apiInstance->getSegments($limit, $offset, $sort); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ContactsApi->getSegments: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| Number of documents per page | [default to 10] + **offset** | **int**| Index of the first document of the page | [default to 0] + **sort** | **string**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [optional] [default to desc] + +### Return type + +[**\Brevo\Client\Model\GetSegments**](../Model/GetSegments.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **importContacts** +> \Brevo\Client\Model\CreatedProcessId importContacts($requestContactImport) + +Import contacts + +It returns the background process ID which on completion calls the notify URL that you have set in the input. + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ContactsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$requestContactImport = new \Brevo\Client\Model\RequestContactImport(); // \Brevo\Client\Model\RequestContactImport | Values to import contacts in Brevo. To know more about the expected format, please have a look at ``https://help.brevo.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns`` + +try { + $result = $apiInstance->importContacts($requestContactImport); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ContactsApi->importContacts: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **requestContactImport** | [**\Brevo\Client\Model\RequestContactImport**](../Model/RequestContactImport.md)| Values to import contacts in Brevo. To know more about the expected format, please have a look at ``https://help.brevo.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns`` | + +### Return type + +[**\Brevo\Client\Model\CreatedProcessId**](../Model/CreatedProcessId.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **removeContactFromList** +> \Brevo\Client\Model\PostContactInfo removeContactFromList($listId, $contactEmails) + +Delete a contact from a list + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ContactsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$listId = 789; // int | Id of the list +$contactEmails = new \Brevo\Client\Model\RemoveContactFromList(); // \Brevo\Client\Model\RemoveContactFromList | Emails addresses OR IDs of the contacts + +try { + $result = $apiInstance->removeContactFromList($listId, $contactEmails); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ContactsApi->removeContactFromList: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **listId** | **int**| Id of the list | + **contactEmails** | [**\Brevo\Client\Model\RemoveContactFromList**](../Model/RemoveContactFromList.md)| Emails addresses OR IDs of the contacts | + +### Return type + +[**\Brevo\Client\Model\PostContactInfo**](../Model/PostContactInfo.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **requestContactExport** +> \Brevo\Client\Model\CreatedProcessId requestContactExport($requestContactExport) + +Export contacts + +It returns the background process ID which on completion calls the notify URL that you have set in the input. File will be available in csv. + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ContactsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$requestContactExport = new \Brevo\Client\Model\RequestContactExport(); // \Brevo\Client\Model\RequestContactExport | Values to request a contact export + +try { + $result = $apiInstance->requestContactExport($requestContactExport); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ContactsApi->requestContactExport: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **requestContactExport** | [**\Brevo\Client\Model\RequestContactExport**](../Model/RequestContactExport.md)| Values to request a contact export | + +### Return type + +[**\Brevo\Client\Model\CreatedProcessId**](../Model/CreatedProcessId.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **updateAttribute** +> updateAttribute($attributeCategory, $attributeName, $updateAttribute) + +Update contact attribute + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ContactsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$attributeCategory = "attributeCategory_example"; // string | Category of the attribute +$attributeName = "attributeName_example"; // string | Name of the existing attribute +$updateAttribute = new \Brevo\Client\Model\UpdateAttribute(); // \Brevo\Client\Model\UpdateAttribute | Values to update an attribute + +try { + $apiInstance->updateAttribute($attributeCategory, $attributeName, $updateAttribute); +} catch (Exception $e) { + echo 'Exception when calling ContactsApi->updateAttribute: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **attributeCategory** | **string**| Category of the attribute | + **attributeName** | **string**| Name of the existing attribute | + **updateAttribute** | [**\Brevo\Client\Model\UpdateAttribute**](../Model/UpdateAttribute.md)| Values to update an attribute | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **updateBatchContacts** +> updateBatchContacts($updateBatchContacts) + +Update multiple contacts + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ContactsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$updateBatchContacts = new \Brevo\Client\Model\UpdateBatchContacts(); // \Brevo\Client\Model\UpdateBatchContacts | Values to update multiple contacts + +try { + $apiInstance->updateBatchContacts($updateBatchContacts); +} catch (Exception $e) { + echo 'Exception when calling ContactsApi->updateBatchContacts: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateBatchContacts** | [**\Brevo\Client\Model\UpdateBatchContacts**](../Model/UpdateBatchContacts.md)| Values to update multiple contacts | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **updateContact** +> updateContact($identifier, $updateContact) + +Update a contact + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ContactsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$identifier = "identifier_example"; // string | Email (urlencoded) OR ID of the contact +$updateContact = new \Brevo\Client\Model\UpdateContact(); // \Brevo\Client\Model\UpdateContact | Values to update a contact + +try { + $apiInstance->updateContact($identifier, $updateContact); +} catch (Exception $e) { + echo 'Exception when calling ContactsApi->updateContact: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **identifier** | **string**| Email (urlencoded) OR ID of the contact | + **updateContact** | [**\Brevo\Client\Model\UpdateContact**](../Model/UpdateContact.md)| Values to update a contact | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **updateFolder** +> updateFolder($folderId, $updateFolder) + +Update a folder + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ContactsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$folderId = 789; // int | Id of the folder +$updateFolder = new \Brevo\Client\Model\CreateUpdateFolder(); // \Brevo\Client\Model\CreateUpdateFolder | Name of the folder + +try { + $apiInstance->updateFolder($folderId, $updateFolder); +} catch (Exception $e) { + echo 'Exception when calling ContactsApi->updateFolder: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **folderId** | **int**| Id of the folder | + **updateFolder** | [**\Brevo\Client\Model\CreateUpdateFolder**](../Model/CreateUpdateFolder.md)| Name of the folder | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **updateList** +> updateList($listId, $updateList) + +Update a list + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ContactsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$listId = 789; // int | Id of the list +$updateList = new \Brevo\Client\Model\UpdateList(); // \Brevo\Client\Model\UpdateList | Values to update a list + +try { + $apiInstance->updateList($listId, $updateList); +} catch (Exception $e) { + echo 'Exception when calling ContactsApi->updateList: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **listId** | **int**| Id of the list | + **updateList** | [**\Brevo\Client\Model\UpdateList**](../Model/UpdateList.md)| Values to update a list | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + diff --git a/vendor/getbrevo/brevo-php/docs/Api/ConversationsApi.md b/vendor/getbrevo/brevo-php/docs/Api/ConversationsApi.md new file mode 100644 index 0000000..429514d --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Api/ConversationsApi.md @@ -0,0 +1,539 @@ +# Brevo\Client\ConversationsApi + +All URIs are relative to *https://api.brevo.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**conversationsAgentOnlinePingPost**](ConversationsApi.md#conversationsAgentOnlinePingPost) | **POST** /conversations/agentOnlinePing | Sets agent’s status to online for 2-3 minutes +[**conversationsMessagesIdDelete**](ConversationsApi.md#conversationsMessagesIdDelete) | **DELETE** /conversations/messages/{id} | Delete a message sent by an agent +[**conversationsMessagesIdGet**](ConversationsApi.md#conversationsMessagesIdGet) | **GET** /conversations/messages/{id} | Get a message +[**conversationsMessagesIdPut**](ConversationsApi.md#conversationsMessagesIdPut) | **PUT** /conversations/messages/{id} | Update a message sent by an agent +[**conversationsMessagesPost**](ConversationsApi.md#conversationsMessagesPost) | **POST** /conversations/messages | Send a message as an agent +[**conversationsPushedMessagesIdDelete**](ConversationsApi.md#conversationsPushedMessagesIdDelete) | **DELETE** /conversations/pushedMessages/{id} | Delete an automated message +[**conversationsPushedMessagesIdGet**](ConversationsApi.md#conversationsPushedMessagesIdGet) | **GET** /conversations/pushedMessages/{id} | Get an automated message +[**conversationsPushedMessagesIdPut**](ConversationsApi.md#conversationsPushedMessagesIdPut) | **PUT** /conversations/pushedMessages/{id} | Update an automated message +[**conversationsPushedMessagesPost**](ConversationsApi.md#conversationsPushedMessagesPost) | **POST** /conversations/pushedMessages | Send an automated message to a visitor + + +# **conversationsAgentOnlinePingPost** +> conversationsAgentOnlinePingPost($body) + +Sets agent’s status to online for 2-3 minutes + +We recommend pinging this endpoint every minute for as long as the agent has to be considered online. + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ConversationsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$body = new \Brevo\Client\Model\Body14(); // \Brevo\Client\Model\Body14 | Agent fields. + +try { + $apiInstance->conversationsAgentOnlinePingPost($body); +} catch (Exception $e) { + echo 'Exception when calling ConversationsApi->conversationsAgentOnlinePingPost: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**\Brevo\Client\Model\Body14**](../Model/Body14.md)| Agent fields. | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **conversationsMessagesIdDelete** +> conversationsMessagesIdDelete($id) + +Delete a message sent by an agent + +Only agents’ messages can be deleted. + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ConversationsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = "id_example"; // string | ID of the message + +try { + $apiInstance->conversationsMessagesIdDelete($id); +} catch (Exception $e) { + echo 'Exception when calling ConversationsApi->conversationsMessagesIdDelete: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| ID of the message | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **conversationsMessagesIdGet** +> \Brevo\Client\Model\ConversationsMessage conversationsMessagesIdGet($id) + +Get a message + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ConversationsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = "id_example"; // string | ID of the message + +try { + $result = $apiInstance->conversationsMessagesIdGet($id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ConversationsApi->conversationsMessagesIdGet: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| ID of the message | + +### Return type + +[**\Brevo\Client\Model\ConversationsMessage**](../Model/ConversationsMessage.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **conversationsMessagesIdPut** +> \Brevo\Client\Model\ConversationsMessage conversationsMessagesIdPut($id, $body) + +Update a message sent by an agent + +Only agents’ messages can be edited. + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ConversationsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = "id_example"; // string | ID of the message +$body = new \Brevo\Client\Model\Body11(); // \Brevo\Client\Model\Body11 | + +try { + $result = $apiInstance->conversationsMessagesIdPut($id, $body); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ConversationsApi->conversationsMessagesIdPut: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| ID of the message | + **body** | [**\Brevo\Client\Model\Body11**](../Model/Body11.md)| | [optional] + +### Return type + +[**\Brevo\Client\Model\ConversationsMessage**](../Model/ConversationsMessage.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **conversationsMessagesPost** +> \Brevo\Client\Model\ConversationsMessage conversationsMessagesPost($body) + +Send a message as an agent + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ConversationsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$body = new \Brevo\Client\Model\Body10(); // \Brevo\Client\Model\Body10 | Message fields. + +try { + $result = $apiInstance->conversationsMessagesPost($body); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ConversationsApi->conversationsMessagesPost: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**\Brevo\Client\Model\Body10**](../Model/Body10.md)| Message fields. | + +### Return type + +[**\Brevo\Client\Model\ConversationsMessage**](../Model/ConversationsMessage.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **conversationsPushedMessagesIdDelete** +> conversationsPushedMessagesIdDelete($id) + +Delete an automated message + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ConversationsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = "id_example"; // string | ID of the message + +try { + $apiInstance->conversationsPushedMessagesIdDelete($id); +} catch (Exception $e) { + echo 'Exception when calling ConversationsApi->conversationsPushedMessagesIdDelete: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| ID of the message | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **conversationsPushedMessagesIdGet** +> \Brevo\Client\Model\ConversationsMessage conversationsPushedMessagesIdGet($id) + +Get an automated message + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ConversationsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = "id_example"; // string | ID of the message sent previously + +try { + $result = $apiInstance->conversationsPushedMessagesIdGet($id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ConversationsApi->conversationsPushedMessagesIdGet: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| ID of the message sent previously | + +### Return type + +[**\Brevo\Client\Model\ConversationsMessage**](../Model/ConversationsMessage.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **conversationsPushedMessagesIdPut** +> \Brevo\Client\Model\ConversationsMessage conversationsPushedMessagesIdPut($id, $body) + +Update an automated message + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ConversationsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = "id_example"; // string | ID of the message +$body = new \Brevo\Client\Model\Body13(); // \Brevo\Client\Model\Body13 | + +try { + $result = $apiInstance->conversationsPushedMessagesIdPut($id, $body); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ConversationsApi->conversationsPushedMessagesIdPut: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| ID of the message | + **body** | [**\Brevo\Client\Model\Body13**](../Model/Body13.md)| | + +### Return type + +[**\Brevo\Client\Model\ConversationsMessage**](../Model/ConversationsMessage.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **conversationsPushedMessagesPost** +> \Brevo\Client\Model\ConversationsMessage conversationsPushedMessagesPost($body) + +Send an automated message to a visitor + +Example of automated messages: order status, announce new features in your web app, etc. + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ConversationsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$body = new \Brevo\Client\Model\Body12(); // \Brevo\Client\Model\Body12 | + +try { + $result = $apiInstance->conversationsPushedMessagesPost($body); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ConversationsApi->conversationsPushedMessagesPost: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**\Brevo\Client\Model\Body12**](../Model/Body12.md)| | + +### Return type + +[**\Brevo\Client\Model\ConversationsMessage**](../Model/ConversationsMessage.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + diff --git a/vendor/getbrevo/brevo-php/docs/Api/CouponsApi.md b/vendor/getbrevo/brevo-php/docs/Api/CouponsApi.md new file mode 100644 index 0000000..e8acc32 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Api/CouponsApi.md @@ -0,0 +1,303 @@ +# Brevo\Client\CouponsApi + +All URIs are relative to *https://api.brevo.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createCouponCollection**](CouponsApi.md#createCouponCollection) | **POST** /couponCollections | Create а coupon collection +[**createCoupons**](CouponsApi.md#createCoupons) | **POST** /coupons | Create coupons for a coupon collection +[**getCouponCollection**](CouponsApi.md#getCouponCollection) | **GET** /couponCollections/{id} | Get a coupon collection by id +[**getCouponCollections**](CouponsApi.md#getCouponCollections) | **GET** /couponCollections | Get all your coupon collections +[**updateCouponCollection**](CouponsApi.md#updateCouponCollection) | **PATCH** /couponCollections/{id} | Update a coupon collection by id + + +# **createCouponCollection** +> \Brevo\Client\Model\InlineResponse2013 createCouponCollection($createCouponCollection) + +Create а coupon collection + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\CouponsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$createCouponCollection = new \Brevo\Client\Model\CreateCouponCollection(); // \Brevo\Client\Model\CreateCouponCollection | Values to create a coupon collection + +try { + $result = $apiInstance->createCouponCollection($createCouponCollection); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CouponsApi->createCouponCollection: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createCouponCollection** | [**\Brevo\Client\Model\CreateCouponCollection**](../Model/CreateCouponCollection.md)| Values to create a coupon collection | + +### Return type + +[**\Brevo\Client\Model\InlineResponse2013**](../Model/InlineResponse2013.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **createCoupons** +> createCoupons($createCoupons) + +Create coupons for a coupon collection + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\CouponsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$createCoupons = new \Brevo\Client\Model\CreateCoupons(); // \Brevo\Client\Model\CreateCoupons | Values to create coupons + +try { + $apiInstance->createCoupons($createCoupons); +} catch (Exception $e) { + echo 'Exception when calling CouponsApi->createCoupons: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createCoupons** | [**\Brevo\Client\Model\CreateCoupons**](../Model/CreateCoupons.md)| Values to create coupons | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getCouponCollection** +> \Brevo\Client\Model\GetCouponCollection getCouponCollection($id) + +Get a coupon collection by id + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\CouponsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = "id_example"; // string | Id of the collection to return + +try { + $result = $apiInstance->getCouponCollection($id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CouponsApi->getCouponCollection: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| Id of the collection to return | + +### Return type + +[**\Brevo\Client\Model\GetCouponCollection**](../Model/GetCouponCollection.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getCouponCollections** +> \Brevo\Client\Model\GetCouponCollection getCouponCollections($limit, $offset, $sort) + +Get all your coupon collections + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\CouponsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$limit = 50; // int | Number of documents returned per page +$offset = 0; // int | Index of the first document on the page +$sort = "desc"; // string | Sort the results by creation time in ascending/descending order + +try { + $result = $apiInstance->getCouponCollections($limit, $offset, $sort); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CouponsApi->getCouponCollections: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| Number of documents returned per page | [optional] [default to 50] + **offset** | **int**| Index of the first document on the page | [optional] [default to 0] + **sort** | **string**| Sort the results by creation time in ascending/descending order | [optional] [default to desc] + +### Return type + +[**\Brevo\Client\Model\GetCouponCollection**](../Model/GetCouponCollection.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **updateCouponCollection** +> \Brevo\Client\Model\InlineResponse2002 updateCouponCollection($id, $updateCouponCollection) + +Update a coupon collection by id + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\CouponsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = "id_example"; // string | Id of the collection to update +$updateCouponCollection = new \Brevo\Client\Model\UpdateCouponCollection(); // \Brevo\Client\Model\UpdateCouponCollection | Values to update the coupon collection + +try { + $result = $apiInstance->updateCouponCollection($id, $updateCouponCollection); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CouponsApi->updateCouponCollection: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| Id of the collection to update | + **updateCouponCollection** | [**\Brevo\Client\Model\UpdateCouponCollection**](../Model/UpdateCouponCollection.md)| Values to update the coupon collection | + +### Return type + +[**\Brevo\Client\Model\InlineResponse2002**](../Model/InlineResponse2002.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + diff --git a/vendor/getbrevo/brevo-php/docs/Api/DealsApi.md b/vendor/getbrevo/brevo-php/docs/Api/DealsApi.md new file mode 100644 index 0000000..27b1a9e --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Api/DealsApi.md @@ -0,0 +1,591 @@ +# Brevo\Client\DealsApi + +All URIs are relative to *https://api.brevo.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**crmAttributesDealsGet**](DealsApi.md#crmAttributesDealsGet) | **GET** /crm/attributes/deals | Get deal attributes +[**crmDealsGet**](DealsApi.md#crmDealsGet) | **GET** /crm/deals | Get all deals +[**crmDealsIdDelete**](DealsApi.md#crmDealsIdDelete) | **DELETE** /crm/deals/{id} | Delete a deal +[**crmDealsIdGet**](DealsApi.md#crmDealsIdGet) | **GET** /crm/deals/{id} | Get a deal +[**crmDealsIdPatch**](DealsApi.md#crmDealsIdPatch) | **PATCH** /crm/deals/{id} | Update a deal +[**crmDealsLinkUnlinkIdPatch**](DealsApi.md#crmDealsLinkUnlinkIdPatch) | **PATCH** /crm/deals/link-unlink/{id} | Link and Unlink a deal with contacts and companies +[**crmDealsPost**](DealsApi.md#crmDealsPost) | **POST** /crm/deals | Create a deal +[**crmPipelineDetailsAllGet**](DealsApi.md#crmPipelineDetailsAllGet) | **GET** /crm/pipeline/details/all | Get all pipelines +[**crmPipelineDetailsGet**](DealsApi.md#crmPipelineDetailsGet) | **GET** /crm/pipeline/details | Get pipeline stages +[**crmPipelineDetailsPipelineIDGet**](DealsApi.md#crmPipelineDetailsPipelineIDGet) | **GET** /crm/pipeline/details/{pipelineID} | Get a pipeline + + +# **crmAttributesDealsGet** +> \Brevo\Client\Model\DealAttributes crmAttributesDealsGet() + +Get deal attributes + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\DealsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); + +try { + $result = $apiInstance->crmAttributesDealsGet(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling DealsApi->crmAttributesDealsGet: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**\Brevo\Client\Model\DealAttributes**](../Model/DealAttributes.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **crmDealsGet** +> \Brevo\Client\Model\DealsList crmDealsGet($filtersAttributesDealName, $filtersLinkedCompaniesIds, $filtersLinkedContactsIds, $offset, $limit, $sort, $sortBy) + +Get all deals + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\DealsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$filtersAttributesDealName = "filtersAttributesDealName_example"; // string | Filter by attributes. If you have filter for owner on your side please send it as `filters[attributes.deal_owner]`.\" +$filtersLinkedCompaniesIds = "filtersLinkedCompaniesIds_example"; // string | Filter by linked companies ids +$filtersLinkedContactsIds = "filtersLinkedContactsIds_example"; // string | Filter by linked companies ids +$offset = 789; // int | Index of the first document of the page +$limit = 50; // int | Number of documents per page +$sort = "sort_example"; // string | Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed +$sortBy = "sortBy_example"; // string | The field used to sort field names. + +try { + $result = $apiInstance->crmDealsGet($filtersAttributesDealName, $filtersLinkedCompaniesIds, $filtersLinkedContactsIds, $offset, $limit, $sort, $sortBy); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling DealsApi->crmDealsGet: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **filtersAttributesDealName** | **string**| Filter by attributes. If you have filter for owner on your side please send it as `filters[attributes.deal_owner]`.\" | [optional] + **filtersLinkedCompaniesIds** | **string**| Filter by linked companies ids | [optional] + **filtersLinkedContactsIds** | **string**| Filter by linked companies ids | [optional] + **offset** | **int**| Index of the first document of the page | [optional] + **limit** | **int**| Number of documents per page | [optional] [default to 50] + **sort** | **string**| Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed | [optional] + **sortBy** | **string**| The field used to sort field names. | [optional] + +### Return type + +[**\Brevo\Client\Model\DealsList**](../Model/DealsList.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **crmDealsIdDelete** +> crmDealsIdDelete($id) + +Delete a deal + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\DealsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = "id_example"; // string | + +try { + $apiInstance->crmDealsIdDelete($id); +} catch (Exception $e) { + echo 'Exception when calling DealsApi->crmDealsIdDelete: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **crmDealsIdGet** +> \Brevo\Client\Model\Deal crmDealsIdGet($id) + +Get a deal + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\DealsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = "id_example"; // string | + +try { + $result = $apiInstance->crmDealsIdGet($id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling DealsApi->crmDealsIdGet: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| | + +### Return type + +[**\Brevo\Client\Model\Deal**](../Model/Deal.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **crmDealsIdPatch** +> crmDealsIdPatch($id, $body) + +Update a deal + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\DealsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = "id_example"; // string | +$body = new \Brevo\Client\Model\Body6(); // \Brevo\Client\Model\Body6 | Updated deal details. + +try { + $apiInstance->crmDealsIdPatch($id, $body); +} catch (Exception $e) { + echo 'Exception when calling DealsApi->crmDealsIdPatch: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| | + **body** | [**\Brevo\Client\Model\Body6**](../Model/Body6.md)| Updated deal details. | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **crmDealsLinkUnlinkIdPatch** +> crmDealsLinkUnlinkIdPatch($id, $body) + +Link and Unlink a deal with contacts and companies + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\DealsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = "id_example"; // string | +$body = new \Brevo\Client\Model\Body7(); // \Brevo\Client\Model\Body7 | Linked / Unlinked contacts and companies ids. + +try { + $apiInstance->crmDealsLinkUnlinkIdPatch($id, $body); +} catch (Exception $e) { + echo 'Exception when calling DealsApi->crmDealsLinkUnlinkIdPatch: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| | + **body** | [**\Brevo\Client\Model\Body7**](../Model/Body7.md)| Linked / Unlinked contacts and companies ids. | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **crmDealsPost** +> \Brevo\Client\Model\InlineResponse2011 crmDealsPost($body) + +Create a deal + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\DealsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$body = new \Brevo\Client\Model\Body5(); // \Brevo\Client\Model\Body5 | Deal create data. + +try { + $result = $apiInstance->crmDealsPost($body); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling DealsApi->crmDealsPost: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**\Brevo\Client\Model\Body5**](../Model/Body5.md)| Deal create data. | + +### Return type + +[**\Brevo\Client\Model\InlineResponse2011**](../Model/InlineResponse2011.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **crmPipelineDetailsAllGet** +> \Brevo\Client\Model\Pipelines crmPipelineDetailsAllGet() + +Get all pipelines + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\DealsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); + +try { + $result = $apiInstance->crmPipelineDetailsAllGet(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling DealsApi->crmPipelineDetailsAllGet: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**\Brevo\Client\Model\Pipelines**](../Model/Pipelines.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **crmPipelineDetailsGet** +> \Brevo\Client\Model\Pipeline crmPipelineDetailsGet() + +Get pipeline stages + +This endpoint is deprecated. Prefer /crm/pipeline/details/{pipelineID} instead. + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\DealsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); + +try { + $result = $apiInstance->crmPipelineDetailsGet(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling DealsApi->crmPipelineDetailsGet: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**\Brevo\Client\Model\Pipeline**](../Model/Pipeline.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **crmPipelineDetailsPipelineIDGet** +> \Brevo\Client\Model\Pipelines crmPipelineDetailsPipelineIDGet($pipelineID) + +Get a pipeline + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\DealsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$pipelineID = "pipelineID_example"; // string | + +try { + $result = $apiInstance->crmPipelineDetailsPipelineIDGet($pipelineID); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling DealsApi->crmPipelineDetailsPipelineIDGet: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pipelineID** | **string**| | + +### Return type + +[**\Brevo\Client\Model\Pipelines**](../Model/Pipelines.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + diff --git a/vendor/getbrevo/brevo-php/docs/Api/DomainsApi.md b/vendor/getbrevo/brevo-php/docs/Api/DomainsApi.md new file mode 100644 index 0000000..29d9a47 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Api/DomainsApi.md @@ -0,0 +1,293 @@ +# Brevo\Client\DomainsApi + +All URIs are relative to *https://api.brevo.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**authenticateDomain**](DomainsApi.md#authenticateDomain) | **PUT** /senders/domains/{domainName}/authenticate | Authenticate a domain +[**createDomain**](DomainsApi.md#createDomain) | **POST** /senders/domains | Create a new domain +[**deleteDomain**](DomainsApi.md#deleteDomain) | **DELETE** /senders/domains/{domainName} | Delete a domain +[**getDomainConfiguration**](DomainsApi.md#getDomainConfiguration) | **GET** /senders/domains/{domainName} | Validate domain configuration +[**getDomains**](DomainsApi.md#getDomains) | **GET** /senders/domains | Get the list of all your domains + + +# **authenticateDomain** +> \Brevo\Client\Model\AuthenticateDomainModel authenticateDomain($domainName) + +Authenticate a domain + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\DomainsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$domainName = "domainName_example"; // string | Domain name + +try { + $result = $apiInstance->authenticateDomain($domainName); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling DomainsApi->authenticateDomain: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **domainName** | **string**| Domain name | + +### Return type + +[**\Brevo\Client\Model\AuthenticateDomainModel**](../Model/AuthenticateDomainModel.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **createDomain** +> \Brevo\Client\Model\CreateDomainModel createDomain($domainName) + +Create a new domain + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\DomainsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$domainName = new \Brevo\Client\Model\CreateDomain(); // \Brevo\Client\Model\CreateDomain | domain's name + +try { + $result = $apiInstance->createDomain($domainName); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling DomainsApi->createDomain: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **domainName** | [**\Brevo\Client\Model\CreateDomain**](../Model/CreateDomain.md)| domain's name | [optional] + +### Return type + +[**\Brevo\Client\Model\CreateDomainModel**](../Model/CreateDomainModel.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **deleteDomain** +> deleteDomain($domainName) + +Delete a domain + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\DomainsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$domainName = "domainName_example"; // string | Domain name + +try { + $apiInstance->deleteDomain($domainName); +} catch (Exception $e) { + echo 'Exception when calling DomainsApi->deleteDomain: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **domainName** | **string**| Domain name | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getDomainConfiguration** +> \Brevo\Client\Model\GetDomainConfigurationModel getDomainConfiguration($domainName) + +Validate domain configuration + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\DomainsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$domainName = "domainName_example"; // string | Domain name + +try { + $result = $apiInstance->getDomainConfiguration($domainName); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling DomainsApi->getDomainConfiguration: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **domainName** | **string**| Domain name | + +### Return type + +[**\Brevo\Client\Model\GetDomainConfigurationModel**](../Model/GetDomainConfigurationModel.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getDomains** +> \Brevo\Client\Model\GetDomainsList getDomains() + +Get the list of all your domains + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\DomainsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); + +try { + $result = $apiInstance->getDomains(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling DomainsApi->getDomains: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**\Brevo\Client\Model\GetDomainsList**](../Model/GetDomainsList.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + diff --git a/vendor/getbrevo/brevo-php/docs/Api/EcommerceApi.md b/vendor/getbrevo/brevo-php/docs/Api/EcommerceApi.md new file mode 100644 index 0000000..caf3e5a --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Api/EcommerceApi.md @@ -0,0 +1,751 @@ +# Brevo\Client\EcommerceApi + +All URIs are relative to *https://api.brevo.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createBatchOrder**](EcommerceApi.md#createBatchOrder) | **POST** /orders/status/batch | Create orders in batch +[**createOrder**](EcommerceApi.md#createOrder) | **POST** /orders/status | Managing the status of the order +[**createUpdateBatchCategory**](EcommerceApi.md#createUpdateBatchCategory) | **POST** /categories/batch | Create categories in batch +[**createUpdateBatchProducts**](EcommerceApi.md#createUpdateBatchProducts) | **POST** /products/batch | Create products in batch +[**createUpdateCategory**](EcommerceApi.md#createUpdateCategory) | **POST** /categories | Create/Update a category +[**createUpdateProduct**](EcommerceApi.md#createUpdateProduct) | **POST** /products | Create/Update a product +[**ecommerceActivatePost**](EcommerceApi.md#ecommerceActivatePost) | **POST** /ecommerce/activate | Activate the eCommerce app +[**getCategories**](EcommerceApi.md#getCategories) | **GET** /categories | Return all your categories +[**getCategoryInfo**](EcommerceApi.md#getCategoryInfo) | **GET** /categories/{id} | Get a category details +[**getOrders**](EcommerceApi.md#getOrders) | **GET** /orders | Get order details +[**getProductInfo**](EcommerceApi.md#getProductInfo) | **GET** /products/{id} | Get a product's details +[**getProducts**](EcommerceApi.md#getProducts) | **GET** /products | Return all your products + + +# **createBatchOrder** +> createBatchOrder($orderBatch) + +Create orders in batch + +Create multiple orders at one time instead of one order at a time + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\EcommerceApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$orderBatch = new \Brevo\Client\Model\OrderBatch(); // \Brevo\Client\Model\OrderBatch | + +try { + $apiInstance->createBatchOrder($orderBatch); +} catch (Exception $e) { + echo 'Exception when calling EcommerceApi->createBatchOrder: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderBatch** | [**\Brevo\Client\Model\OrderBatch**](../Model/OrderBatch.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **createOrder** +> createOrder($order) + +Managing the status of the order + +Manages the transactional status of the order + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\EcommerceApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$order = new \Brevo\Client\Model\Order(); // \Brevo\Client\Model\Order | + +try { + $apiInstance->createOrder($order); +} catch (Exception $e) { + echo 'Exception when calling EcommerceApi->createOrder: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **order** | [**\Brevo\Client\Model\Order**](../Model/Order.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **createUpdateBatchCategory** +> \Brevo\Client\Model\CreateUpdateBatchCategoryModel createUpdateBatchCategory($createUpdateBatchCategory) + +Create categories in batch + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\EcommerceApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$createUpdateBatchCategory = new \Brevo\Client\Model\CreateUpdateBatchCategory(); // \Brevo\Client\Model\CreateUpdateBatchCategory | Values to create a batch of categories + +try { + $result = $apiInstance->createUpdateBatchCategory($createUpdateBatchCategory); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling EcommerceApi->createUpdateBatchCategory: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createUpdateBatchCategory** | [**\Brevo\Client\Model\CreateUpdateBatchCategory**](../Model/CreateUpdateBatchCategory.md)| Values to create a batch of categories | + +### Return type + +[**\Brevo\Client\Model\CreateUpdateBatchCategoryModel**](../Model/CreateUpdateBatchCategoryModel.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **createUpdateBatchProducts** +> \Brevo\Client\Model\CreateUpdateBatchProductsModel createUpdateBatchProducts($createUpdateBatchProducts) + +Create products in batch + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\EcommerceApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$createUpdateBatchProducts = new \Brevo\Client\Model\CreateUpdateBatchProducts(); // \Brevo\Client\Model\CreateUpdateBatchProducts | Values to create a batch of products + +try { + $result = $apiInstance->createUpdateBatchProducts($createUpdateBatchProducts); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling EcommerceApi->createUpdateBatchProducts: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createUpdateBatchProducts** | [**\Brevo\Client\Model\CreateUpdateBatchProducts**](../Model/CreateUpdateBatchProducts.md)| Values to create a batch of products | + +### Return type + +[**\Brevo\Client\Model\CreateUpdateBatchProductsModel**](../Model/CreateUpdateBatchProductsModel.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **createUpdateCategory** +> \Brevo\Client\Model\CreateCategoryModel createUpdateCategory($createUpdateCategory) + +Create/Update a category + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\EcommerceApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$createUpdateCategory = new \Brevo\Client\Model\CreateUpdateCategory(); // \Brevo\Client\Model\CreateUpdateCategory | Values to create/update a category + +try { + $result = $apiInstance->createUpdateCategory($createUpdateCategory); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling EcommerceApi->createUpdateCategory: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createUpdateCategory** | [**\Brevo\Client\Model\CreateUpdateCategory**](../Model/CreateUpdateCategory.md)| Values to create/update a category | + +### Return type + +[**\Brevo\Client\Model\CreateCategoryModel**](../Model/CreateCategoryModel.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **createUpdateProduct** +> \Brevo\Client\Model\CreateProductModel createUpdateProduct($createUpdateProduct) + +Create/Update a product + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\EcommerceApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$createUpdateProduct = new \Brevo\Client\Model\CreateUpdateProduct(); // \Brevo\Client\Model\CreateUpdateProduct | Values to create/update a product + +try { + $result = $apiInstance->createUpdateProduct($createUpdateProduct); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling EcommerceApi->createUpdateProduct: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createUpdateProduct** | [**\Brevo\Client\Model\CreateUpdateProduct**](../Model/CreateUpdateProduct.md)| Values to create/update a product | + +### Return type + +[**\Brevo\Client\Model\CreateProductModel**](../Model/CreateProductModel.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **ecommerceActivatePost** +> ecommerceActivatePost() + +Activate the eCommerce app + +Getting access to Brevo eCommerce. + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\EcommerceApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); + +try { + $apiInstance->ecommerceActivatePost(); +} catch (Exception $e) { + echo 'Exception when calling EcommerceApi->ecommerceActivatePost: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getCategories** +> \Brevo\Client\Model\GetCategories getCategories($limit, $offset, $sort, $ids, $name, $modifiedSince, $createdSince) + +Return all your categories + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\EcommerceApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$limit = 50; // int | Number of documents per page +$offset = 0; // int | Index of the first document in the page +$sort = "desc"; // string | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed +$ids = array("ids_example"); // string[] | Filter by category ids +$name = "name_example"; // string | Filter by category name +$modifiedSince = "modifiedSince_example"; // string | Filter (urlencoded) the categories modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** +$createdSince = "createdSince_example"; // string | Filter (urlencoded) the categories created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** + +try { + $result = $apiInstance->getCategories($limit, $offset, $sort, $ids, $name, $modifiedSince, $createdSince); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling EcommerceApi->getCategories: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| Number of documents per page | [optional] [default to 50] + **offset** | **int**| Index of the first document in the page | [optional] [default to 0] + **sort** | **string**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [optional] [default to desc] + **ids** | [**string[]**](../Model/string.md)| Filter by category ids | [optional] + **name** | **string**| Filter by category name | [optional] + **modifiedSince** | **string**| Filter (urlencoded) the categories modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** | [optional] + **createdSince** | **string**| Filter (urlencoded) the categories created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** | [optional] + +### Return type + +[**\Brevo\Client\Model\GetCategories**](../Model/GetCategories.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getCategoryInfo** +> \Brevo\Client\Model\GetCategoryDetails getCategoryInfo($id) + +Get a category details + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\EcommerceApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = "id_example"; // string | Category ID + +try { + $result = $apiInstance->getCategoryInfo($id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling EcommerceApi->getCategoryInfo: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| Category ID | + +### Return type + +[**\Brevo\Client\Model\GetCategoryDetails**](../Model/GetCategoryDetails.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getOrders** +> \Brevo\Client\Model\GetOrders getOrders($limit, $offset, $sort, $modifiedSince, $createdSince) + +Get order details + +Get all the orders + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\EcommerceApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$limit = 50; // int | Number of documents per page +$offset = 0; // int | Index of the first document in the page +$sort = "desc"; // string | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed +$modifiedSince = "modifiedSince_example"; // string | Filter (urlencoded) the orders modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** +$createdSince = "createdSince_example"; // string | Filter (urlencoded) the orders created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** + +try { + $result = $apiInstance->getOrders($limit, $offset, $sort, $modifiedSince, $createdSince); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling EcommerceApi->getOrders: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| Number of documents per page | [optional] [default to 50] + **offset** | **int**| Index of the first document in the page | [optional] [default to 0] + **sort** | **string**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [optional] [default to desc] + **modifiedSince** | **string**| Filter (urlencoded) the orders modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** | [optional] + **createdSince** | **string**| Filter (urlencoded) the orders created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** | [optional] + +### Return type + +[**\Brevo\Client\Model\GetOrders**](../Model/GetOrders.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getProductInfo** +> \Brevo\Client\Model\GetProductDetails getProductInfo($id) + +Get a product's details + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\EcommerceApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = "id_example"; // string | Product ID + +try { + $result = $apiInstance->getProductInfo($id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling EcommerceApi->getProductInfo: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| Product ID | + +### Return type + +[**\Brevo\Client\Model\GetProductDetails**](../Model/GetProductDetails.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getProducts** +> \Brevo\Client\Model\GetProducts getProducts($limit, $offset, $sort, $ids, $name, $priceLte, $priceGte, $priceLt, $priceGt, $priceEq, $priceNe, $categories, $modifiedSince, $createdSince) + +Return all your products + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\EcommerceApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$limit = 50; // int | Number of documents per page +$offset = 0; // int | Index of the first document in the page +$sort = "desc"; // string | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed +$ids = array("ids_example"); // string[] | Filter by product ids +$name = "name_example"; // string | Filter by product name, minimum 3 characters should be present for search +$priceLte = 8.14; // float | Price filter for products less than and equals to particular amount +$priceGte = 8.14; // float | Price filter for products greater than and equals to particular amount +$priceLt = 8.14; // float | Price filter for products less than particular amount +$priceGt = 8.14; // float | Price filter for products greater than particular amount +$priceEq = 8.14; // float | Price filter for products equals to particular amount +$priceNe = 8.14; // float | Price filter for products not equals to particular amount +$categories = array("categories_example"); // string[] | Filter by category ids +$modifiedSince = "modifiedSince_example"; // string | Filter (urlencoded) the orders modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** +$createdSince = "createdSince_example"; // string | Filter (urlencoded) the orders created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** + +try { + $result = $apiInstance->getProducts($limit, $offset, $sort, $ids, $name, $priceLte, $priceGte, $priceLt, $priceGt, $priceEq, $priceNe, $categories, $modifiedSince, $createdSince); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling EcommerceApi->getProducts: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| Number of documents per page | [optional] [default to 50] + **offset** | **int**| Index of the first document in the page | [optional] [default to 0] + **sort** | **string**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [optional] [default to desc] + **ids** | [**string[]**](../Model/string.md)| Filter by product ids | [optional] + **name** | **string**| Filter by product name, minimum 3 characters should be present for search | [optional] + **priceLte** | **float**| Price filter for products less than and equals to particular amount | [optional] + **priceGte** | **float**| Price filter for products greater than and equals to particular amount | [optional] + **priceLt** | **float**| Price filter for products less than particular amount | [optional] + **priceGt** | **float**| Price filter for products greater than particular amount | [optional] + **priceEq** | **float**| Price filter for products equals to particular amount | [optional] + **priceNe** | **float**| Price filter for products not equals to particular amount | [optional] + **categories** | [**string[]**](../Model/string.md)| Filter by category ids | [optional] + **modifiedSince** | **string**| Filter (urlencoded) the orders modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** | [optional] + **createdSince** | **string**| Filter (urlencoded) the orders created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** | [optional] + +### Return type + +[**\Brevo\Client\Model\GetProducts**](../Model/GetProducts.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + diff --git a/vendor/getbrevo/brevo-php/docs/Api/EmailCampaignsApi.md b/vendor/getbrevo/brevo-php/docs/Api/EmailCampaignsApi.md new file mode 100644 index 0000000..b25d8f3 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Api/EmailCampaignsApi.md @@ -0,0 +1,790 @@ +# Brevo\Client\EmailCampaignsApi + +All URIs are relative to *https://api.brevo.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createEmailCampaign**](EmailCampaignsApi.md#createEmailCampaign) | **POST** /emailCampaigns | Create an email campaign +[**deleteEmailCampaign**](EmailCampaignsApi.md#deleteEmailCampaign) | **DELETE** /emailCampaigns/{campaignId} | Delete an email campaign +[**emailExportRecipients**](EmailCampaignsApi.md#emailExportRecipients) | **POST** /emailCampaigns/{campaignId}/exportRecipients | Export the recipients of an email campaign +[**getAbTestCampaignResult**](EmailCampaignsApi.md#getAbTestCampaignResult) | **GET** /emailCampaigns/{campaignId}/abTestCampaignResult | Get an A/B test email campaign results +[**getEmailCampaign**](EmailCampaignsApi.md#getEmailCampaign) | **GET** /emailCampaigns/{campaignId} | Get an email campaign report +[**getEmailCampaigns**](EmailCampaignsApi.md#getEmailCampaigns) | **GET** /emailCampaigns | Return all your created email campaigns +[**getSharedTemplateUrl**](EmailCampaignsApi.md#getSharedTemplateUrl) | **GET** /emailCampaigns/{campaignId}/sharedUrl | Get a shared template url +[**sendEmailCampaignNow**](EmailCampaignsApi.md#sendEmailCampaignNow) | **POST** /emailCampaigns/{campaignId}/sendNow | Send an email campaign immediately, based on campaignId +[**sendReport**](EmailCampaignsApi.md#sendReport) | **POST** /emailCampaigns/{campaignId}/sendReport | Send the report of a campaign +[**sendTestEmail**](EmailCampaignsApi.md#sendTestEmail) | **POST** /emailCampaigns/{campaignId}/sendTest | Send an email campaign to your test list +[**updateCampaignStatus**](EmailCampaignsApi.md#updateCampaignStatus) | **PUT** /emailCampaigns/{campaignId}/status | Update an email campaign status +[**updateEmailCampaign**](EmailCampaignsApi.md#updateEmailCampaign) | **PUT** /emailCampaigns/{campaignId} | Update an email campaign +[**uploadImageToGallery**](EmailCampaignsApi.md#uploadImageToGallery) | **POST** /emailCampaigns/images | Upload an image to your account's image gallery + + +# **createEmailCampaign** +> \Brevo\Client\Model\CreateModel createEmailCampaign($emailCampaigns) + +Create an email campaign + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\EmailCampaignsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$emailCampaigns = new \Brevo\Client\Model\CreateEmailCampaign(); // \Brevo\Client\Model\CreateEmailCampaign | Values to create a campaign + +try { + $result = $apiInstance->createEmailCampaign($emailCampaigns); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling EmailCampaignsApi->createEmailCampaign: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **emailCampaigns** | [**\Brevo\Client\Model\CreateEmailCampaign**](../Model/CreateEmailCampaign.md)| Values to create a campaign | + +### Return type + +[**\Brevo\Client\Model\CreateModel**](../Model/CreateModel.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **deleteEmailCampaign** +> deleteEmailCampaign($campaignId) + +Delete an email campaign + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\EmailCampaignsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$campaignId = 789; // int | id of the campaign + +try { + $apiInstance->deleteEmailCampaign($campaignId); +} catch (Exception $e) { + echo 'Exception when calling EmailCampaignsApi->deleteEmailCampaign: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **int**| id of the campaign | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **emailExportRecipients** +> \Brevo\Client\Model\CreatedProcessId emailExportRecipients($campaignId, $recipientExport) + +Export the recipients of an email campaign + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\EmailCampaignsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$campaignId = 789; // int | Id of the campaign +$recipientExport = new \Brevo\Client\Model\EmailExportRecipients(); // \Brevo\Client\Model\EmailExportRecipients | Values to send for a recipient export request + +try { + $result = $apiInstance->emailExportRecipients($campaignId, $recipientExport); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling EmailCampaignsApi->emailExportRecipients: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **int**| Id of the campaign | + **recipientExport** | [**\Brevo\Client\Model\EmailExportRecipients**](../Model/EmailExportRecipients.md)| Values to send for a recipient export request | [optional] + +### Return type + +[**\Brevo\Client\Model\CreatedProcessId**](../Model/CreatedProcessId.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getAbTestCampaignResult** +> \Brevo\Client\Model\AbTestCampaignResult getAbTestCampaignResult($campaignId) + +Get an A/B test email campaign results + +Obtain winning version of an A/B test email campaign + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\EmailCampaignsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$campaignId = 789; // int | Id of the A/B test campaign + +try { + $result = $apiInstance->getAbTestCampaignResult($campaignId); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling EmailCampaignsApi->getAbTestCampaignResult: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **int**| Id of the A/B test campaign | + +### Return type + +[**\Brevo\Client\Model\AbTestCampaignResult**](../Model/AbTestCampaignResult.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getEmailCampaign** +> \Brevo\Client\Model\GetEmailCampaign getEmailCampaign($campaignId, $statistics) + +Get an email campaign report + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\EmailCampaignsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$campaignId = 789; // int | Id of the campaign +$statistics = "statistics_example"; // string | Filter on the type of statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response. + +try { + $result = $apiInstance->getEmailCampaign($campaignId, $statistics); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling EmailCampaignsApi->getEmailCampaign: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **int**| Id of the campaign | + **statistics** | **string**| Filter on the type of statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response. | [optional] + +### Return type + +[**\Brevo\Client\Model\GetEmailCampaign**](../Model/GetEmailCampaign.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getEmailCampaigns** +> \Brevo\Client\Model\GetEmailCampaigns getEmailCampaigns($type, $status, $statistics, $startDate, $endDate, $limit, $offset, $sort, $excludeHtmlContent) + +Return all your created email campaigns + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\EmailCampaignsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$type = "type_example"; // string | Filter on the type of the campaigns +$status = "status_example"; // string | Filter on the status of the campaign +$statistics = "statistics_example"; // string | Filter on the type of statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response. +$startDate = "startDate_example"; // string | Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) +$endDate = "endDate_example"; // string | Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) +$limit = 50; // int | Number of documents per page +$offset = 0; // int | Index of the first document in the page +$sort = "desc"; // string | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed +$excludeHtmlContent = true; // bool | Use this flag to exclude htmlContent from the response body. If set to **true**, htmlContent field will be returned as empty string in the response body + +try { + $result = $apiInstance->getEmailCampaigns($type, $status, $statistics, $startDate, $endDate, $limit, $offset, $sort, $excludeHtmlContent); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling EmailCampaignsApi->getEmailCampaigns: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **type** | **string**| Filter on the type of the campaigns | [optional] + **status** | **string**| Filter on the status of the campaign | [optional] + **statistics** | **string**| Filter on the type of statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response. | [optional] + **startDate** | **string**| Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) | [optional] + **endDate** | **string**| Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) | [optional] + **limit** | **int**| Number of documents per page | [optional] [default to 50] + **offset** | **int**| Index of the first document in the page | [optional] [default to 0] + **sort** | **string**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [optional] [default to desc] + **excludeHtmlContent** | **bool**| Use this flag to exclude htmlContent from the response body. If set to **true**, htmlContent field will be returned as empty string in the response body | [optional] + +### Return type + +[**\Brevo\Client\Model\GetEmailCampaigns**](../Model/GetEmailCampaigns.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getSharedTemplateUrl** +> \Brevo\Client\Model\GetSharedTemplateUrl getSharedTemplateUrl($campaignId) + +Get a shared template url + +Get a unique URL to share & import an email template from one Brevo account to another. + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\EmailCampaignsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$campaignId = 789; // int | Id of the campaign or template + +try { + $result = $apiInstance->getSharedTemplateUrl($campaignId); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling EmailCampaignsApi->getSharedTemplateUrl: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **int**| Id of the campaign or template | + +### Return type + +[**\Brevo\Client\Model\GetSharedTemplateUrl**](../Model/GetSharedTemplateUrl.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **sendEmailCampaignNow** +> sendEmailCampaignNow($campaignId) + +Send an email campaign immediately, based on campaignId + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\EmailCampaignsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$campaignId = 789; // int | Id of the campaign + +try { + $apiInstance->sendEmailCampaignNow($campaignId); +} catch (Exception $e) { + echo 'Exception when calling EmailCampaignsApi->sendEmailCampaignNow: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **int**| Id of the campaign | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **sendReport** +> sendReport($campaignId, $sendReport) + +Send the report of a campaign + +A PDF will be sent to the specified email addresses + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\EmailCampaignsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$campaignId = 789; // int | Id of the campaign +$sendReport = new \Brevo\Client\Model\SendReport(); // \Brevo\Client\Model\SendReport | Values for send a report + +try { + $apiInstance->sendReport($campaignId, $sendReport); +} catch (Exception $e) { + echo 'Exception when calling EmailCampaignsApi->sendReport: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **int**| Id of the campaign | + **sendReport** | [**\Brevo\Client\Model\SendReport**](../Model/SendReport.md)| Values for send a report | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **sendTestEmail** +> sendTestEmail($campaignId, $emailTo) + +Send an email campaign to your test list + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\EmailCampaignsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$campaignId = 789; // int | Id of the campaign +$emailTo = new \Brevo\Client\Model\SendTestEmail(); // \Brevo\Client\Model\SendTestEmail | + +try { + $apiInstance->sendTestEmail($campaignId, $emailTo); +} catch (Exception $e) { + echo 'Exception when calling EmailCampaignsApi->sendTestEmail: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **int**| Id of the campaign | + **emailTo** | [**\Brevo\Client\Model\SendTestEmail**](../Model/SendTestEmail.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **updateCampaignStatus** +> updateCampaignStatus($campaignId, $status) + +Update an email campaign status + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\EmailCampaignsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$campaignId = 789; // int | Id of the campaign +$status = new \Brevo\Client\Model\UpdateCampaignStatus(); // \Brevo\Client\Model\UpdateCampaignStatus | Status of the campaign + +try { + $apiInstance->updateCampaignStatus($campaignId, $status); +} catch (Exception $e) { + echo 'Exception when calling EmailCampaignsApi->updateCampaignStatus: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **int**| Id of the campaign | + **status** | [**\Brevo\Client\Model\UpdateCampaignStatus**](../Model/UpdateCampaignStatus.md)| Status of the campaign | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **updateEmailCampaign** +> updateEmailCampaign($campaignId, $emailCampaign) + +Update an email campaign + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\EmailCampaignsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$campaignId = 789; // int | Id of the campaign +$emailCampaign = new \Brevo\Client\Model\UpdateEmailCampaign(); // \Brevo\Client\Model\UpdateEmailCampaign | Values to update a campaign + +try { + $apiInstance->updateEmailCampaign($campaignId, $emailCampaign); +} catch (Exception $e) { + echo 'Exception when calling EmailCampaignsApi->updateEmailCampaign: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **int**| Id of the campaign | + **emailCampaign** | [**\Brevo\Client\Model\UpdateEmailCampaign**](../Model/UpdateEmailCampaign.md)| Values to update a campaign | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **uploadImageToGallery** +> \Brevo\Client\Model\UploadImageModel uploadImageToGallery($uploadImage) + +Upload an image to your account's image gallery + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\EmailCampaignsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$uploadImage = new \Brevo\Client\Model\UploadImageToGallery(); // \Brevo\Client\Model\UploadImageToGallery | Parameters to upload an image + +try { + $result = $apiInstance->uploadImageToGallery($uploadImage); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling EmailCampaignsApi->uploadImageToGallery: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **uploadImage** | [**\Brevo\Client\Model\UploadImageToGallery**](../Model/UploadImageToGallery.md)| Parameters to upload an image | + +### Return type + +[**\Brevo\Client\Model\UploadImageModel**](../Model/UploadImageModel.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + diff --git a/vendor/getbrevo/brevo-php/docs/Api/EventsApi.md b/vendor/getbrevo/brevo-php/docs/Api/EventsApi.md new file mode 100644 index 0000000..50957d9 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Api/EventsApi.md @@ -0,0 +1,67 @@ +# Brevo\Client\EventsApi + +All URIs are relative to *https://api.brevo.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createEvent**](EventsApi.md#createEvent) | **POST** /events | Create an event + + +# **createEvent** +> createEvent($event) + +Create an event + +Create an event to track a contact's interaction. + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\EventsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$event = new \Brevo\Client\Model\Event(); // \Brevo\Client\Model\Event | + +try { + $apiInstance->createEvent($event); +} catch (Exception $e) { + echo 'Exception when calling EventsApi->createEvent: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **event** | [**\Brevo\Client\Model\Event**](../Model/Event.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + diff --git a/vendor/getbrevo/brevo-php/docs/Api/ExternalFeedsApi.md b/vendor/getbrevo/brevo-php/docs/Api/ExternalFeedsApi.md new file mode 100644 index 0000000..b72ddeb --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Api/ExternalFeedsApi.md @@ -0,0 +1,320 @@ +# Brevo\Client\ExternalFeedsApi + +All URIs are relative to *https://api.brevo.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createExternalFeed**](ExternalFeedsApi.md#createExternalFeed) | **POST** /feeds | Create an external feed +[**deleteExternalFeed**](ExternalFeedsApi.md#deleteExternalFeed) | **DELETE** /feeds/{uuid} | Delete an external feed +[**getAllExternalFeeds**](ExternalFeedsApi.md#getAllExternalFeeds) | **GET** /feeds | Fetch all external feeds +[**getExternalFeedByUUID**](ExternalFeedsApi.md#getExternalFeedByUUID) | **GET** /feeds/{uuid} | Get an external feed by UUID +[**updateExternalFeed**](ExternalFeedsApi.md#updateExternalFeed) | **PUT** /feeds/{uuid} | Update an external feed + + +# **createExternalFeed** +> \Brevo\Client\Model\InlineResponse2015 createExternalFeed($createExternalFeed) + +Create an external feed + +This endpoint will create an external feed. + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ExternalFeedsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$createExternalFeed = new \Brevo\Client\Model\CreateExternalFeed(); // \Brevo\Client\Model\CreateExternalFeed | Values to create a feed + +try { + $result = $apiInstance->createExternalFeed($createExternalFeed); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ExternalFeedsApi->createExternalFeed: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createExternalFeed** | [**\Brevo\Client\Model\CreateExternalFeed**](../Model/CreateExternalFeed.md)| Values to create a feed | + +### Return type + +[**\Brevo\Client\Model\InlineResponse2015**](../Model/InlineResponse2015.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **deleteExternalFeed** +> deleteExternalFeed($uuid) + +Delete an external feed + +This endpoint will delete an external feed. + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ExternalFeedsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$uuid = "uuid_example"; // string | UUID of the feed to delete + +try { + $apiInstance->deleteExternalFeed($uuid); +} catch (Exception $e) { + echo 'Exception when calling ExternalFeedsApi->deleteExternalFeed: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **uuid** | **string**| UUID of the feed to delete | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getAllExternalFeeds** +> \Brevo\Client\Model\GetAllExternalFeeds getAllExternalFeeds($search, $startDate, $endDate, $sort, $authType, $limit, $offset) + +Fetch all external feeds + +This endpoint can fetch all created external feeds. + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ExternalFeedsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$search = "search_example"; // string | Can be used to filter records by search keyword on feed name +$startDate = new \DateTime("2013-10-20"); // \DateTime | Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older than current date. +$endDate = new \DateTime("2013-10-20"); // \DateTime | Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. +$sort = "desc"; // string | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed. +$authType = "authType_example"; // string | Filter the records by `authType` of the feed. +$limit = 50; // int | Number of documents returned per page. +$offset = 0; // int | Index of the first document on the page. + +try { + $result = $apiInstance->getAllExternalFeeds($search, $startDate, $endDate, $sort, $authType, $limit, $offset); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ExternalFeedsApi->getAllExternalFeeds: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **search** | **string**| Can be used to filter records by search keyword on feed name | [optional] + **startDate** | **\DateTime**| Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older than current date. | [optional] + **endDate** | **\DateTime**| Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. | [optional] + **sort** | **string**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed. | [optional] [default to desc] + **authType** | **string**| Filter the records by `authType` of the feed. | [optional] + **limit** | **int**| Number of documents returned per page. | [optional] [default to 50] + **offset** | **int**| Index of the first document on the page. | [optional] [default to 0] + +### Return type + +[**\Brevo\Client\Model\GetAllExternalFeeds**](../Model/GetAllExternalFeeds.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getExternalFeedByUUID** +> \Brevo\Client\Model\GetExternalFeedByUUID getExternalFeedByUUID($uuid) + +Get an external feed by UUID + +This endpoint will update an external feed. + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ExternalFeedsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$uuid = "uuid_example"; // string | UUID of the feed to fetch + +try { + $result = $apiInstance->getExternalFeedByUUID($uuid); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ExternalFeedsApi->getExternalFeedByUUID: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **uuid** | **string**| UUID of the feed to fetch | + +### Return type + +[**\Brevo\Client\Model\GetExternalFeedByUUID**](../Model/GetExternalFeedByUUID.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **updateExternalFeed** +> updateExternalFeed($uuid, $updateExternalFeed) + +Update an external feed + +This endpoint will update an external feed. + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ExternalFeedsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$uuid = "uuid_example"; // string | UUID of the feed to update +$updateExternalFeed = new \Brevo\Client\Model\UpdateExternalFeed(); // \Brevo\Client\Model\UpdateExternalFeed | Values to update a feed + +try { + $apiInstance->updateExternalFeed($uuid, $updateExternalFeed); +} catch (Exception $e) { + echo 'Exception when calling ExternalFeedsApi->updateExternalFeed: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **uuid** | **string**| UUID of the feed to update | + **updateExternalFeed** | [**\Brevo\Client\Model\UpdateExternalFeed**](../Model/UpdateExternalFeed.md)| Values to update a feed | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + diff --git a/vendor/getbrevo/brevo-php/docs/Api/FilesApi.md b/vendor/getbrevo/brevo-php/docs/Api/FilesApi.md new file mode 100644 index 0000000..3a64955 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Api/FilesApi.md @@ -0,0 +1,315 @@ +# Brevo\Client\FilesApi + +All URIs are relative to *https://api.brevo.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**crmFilesGet**](FilesApi.md#crmFilesGet) | **GET** /crm/files | Get all files +[**crmFilesIdDataGet**](FilesApi.md#crmFilesIdDataGet) | **GET** /crm/files/{id}/data | Get file details +[**crmFilesIdDelete**](FilesApi.md#crmFilesIdDelete) | **DELETE** /crm/files/{id} | Delete a file +[**crmFilesIdGet**](FilesApi.md#crmFilesIdGet) | **GET** /crm/files/{id} | Download a file +[**crmFilesPost**](FilesApi.md#crmFilesPost) | **POST** /crm/files | Upload a file + + +# **crmFilesGet** +> \Brevo\Client\Model\FileList crmFilesGet($entity, $entityIds, $dateFrom, $dateTo, $offset, $limit, $sort) + +Get all files + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\FilesApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$entity = "entity_example"; // string | Filter by file entity type +$entityIds = "entityIds_example"; // string | Filter by file entity IDs +$dateFrom = 56; // int | dateFrom to date range filter type (timestamp in milliseconds) +$dateTo = 56; // int | dateTo to date range filter type (timestamp in milliseconds) +$offset = 789; // int | Index of the first document of the page +$limit = 50; // int | Number of documents per page +$sort = "sort_example"; // string | Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed + +try { + $result = $apiInstance->crmFilesGet($entity, $entityIds, $dateFrom, $dateTo, $offset, $limit, $sort); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling FilesApi->crmFilesGet: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **entity** | **string**| Filter by file entity type | [optional] + **entityIds** | **string**| Filter by file entity IDs | [optional] + **dateFrom** | **int**| dateFrom to date range filter type (timestamp in milliseconds) | [optional] + **dateTo** | **int**| dateTo to date range filter type (timestamp in milliseconds) | [optional] + **offset** | **int**| Index of the first document of the page | [optional] + **limit** | **int**| Number of documents per page | [optional] [default to 50] + **sort** | **string**| Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed | [optional] + +### Return type + +[**\Brevo\Client\Model\FileList**](../Model/FileList.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **crmFilesIdDataGet** +> \Brevo\Client\Model\FileData crmFilesIdDataGet($id) + +Get file details + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\FilesApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = "id_example"; // string | File id to get file data. + +try { + $result = $apiInstance->crmFilesIdDataGet($id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling FilesApi->crmFilesIdDataGet: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| File id to get file data. | + +### Return type + +[**\Brevo\Client\Model\FileData**](../Model/FileData.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **crmFilesIdDelete** +> crmFilesIdDelete($id) + +Delete a file + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\FilesApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = "id_example"; // string | File id to delete. + +try { + $apiInstance->crmFilesIdDelete($id); +} catch (Exception $e) { + echo 'Exception when calling FilesApi->crmFilesIdDelete: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| File id to delete. | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **crmFilesIdGet** +> \Brevo\Client\Model\FileDownloadableLink crmFilesIdGet($id) + +Download a file + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\FilesApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = "id_example"; // string | File id to download. + +try { + $result = $apiInstance->crmFilesIdGet($id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling FilesApi->crmFilesIdGet: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| File id to download. | + +### Return type + +[**\Brevo\Client\Model\FileDownloadableLink**](../Model/FileDownloadableLink.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **crmFilesPost** +> \Brevo\Client\Model\FileData crmFilesPost($file, $dealId, $contactId, $companyId) + +Upload a file + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\FilesApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$file = "/path/to/file.txt"; // \SplFileObject | File data to create a file. +$dealId = "dealId_example"; // string | Deal id linked to a file +$contactId = 789; // int | Contact id linked to a file +$companyId = "companyId_example"; // string | Company id linked to a file + +try { + $result = $apiInstance->crmFilesPost($file, $dealId, $contactId, $companyId); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling FilesApi->crmFilesPost: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **file** | **\SplFileObject**| File data to create a file. | + **dealId** | **string**| Deal id linked to a file | [optional] + **contactId** | **int**| Contact id linked to a file | [optional] + **companyId** | **string**| Company id linked to a file | [optional] + +### Return type + +[**\Brevo\Client\Model\FileData**](../Model/FileData.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + diff --git a/vendor/getbrevo/brevo-php/docs/Api/FoldersApi.md b/vendor/getbrevo/brevo-php/docs/Api/FoldersApi.md new file mode 100644 index 0000000..e974372 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Api/FoldersApi.md @@ -0,0 +1,366 @@ +# Brevo\Client\FoldersApi + +All URIs are relative to *https://api.brevo.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createFolder**](FoldersApi.md#createFolder) | **POST** /contacts/folders | Create a folder +[**deleteFolder**](FoldersApi.md#deleteFolder) | **DELETE** /contacts/folders/{folderId} | Delete a folder (and all its lists) +[**getFolder**](FoldersApi.md#getFolder) | **GET** /contacts/folders/{folderId} | Returns a folder's details +[**getFolderLists**](FoldersApi.md#getFolderLists) | **GET** /contacts/folders/{folderId}/lists | Get lists in a folder +[**getFolders**](FoldersApi.md#getFolders) | **GET** /contacts/folders | Get all folders +[**updateFolder**](FoldersApi.md#updateFolder) | **PUT** /contacts/folders/{folderId} | Update a folder + + +# **createFolder** +> \Brevo\Client\Model\CreateModel createFolder($createFolder) + +Create a folder + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\FoldersApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$createFolder = new \Brevo\Client\Model\CreateUpdateFolder(); // \Brevo\Client\Model\CreateUpdateFolder | Name of the folder + +try { + $result = $apiInstance->createFolder($createFolder); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling FoldersApi->createFolder: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createFolder** | [**\Brevo\Client\Model\CreateUpdateFolder**](../Model/CreateUpdateFolder.md)| Name of the folder | + +### Return type + +[**\Brevo\Client\Model\CreateModel**](../Model/CreateModel.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **deleteFolder** +> deleteFolder($folderId) + +Delete a folder (and all its lists) + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\FoldersApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$folderId = 789; // int | Id of the folder + +try { + $apiInstance->deleteFolder($folderId); +} catch (Exception $e) { + echo 'Exception when calling FoldersApi->deleteFolder: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **folderId** | **int**| Id of the folder | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getFolder** +> \Brevo\Client\Model\GetFolder getFolder($folderId) + +Returns a folder's details + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\FoldersApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$folderId = 789; // int | id of the folder + +try { + $result = $apiInstance->getFolder($folderId); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling FoldersApi->getFolder: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **folderId** | **int**| id of the folder | + +### Return type + +[**\Brevo\Client\Model\GetFolder**](../Model/GetFolder.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getFolderLists** +> \Brevo\Client\Model\GetFolderLists getFolderLists($folderId, $limit, $offset, $sort) + +Get lists in a folder + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\FoldersApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$folderId = 789; // int | Id of the folder +$limit = 10; // int | Number of documents per page +$offset = 0; // int | Index of the first document of the page +$sort = "desc"; // string | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + +try { + $result = $apiInstance->getFolderLists($folderId, $limit, $offset, $sort); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling FoldersApi->getFolderLists: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **folderId** | **int**| Id of the folder | + **limit** | **int**| Number of documents per page | [optional] [default to 10] + **offset** | **int**| Index of the first document of the page | [optional] [default to 0] + **sort** | **string**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [optional] [default to desc] + +### Return type + +[**\Brevo\Client\Model\GetFolderLists**](../Model/GetFolderLists.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getFolders** +> \Brevo\Client\Model\GetFolders getFolders($limit, $offset, $sort) + +Get all folders + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\FoldersApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$limit = 10; // int | Number of documents per page +$offset = 0; // int | Index of the first document of the page +$sort = "desc"; // string | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + +try { + $result = $apiInstance->getFolders($limit, $offset, $sort); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling FoldersApi->getFolders: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| Number of documents per page | [default to 10] + **offset** | **int**| Index of the first document of the page | [default to 0] + **sort** | **string**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [optional] [default to desc] + +### Return type + +[**\Brevo\Client\Model\GetFolders**](../Model/GetFolders.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **updateFolder** +> updateFolder($folderId, $updateFolder) + +Update a folder + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\FoldersApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$folderId = 789; // int | Id of the folder +$updateFolder = new \Brevo\Client\Model\CreateUpdateFolder(); // \Brevo\Client\Model\CreateUpdateFolder | Name of the folder + +try { + $apiInstance->updateFolder($folderId, $updateFolder); +} catch (Exception $e) { + echo 'Exception when calling FoldersApi->updateFolder: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **folderId** | **int**| Id of the folder | + **updateFolder** | [**\Brevo\Client\Model\CreateUpdateFolder**](../Model/CreateUpdateFolder.md)| Name of the folder | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + diff --git a/vendor/getbrevo/brevo-php/docs/Api/InboundParsingApi.md b/vendor/getbrevo/brevo-php/docs/Api/InboundParsingApi.md new file mode 100644 index 0000000..00c0221 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Api/InboundParsingApi.md @@ -0,0 +1,198 @@ +# Brevo\Client\InboundParsingApi + +All URIs are relative to *https://api.brevo.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getInboundEmailAttachment**](InboundParsingApi.md#getInboundEmailAttachment) | **GET** /inbound/attachments/{downloadToken} | Retrieve inbound attachment with download token. +[**getInboundEmailEvents**](InboundParsingApi.md#getInboundEmailEvents) | **GET** /inbound/events | Get the list of all the events for the received emails. +[**getInboundEmailEventsByUuid**](InboundParsingApi.md#getInboundEmailEventsByUuid) | **GET** /inbound/events/{uuid} | Fetch all events history for one particular received email. + + +# **getInboundEmailAttachment** +> \SplFileObject getInboundEmailAttachment($downloadToken) + +Retrieve inbound attachment with download token. + +This endpoint will retrieve inbound attachment with download token. + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\InboundParsingApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$downloadToken = "downloadToken_example"; // string | Token to fetch a particular attachment + +try { + $result = $apiInstance->getInboundEmailAttachment($downloadToken); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling InboundParsingApi->getInboundEmailAttachment: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **downloadToken** | **string**| Token to fetch a particular attachment | + +### Return type + +[**\SplFileObject**](../Model/\SplFileObject.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getInboundEmailEvents** +> \Brevo\Client\Model\GetInboundEmailEvents getInboundEmailEvents($sender, $startDate, $endDate, $limit, $offset, $sort) + +Get the list of all the events for the received emails. + +This endpoint will show the list of all the events for the received emails. + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\InboundParsingApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$sender = "sender_example"; // string | Email address of the sender. +$startDate = "startDate_example"; // string | Mandatory if endDate is used. Starting date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) from which you want to fetch the list. Maximum time period that can be selected is one month. +$endDate = "endDate_example"; // string | Mandatory if startDate is used. Ending date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) till which you want to fetch the list. Maximum time period that can be selected is one month. +$limit = 100; // int | Number of documents returned per page +$offset = 0; // int | Index of the first document on the page +$sort = "desc"; // string | Sort the results in the ascending/descending order of record creation + +try { + $result = $apiInstance->getInboundEmailEvents($sender, $startDate, $endDate, $limit, $offset, $sort); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling InboundParsingApi->getInboundEmailEvents: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sender** | **string**| Email address of the sender. | [optional] + **startDate** | **string**| Mandatory if endDate is used. Starting date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) from which you want to fetch the list. Maximum time period that can be selected is one month. | [optional] + **endDate** | **string**| Mandatory if startDate is used. Ending date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) till which you want to fetch the list. Maximum time period that can be selected is one month. | [optional] + **limit** | **int**| Number of documents returned per page | [optional] [default to 100] + **offset** | **int**| Index of the first document on the page | [optional] [default to 0] + **sort** | **string**| Sort the results in the ascending/descending order of record creation | [optional] [default to desc] + +### Return type + +[**\Brevo\Client\Model\GetInboundEmailEvents**](../Model/GetInboundEmailEvents.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getInboundEmailEventsByUuid** +> \Brevo\Client\Model\GetInboundEmailEventsByUuid getInboundEmailEventsByUuid($uuid) + +Fetch all events history for one particular received email. + +This endpoint will show the list of all events history for one particular received email. + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\InboundParsingApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$uuid = "uuid_example"; // string | UUID to fetch events specific to recieved email + +try { + $result = $apiInstance->getInboundEmailEventsByUuid($uuid); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling InboundParsingApi->getInboundEmailEventsByUuid: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **uuid** | **string**| UUID to fetch events specific to recieved email | + +### Return type + +[**\Brevo\Client\Model\GetInboundEmailEventsByUuid**](../Model/GetInboundEmailEventsByUuid.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + diff --git a/vendor/getbrevo/brevo-php/docs/Api/ListsApi.md b/vendor/getbrevo/brevo-php/docs/Api/ListsApi.md new file mode 100644 index 0000000..94f60a1 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Api/ListsApi.md @@ -0,0 +1,552 @@ +# Brevo\Client\ListsApi + +All URIs are relative to *https://api.brevo.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addContactToList**](ListsApi.md#addContactToList) | **POST** /contacts/lists/{listId}/contacts/add | Add existing contacts to a list +[**createList**](ListsApi.md#createList) | **POST** /contacts/lists | Create a list +[**deleteList**](ListsApi.md#deleteList) | **DELETE** /contacts/lists/{listId} | Delete a list +[**getContactsFromList**](ListsApi.md#getContactsFromList) | **GET** /contacts/lists/{listId}/contacts | Get contacts in a list +[**getFolderLists**](ListsApi.md#getFolderLists) | **GET** /contacts/folders/{folderId}/lists | Get lists in a folder +[**getList**](ListsApi.md#getList) | **GET** /contacts/lists/{listId} | Get a list's details +[**getLists**](ListsApi.md#getLists) | **GET** /contacts/lists | Get all the lists +[**removeContactFromList**](ListsApi.md#removeContactFromList) | **POST** /contacts/lists/{listId}/contacts/remove | Delete a contact from a list +[**updateList**](ListsApi.md#updateList) | **PUT** /contacts/lists/{listId} | Update a list + + +# **addContactToList** +> \Brevo\Client\Model\PostContactInfo addContactToList($listId, $contactEmails) + +Add existing contacts to a list + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ListsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$listId = 789; // int | Id of the list +$contactEmails = new \Brevo\Client\Model\AddContactToList(); // \Brevo\Client\Model\AddContactToList | Emails addresses OR IDs of the contacts + +try { + $result = $apiInstance->addContactToList($listId, $contactEmails); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ListsApi->addContactToList: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **listId** | **int**| Id of the list | + **contactEmails** | [**\Brevo\Client\Model\AddContactToList**](../Model/AddContactToList.md)| Emails addresses OR IDs of the contacts | + +### Return type + +[**\Brevo\Client\Model\PostContactInfo**](../Model/PostContactInfo.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **createList** +> \Brevo\Client\Model\CreateModel createList($createList) + +Create a list + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ListsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$createList = new \Brevo\Client\Model\CreateList(); // \Brevo\Client\Model\CreateList | Values to create a list + +try { + $result = $apiInstance->createList($createList); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ListsApi->createList: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createList** | [**\Brevo\Client\Model\CreateList**](../Model/CreateList.md)| Values to create a list | + +### Return type + +[**\Brevo\Client\Model\CreateModel**](../Model/CreateModel.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **deleteList** +> deleteList($listId) + +Delete a list + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ListsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$listId = 789; // int | Id of the list + +try { + $apiInstance->deleteList($listId); +} catch (Exception $e) { + echo 'Exception when calling ListsApi->deleteList: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **listId** | **int**| Id of the list | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getContactsFromList** +> \Brevo\Client\Model\GetContacts getContactsFromList($listId, $modifiedSince, $limit, $offset, $sort) + +Get contacts in a list + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ListsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$listId = 789; // int | Id of the list +$modifiedSince = "modifiedSince_example"; // string | Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. +$limit = 50; // int | Number of documents per page +$offset = 0; // int | Index of the first document of the page +$sort = "desc"; // string | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + +try { + $result = $apiInstance->getContactsFromList($listId, $modifiedSince, $limit, $offset, $sort); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ListsApi->getContactsFromList: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **listId** | **int**| Id of the list | + **modifiedSince** | **string**| Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. | [optional] + **limit** | **int**| Number of documents per page | [optional] [default to 50] + **offset** | **int**| Index of the first document of the page | [optional] [default to 0] + **sort** | **string**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [optional] [default to desc] + +### Return type + +[**\Brevo\Client\Model\GetContacts**](../Model/GetContacts.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getFolderLists** +> \Brevo\Client\Model\GetFolderLists getFolderLists($folderId, $limit, $offset, $sort) + +Get lists in a folder + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ListsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$folderId = 789; // int | Id of the folder +$limit = 10; // int | Number of documents per page +$offset = 0; // int | Index of the first document of the page +$sort = "desc"; // string | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + +try { + $result = $apiInstance->getFolderLists($folderId, $limit, $offset, $sort); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ListsApi->getFolderLists: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **folderId** | **int**| Id of the folder | + **limit** | **int**| Number of documents per page | [optional] [default to 10] + **offset** | **int**| Index of the first document of the page | [optional] [default to 0] + **sort** | **string**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [optional] [default to desc] + +### Return type + +[**\Brevo\Client\Model\GetFolderLists**](../Model/GetFolderLists.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getList** +> \Brevo\Client\Model\GetExtendedList getList($listId) + +Get a list's details + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ListsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$listId = 789; // int | Id of the list + +try { + $result = $apiInstance->getList($listId); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ListsApi->getList: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **listId** | **int**| Id of the list | + +### Return type + +[**\Brevo\Client\Model\GetExtendedList**](../Model/GetExtendedList.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getLists** +> \Brevo\Client\Model\GetLists getLists($limit, $offset, $sort) + +Get all the lists + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ListsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$limit = 10; // int | Number of documents per page +$offset = 0; // int | Index of the first document of the page +$sort = "desc"; // string | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + +try { + $result = $apiInstance->getLists($limit, $offset, $sort); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ListsApi->getLists: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| Number of documents per page | [optional] [default to 10] + **offset** | **int**| Index of the first document of the page | [optional] [default to 0] + **sort** | **string**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [optional] [default to desc] + +### Return type + +[**\Brevo\Client\Model\GetLists**](../Model/GetLists.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **removeContactFromList** +> \Brevo\Client\Model\PostContactInfo removeContactFromList($listId, $contactEmails) + +Delete a contact from a list + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ListsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$listId = 789; // int | Id of the list +$contactEmails = new \Brevo\Client\Model\RemoveContactFromList(); // \Brevo\Client\Model\RemoveContactFromList | Emails addresses OR IDs of the contacts + +try { + $result = $apiInstance->removeContactFromList($listId, $contactEmails); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ListsApi->removeContactFromList: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **listId** | **int**| Id of the list | + **contactEmails** | [**\Brevo\Client\Model\RemoveContactFromList**](../Model/RemoveContactFromList.md)| Emails addresses OR IDs of the contacts | + +### Return type + +[**\Brevo\Client\Model\PostContactInfo**](../Model/PostContactInfo.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **updateList** +> updateList($listId, $updateList) + +Update a list + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ListsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$listId = 789; // int | Id of the list +$updateList = new \Brevo\Client\Model\UpdateList(); // \Brevo\Client\Model\UpdateList | Values to update a list + +try { + $apiInstance->updateList($listId, $updateList); +} catch (Exception $e) { + echo 'Exception when calling ListsApi->updateList: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **listId** | **int**| Id of the list | + **updateList** | [**\Brevo\Client\Model\UpdateList**](../Model/UpdateList.md)| Values to update a list | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + diff --git a/vendor/getbrevo/brevo-php/docs/Api/MasterAccountApi.md b/vendor/getbrevo/brevo-php/docs/Api/MasterAccountApi.md new file mode 100644 index 0000000..a561e9c --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Api/MasterAccountApi.md @@ -0,0 +1,961 @@ +# Brevo\Client\MasterAccountApi + +All URIs are relative to *https://api.brevo.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**corporateGroupIdPut**](MasterAccountApi.md#corporateGroupIdPut) | **PUT** /corporate/group/{id} | Update a group of sub-accounts +[**corporateGroupPost**](MasterAccountApi.md#corporateGroupPost) | **POST** /corporate/group | Create a new group of sub-accounts +[**corporateMasterAccountGet**](MasterAccountApi.md#corporateMasterAccountGet) | **GET** /corporate/masterAccount | Get the details of requested master account +[**corporateSubAccountGet**](MasterAccountApi.md#corporateSubAccountGet) | **GET** /corporate/subAccount | Get the list of all the sub-accounts of the master account. +[**corporateSubAccountIdApplicationsTogglePut**](MasterAccountApi.md#corporateSubAccountIdApplicationsTogglePut) | **PUT** /corporate/subAccount/{id}/applications/toggle | Enable/disable sub-account application(s) +[**corporateSubAccountIdDelete**](MasterAccountApi.md#corporateSubAccountIdDelete) | **DELETE** /corporate/subAccount/{id} | Delete a sub-account +[**corporateSubAccountIdGet**](MasterAccountApi.md#corporateSubAccountIdGet) | **GET** /corporate/subAccount/{id} | Get sub-account details +[**corporateSubAccountIdPlanPut**](MasterAccountApi.md#corporateSubAccountIdPlanPut) | **PUT** /corporate/subAccount/{id}/plan | Update sub-account plan +[**corporateSubAccountKeyPost**](MasterAccountApi.md#corporateSubAccountKeyPost) | **POST** /corporate/subAccount/key | Create an API key for a sub-account +[**corporateSubAccountPost**](MasterAccountApi.md#corporateSubAccountPost) | **POST** /corporate/subAccount | Create a new sub-account under a master account. +[**corporateSubAccountSsoTokenPost**](MasterAccountApi.md#corporateSubAccountSsoTokenPost) | **POST** /corporate/subAccount/ssoToken | Generate SSO token to access Brevo +[**corporateUserRevokeEmailDelete**](MasterAccountApi.md#corporateUserRevokeEmailDelete) | **DELETE** /corporate/user/revoke/{email} | Revoke an admin user +[**getAccountActivity**](MasterAccountApi.md#getAccountActivity) | **GET** /organization/activities | Get user activity logs +[**getCorporateInvitedUsersList**](MasterAccountApi.md#getCorporateInvitedUsersList) | **GET** /corporate/invited/users | Get the list of all admin users +[**getSubAccountGroups**](MasterAccountApi.md#getSubAccountGroups) | **GET** /corporate/groups | Get the list of groups +[**inviteAdminUser**](MasterAccountApi.md#inviteAdminUser) | **POST** /corporate/user/invitation/send | Send invitation to an admin user + + +# **corporateGroupIdPut** +> corporateGroupIdPut($id, $body) + +Update a group of sub-accounts + +This endpoint allows you to update a group of sub-accounts + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\MasterAccountApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = "id_example"; // string | Id of the group +$body = new \Brevo\Client\Model\Body1(); // \Brevo\Client\Model\Body1 | Group details to be updated. + +try { + $apiInstance->corporateGroupIdPut($id, $body); +} catch (Exception $e) { + echo 'Exception when calling MasterAccountApi->corporateGroupIdPut: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| Id of the group | + **body** | [**\Brevo\Client\Model\Body1**](../Model/Body1.md)| Group details to be updated. | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **corporateGroupPost** +> \Brevo\Client\Model\InlineResponse201 corporateGroupPost($body) + +Create a new group of sub-accounts + +This endpoint allows to create a group of sub-accounts + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\MasterAccountApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$body = new \Brevo\Client\Model\Body(); // \Brevo\Client\Model\Body | Group details to be created. + +try { + $result = $apiInstance->corporateGroupPost($body); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling MasterAccountApi->corporateGroupPost: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**\Brevo\Client\Model\Body**](../Model/Body.md)| Group details to be created. | + +### Return type + +[**\Brevo\Client\Model\InlineResponse201**](../Model/InlineResponse201.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **corporateMasterAccountGet** +> \Brevo\Client\Model\MasterDetailsResponse corporateMasterAccountGet() + +Get the details of requested master account + +This endpoint will provide the details of the master account. + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\MasterAccountApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); + +try { + $result = $apiInstance->corporateMasterAccountGet(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling MasterAccountApi->corporateMasterAccountGet: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**\Brevo\Client\Model\MasterDetailsResponse**](../Model/MasterDetailsResponse.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **corporateSubAccountGet** +> \Brevo\Client\Model\SubAccountsResponse corporateSubAccountGet($offset, $limit) + +Get the list of all the sub-accounts of the master account. + +This endpoint will provide the list all the sub-accounts of the master account. + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\MasterAccountApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$offset = 56; // int | Index of the first sub-account in the page +$limit = 56; // int | Number of sub-accounts to be displayed on each page + +try { + $result = $apiInstance->corporateSubAccountGet($offset, $limit); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling MasterAccountApi->corporateSubAccountGet: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **offset** | **int**| Index of the first sub-account in the page | + **limit** | **int**| Number of sub-accounts to be displayed on each page | + +### Return type + +[**\Brevo\Client\Model\SubAccountsResponse**](../Model/SubAccountsResponse.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **corporateSubAccountIdApplicationsTogglePut** +> corporateSubAccountIdApplicationsTogglePut($id, $toggleApplications) + +Enable/disable sub-account application(s) + +API endpoint for the Corporate owner to enable/disable applications on the sub-account + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\MasterAccountApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = 789; // int | Id of the sub-account organization (mandatory) +$toggleApplications = new \Brevo\Client\Model\SubAccountAppsToggleRequest(); // \Brevo\Client\Model\SubAccountAppsToggleRequest | List of applications to activate or deactivate on a sub-account + +try { + $apiInstance->corporateSubAccountIdApplicationsTogglePut($id, $toggleApplications); +} catch (Exception $e) { + echo 'Exception when calling MasterAccountApi->corporateSubAccountIdApplicationsTogglePut: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Id of the sub-account organization (mandatory) | + **toggleApplications** | [**\Brevo\Client\Model\SubAccountAppsToggleRequest**](../Model/SubAccountAppsToggleRequest.md)| List of applications to activate or deactivate on a sub-account | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **corporateSubAccountIdDelete** +> corporateSubAccountIdDelete($id) + +Delete a sub-account + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\MasterAccountApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = 789; // int | Id of the sub-account organization to be deleted + +try { + $apiInstance->corporateSubAccountIdDelete($id); +} catch (Exception $e) { + echo 'Exception when calling MasterAccountApi->corporateSubAccountIdDelete: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Id of the sub-account organization to be deleted | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **corporateSubAccountIdGet** +> \Brevo\Client\Model\SubAccountDetailsResponse corporateSubAccountIdGet($id) + +Get sub-account details + +This endpoint will provide the details for the specified sub-account company + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\MasterAccountApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = 789; // int | Id of the sub-account organization + +try { + $result = $apiInstance->corporateSubAccountIdGet($id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling MasterAccountApi->corporateSubAccountIdGet: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Id of the sub-account organization | + +### Return type + +[**\Brevo\Client\Model\SubAccountDetailsResponse**](../Model/SubAccountDetailsResponse.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **corporateSubAccountIdPlanPut** +> corporateSubAccountIdPlanPut($id, $updatePlanDetails) + +Update sub-account plan + +This endpoint will update the sub-account plan + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\MasterAccountApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = 789; // int | Id of the sub-account organization +$updatePlanDetails = new \Brevo\Client\Model\SubAccountUpdatePlanRequest(); // \Brevo\Client\Model\SubAccountUpdatePlanRequest | Values to update a sub-account plan + +try { + $apiInstance->corporateSubAccountIdPlanPut($id, $updatePlanDetails); +} catch (Exception $e) { + echo 'Exception when calling MasterAccountApi->corporateSubAccountIdPlanPut: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Id of the sub-account organization | + **updatePlanDetails** | [**\Brevo\Client\Model\SubAccountUpdatePlanRequest**](../Model/SubAccountUpdatePlanRequest.md)| Values to update a sub-account plan | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **corporateSubAccountKeyPost** +> \Brevo\Client\Model\CreateApiKeyResponse corporateSubAccountKeyPost($createApiKeyRequest) + +Create an API key for a sub-account + +This endpoint will generate an API v3 key for a sub account + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\MasterAccountApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$createApiKeyRequest = new \Brevo\Client\Model\CreateApiKeyRequest(); // \Brevo\Client\Model\CreateApiKeyRequest | Values to generate API key for sub-account + +try { + $result = $apiInstance->corporateSubAccountKeyPost($createApiKeyRequest); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling MasterAccountApi->corporateSubAccountKeyPost: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createApiKeyRequest** | [**\Brevo\Client\Model\CreateApiKeyRequest**](../Model/CreateApiKeyRequest.md)| Values to generate API key for sub-account | + +### Return type + +[**\Brevo\Client\Model\CreateApiKeyResponse**](../Model/CreateApiKeyResponse.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **corporateSubAccountPost** +> \Brevo\Client\Model\CreateSubAccountResponse corporateSubAccountPost($subAccountCreate) + +Create a new sub-account under a master account. + +This endpoint will create a new sub-account under a master account + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\MasterAccountApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$subAccountCreate = new \Brevo\Client\Model\CreateSubAccount(); // \Brevo\Client\Model\CreateSubAccount | values to create new sub-account + +try { + $result = $apiInstance->corporateSubAccountPost($subAccountCreate); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling MasterAccountApi->corporateSubAccountPost: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **subAccountCreate** | [**\Brevo\Client\Model\CreateSubAccount**](../Model/CreateSubAccount.md)| values to create new sub-account | + +### Return type + +[**\Brevo\Client\Model\CreateSubAccountResponse**](../Model/CreateSubAccountResponse.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **corporateSubAccountSsoTokenPost** +> \Brevo\Client\Model\GetSsoToken corporateSubAccountSsoTokenPost($ssoTokenRequest) + +Generate SSO token to access Brevo + +This endpoint generates an sso token to authenticate and access a sub-account of the master using the account endpoint https://account-app.brevo.com/account/login/sub-account/sso/[token], where [token] will be replaced by the actual token. + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\MasterAccountApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$ssoTokenRequest = new \Brevo\Client\Model\SsoTokenRequest(); // \Brevo\Client\Model\SsoTokenRequest | Values to generate SSO token for sub-account + +try { + $result = $apiInstance->corporateSubAccountSsoTokenPost($ssoTokenRequest); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling MasterAccountApi->corporateSubAccountSsoTokenPost: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ssoTokenRequest** | [**\Brevo\Client\Model\SsoTokenRequest**](../Model/SsoTokenRequest.md)| Values to generate SSO token for sub-account | + +### Return type + +[**\Brevo\Client\Model\GetSsoToken**](../Model/GetSsoToken.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **corporateUserRevokeEmailDelete** +> corporateUserRevokeEmailDelete($email) + +Revoke an admin user + +This endpoint allows to revoke/remove an invited member of your Admin account + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\MasterAccountApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$email = "email_example"; // string | Email of the invited user + +try { + $apiInstance->corporateUserRevokeEmailDelete($email); +} catch (Exception $e) { + echo 'Exception when calling MasterAccountApi->corporateUserRevokeEmailDelete: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **string**| Email of the invited user | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getAccountActivity** +> \Brevo\Client\Model\GetAccountActivity getAccountActivity($startDate, $endDate, $limit, $offset) + +Get user activity logs + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\MasterAccountApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$startDate = "startDate_example"; // string | Mandatory if endDate is used. Enter start date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. Additionally, you can retrieve activity logs from the past 12 months from the date of your search. +$endDate = "endDate_example"; // string | Mandatory if startDate is used. Enter end date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. +$limit = 10; // int | Number of documents per page +$offset = 0; // int | Index of the first document in the page. + +try { + $result = $apiInstance->getAccountActivity($startDate, $endDate, $limit, $offset); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling MasterAccountApi->getAccountActivity: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **startDate** | **string**| Mandatory if endDate is used. Enter start date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. Additionally, you can retrieve activity logs from the past 12 months from the date of your search. | [optional] + **endDate** | **string**| Mandatory if startDate is used. Enter end date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. | [optional] + **limit** | **int**| Number of documents per page | [optional] [default to 10] + **offset** | **int**| Index of the first document in the page. | [optional] [default to 0] + +### Return type + +[**\Brevo\Client\Model\GetAccountActivity**](../Model/GetAccountActivity.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getCorporateInvitedUsersList** +> \Brevo\Client\Model\GetCorporateInvitedUsersList getCorporateInvitedUsersList() + +Get the list of all admin users + +This endpoint allows you to list all Admin users of your Admin account + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\MasterAccountApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); + +try { + $result = $apiInstance->getCorporateInvitedUsersList(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling MasterAccountApi->getCorporateInvitedUsersList: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**\Brevo\Client\Model\GetCorporateInvitedUsersList**](../Model/GetCorporateInvitedUsersList.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getSubAccountGroups** +> \Brevo\Client\Model\InlineResponse200[] getSubAccountGroups() + +Get the list of groups + +This endpoint allows you to list all groups created on your Admin account. + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\MasterAccountApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); + +try { + $result = $apiInstance->getSubAccountGroups(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling MasterAccountApi->getSubAccountGroups: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**\Brevo\Client\Model\InlineResponse200[]**](../Model/InlineResponse200.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **inviteAdminUser** +> \Brevo\Client\Model\InviteAdminUser inviteAdminUser($sendInvitation) + +Send invitation to an admin user + +`This endpoint allows you to invite a member to manage the Admin account Features and their respective permissions are as below: - `my_plan`: - \"all\" - `api`: - \"none\" - `user_management`: - \"all\" - `app_management` | Not available in ENTv2: - \"all\" **Note**: - If `all_features_access: false` then only privileges are required otherwise if `true` then it's assumed that all permissions will be there for the invited admin user. + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\MasterAccountApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$sendInvitation = new \Brevo\Client\Model\InviteAdminUser(); // \Brevo\Client\Model\InviteAdminUser | Payload to send an invitation + +try { + $result = $apiInstance->inviteAdminUser($sendInvitation); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling MasterAccountApi->inviteAdminUser: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sendInvitation** | [**\Brevo\Client\Model\InviteAdminUser**](../Model/InviteAdminUser.md)| Payload to send an invitation | + +### Return type + +[**\Brevo\Client\Model\InviteAdminUser**](../Model/InviteAdminUser.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + diff --git a/vendor/getbrevo/brevo-php/docs/Api/NotesApi.md b/vendor/getbrevo/brevo-php/docs/Api/NotesApi.md new file mode 100644 index 0000000..ca8e332 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Api/NotesApi.md @@ -0,0 +1,310 @@ +# Brevo\Client\NotesApi + +All URIs are relative to *https://api.brevo.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**crmNotesGet**](NotesApi.md#crmNotesGet) | **GET** /crm/notes | Get all notes +[**crmNotesIdDelete**](NotesApi.md#crmNotesIdDelete) | **DELETE** /crm/notes/{id} | Delete a note +[**crmNotesIdGet**](NotesApi.md#crmNotesIdGet) | **GET** /crm/notes/{id} | Get a note +[**crmNotesIdPatch**](NotesApi.md#crmNotesIdPatch) | **PATCH** /crm/notes/{id} | Update a note +[**crmNotesPost**](NotesApi.md#crmNotesPost) | **POST** /crm/notes | Create a note + + +# **crmNotesGet** +> \Brevo\Client\Model\NoteList crmNotesGet($entity, $entityIds, $dateFrom, $dateTo, $offset, $limit, $sort) + +Get all notes + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\NotesApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$entity = "entity_example"; // string | Filter by note entity type +$entityIds = "entityIds_example"; // string | Filter by note entity IDs +$dateFrom = 56; // int | dateFrom to date range filter type (timestamp in milliseconds) +$dateTo = 56; // int | dateTo to date range filter type (timestamp in milliseconds) +$offset = 789; // int | Index of the first document of the page +$limit = 50; // int | Number of documents per page +$sort = "sort_example"; // string | Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed + +try { + $result = $apiInstance->crmNotesGet($entity, $entityIds, $dateFrom, $dateTo, $offset, $limit, $sort); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling NotesApi->crmNotesGet: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **entity** | **string**| Filter by note entity type | [optional] + **entityIds** | **string**| Filter by note entity IDs | [optional] + **dateFrom** | **int**| dateFrom to date range filter type (timestamp in milliseconds) | [optional] + **dateTo** | **int**| dateTo to date range filter type (timestamp in milliseconds) | [optional] + **offset** | **int**| Index of the first document of the page | [optional] + **limit** | **int**| Number of documents per page | [optional] [default to 50] + **sort** | **string**| Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed | [optional] + +### Return type + +[**\Brevo\Client\Model\NoteList**](../Model/NoteList.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **crmNotesIdDelete** +> crmNotesIdDelete($id) + +Delete a note + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\NotesApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = "id_example"; // string | Note ID to delete + +try { + $apiInstance->crmNotesIdDelete($id); +} catch (Exception $e) { + echo 'Exception when calling NotesApi->crmNotesIdDelete: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| Note ID to delete | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **crmNotesIdGet** +> \Brevo\Client\Model\Note crmNotesIdGet($id) + +Get a note + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\NotesApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = "id_example"; // string | Note ID to get + +try { + $result = $apiInstance->crmNotesIdGet($id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling NotesApi->crmNotesIdGet: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| Note ID to get | + +### Return type + +[**\Brevo\Client\Model\Note**](../Model/Note.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **crmNotesIdPatch** +> crmNotesIdPatch($id, $body) + +Update a note + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\NotesApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = "id_example"; // string | Note ID to update +$body = new \Brevo\Client\Model\NoteData(); // \Brevo\Client\Model\NoteData | Note data to update a note + +try { + $apiInstance->crmNotesIdPatch($id, $body); +} catch (Exception $e) { + echo 'Exception when calling NotesApi->crmNotesIdPatch: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| Note ID to update | + **body** | [**\Brevo\Client\Model\NoteData**](../Model/NoteData.md)| Note data to update a note | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **crmNotesPost** +> \Brevo\Client\Model\NoteId crmNotesPost($body) + +Create a note + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\NotesApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$body = new \Brevo\Client\Model\NoteData(); // \Brevo\Client\Model\NoteData | Note data to create a note. + +try { + $result = $apiInstance->crmNotesPost($body); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling NotesApi->crmNotesPost: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**\Brevo\Client\Model\NoteData**](../Model/NoteData.md)| Note data to create a note. | + +### Return type + +[**\Brevo\Client\Model\NoteId**](../Model/NoteId.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + diff --git a/vendor/getbrevo/brevo-php/docs/Api/ProcessApi.md b/vendor/getbrevo/brevo-php/docs/Api/ProcessApi.md new file mode 100644 index 0000000..8e37af7 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Api/ProcessApi.md @@ -0,0 +1,128 @@ +# Brevo\Client\ProcessApi + +All URIs are relative to *https://api.brevo.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getProcess**](ProcessApi.md#getProcess) | **GET** /processes/{processId} | Return the informations for a process +[**getProcesses**](ProcessApi.md#getProcesses) | **GET** /processes | Return all the processes for your account + + +# **getProcess** +> \Brevo\Client\Model\GetProcess getProcess($processId) + +Return the informations for a process + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ProcessApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$processId = 789; // int | Id of the process + +try { + $result = $apiInstance->getProcess($processId); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ProcessApi->getProcess: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **processId** | **int**| Id of the process | + +### Return type + +[**\Brevo\Client\Model\GetProcess**](../Model/GetProcess.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getProcesses** +> \Brevo\Client\Model\GetProcesses getProcesses($limit, $offset, $sort) + +Return all the processes for your account + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ProcessApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$limit = 10; // int | Number limitation for the result returned +$offset = 0; // int | Beginning point in the list to retrieve from. +$sort = "desc"; // string | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + +try { + $result = $apiInstance->getProcesses($limit, $offset, $sort); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ProcessApi->getProcesses: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| Number limitation for the result returned | [optional] [default to 10] + **offset** | **int**| Beginning point in the list to retrieve from. | [optional] [default to 0] + **sort** | **string**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [optional] [default to desc] + +### Return type + +[**\Brevo\Client\Model\GetProcesses**](../Model/GetProcesses.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + diff --git a/vendor/getbrevo/brevo-php/docs/Api/ResellerApi.md b/vendor/getbrevo/brevo-php/docs/Api/ResellerApi.md new file mode 100644 index 0000000..8504edf --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Api/ResellerApi.md @@ -0,0 +1,952 @@ +# Brevo\Client\ResellerApi + +All URIs are relative to *https://api.brevo.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addCredits**](ResellerApi.md#addCredits) | **POST** /reseller/children/{childIdentifier}/credits/add | Add Email and/or SMS credits to a specific child account +[**associateIpToChild**](ResellerApi.md#associateIpToChild) | **POST** /reseller/children/{childIdentifier}/ips/associate | Associate a dedicated IP to the child +[**createChildDomain**](ResellerApi.md#createChildDomain) | **POST** /reseller/children/{childIdentifier}/domains | Create a domain for a child account +[**createResellerChild**](ResellerApi.md#createResellerChild) | **POST** /reseller/children | Creates a reseller child +[**deleteChildDomain**](ResellerApi.md#deleteChildDomain) | **DELETE** /reseller/children/{childIdentifier}/domains/{domainName} | Delete the sender domain of the reseller child based on the childIdentifier and domainName passed +[**deleteResellerChild**](ResellerApi.md#deleteResellerChild) | **DELETE** /reseller/children/{childIdentifier} | Delete a single reseller child based on the child identifier supplied +[**dissociateIpFromChild**](ResellerApi.md#dissociateIpFromChild) | **POST** /reseller/children/{childIdentifier}/ips/dissociate | Dissociate a dedicated IP to the child +[**getChildAccountCreationStatus**](ResellerApi.md#getChildAccountCreationStatus) | **GET** /reseller/children/{childIdentifier}/accountCreationStatus | Get the status of a reseller's child account creation, whether it is successfully created (exists) or not based on the identifier supplied +[**getChildDomains**](ResellerApi.md#getChildDomains) | **GET** /reseller/children/{childIdentifier}/domains | Get all sender domains for a specific child account +[**getChildInfo**](ResellerApi.md#getChildInfo) | **GET** /reseller/children/{childIdentifier} | Get a child account's details +[**getResellerChilds**](ResellerApi.md#getResellerChilds) | **GET** /reseller/children | Get the list of all children accounts +[**getSsoToken**](ResellerApi.md#getSsoToken) | **GET** /reseller/children/{childIdentifier}/auth | Get session token to access Brevo (SSO) +[**removeCredits**](ResellerApi.md#removeCredits) | **POST** /reseller/children/{childIdentifier}/credits/remove | Remove Email and/or SMS credits from a specific child account +[**updateChildAccountStatus**](ResellerApi.md#updateChildAccountStatus) | **PUT** /reseller/children/{childIdentifier}/accountStatus | Update info of reseller's child account status based on the childIdentifier supplied +[**updateChildDomain**](ResellerApi.md#updateChildDomain) | **PUT** /reseller/children/{childIdentifier}/domains/{domainName} | Update the sender domain of reseller's child based on the childIdentifier and domainName passed +[**updateResellerChild**](ResellerApi.md#updateResellerChild) | **PUT** /reseller/children/{childIdentifier} | Update info of reseller's child based on the child identifier supplied + + +# **addCredits** +> \Brevo\Client\Model\RemainingCreditModel addCredits($childIdentifier, $addCredits) + +Add Email and/or SMS credits to a specific child account + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ResellerApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$childIdentifier = "childIdentifier_example"; // string | Either auth key or id of reseller's child +$addCredits = new \Brevo\Client\Model\AddCredits(); // \Brevo\Client\Model\AddCredits | Values to post to add credit to a specific child account + +try { + $result = $apiInstance->addCredits($childIdentifier, $addCredits); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ResellerApi->addCredits: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **childIdentifier** | **string**| Either auth key or id of reseller's child | + **addCredits** | [**\Brevo\Client\Model\AddCredits**](../Model/AddCredits.md)| Values to post to add credit to a specific child account | + +### Return type + +[**\Brevo\Client\Model\RemainingCreditModel**](../Model/RemainingCreditModel.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **associateIpToChild** +> associateIpToChild($childIdentifier, $ip) + +Associate a dedicated IP to the child + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ResellerApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$childIdentifier = "childIdentifier_example"; // string | Either auth key or id of reseller's child +$ip = new \Brevo\Client\Model\ManageIp(); // \Brevo\Client\Model\ManageIp | IP to associate + +try { + $apiInstance->associateIpToChild($childIdentifier, $ip); +} catch (Exception $e) { + echo 'Exception when calling ResellerApi->associateIpToChild: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **childIdentifier** | **string**| Either auth key or id of reseller's child | + **ip** | [**\Brevo\Client\Model\ManageIp**](../Model/ManageIp.md)| IP to associate | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **createChildDomain** +> createChildDomain($childIdentifier, $addChildDomain) + +Create a domain for a child account + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ResellerApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$childIdentifier = "childIdentifier_example"; // string | Either auth key or id of reseller's child +$addChildDomain = new \Brevo\Client\Model\AddChildDomain(); // \Brevo\Client\Model\AddChildDomain | Sender domain to add for a specific child account. This will not be displayed to the parent account. + +try { + $apiInstance->createChildDomain($childIdentifier, $addChildDomain); +} catch (Exception $e) { + echo 'Exception when calling ResellerApi->createChildDomain: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **childIdentifier** | **string**| Either auth key or id of reseller's child | + **addChildDomain** | [**\Brevo\Client\Model\AddChildDomain**](../Model/AddChildDomain.md)| Sender domain to add for a specific child account. This will not be displayed to the parent account. | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **createResellerChild** +> \Brevo\Client\Model\CreateReseller createResellerChild($resellerChild) + +Creates a reseller child + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ResellerApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$resellerChild = new \Brevo\Client\Model\CreateChild(); // \Brevo\Client\Model\CreateChild | reseller child to add + +try { + $result = $apiInstance->createResellerChild($resellerChild); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ResellerApi->createResellerChild: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **resellerChild** | [**\Brevo\Client\Model\CreateChild**](../Model/CreateChild.md)| reseller child to add | [optional] + +### Return type + +[**\Brevo\Client\Model\CreateReseller**](../Model/CreateReseller.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **deleteChildDomain** +> deleteChildDomain($childIdentifier, $domainName) + +Delete the sender domain of the reseller child based on the childIdentifier and domainName passed + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ResellerApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$childIdentifier = "childIdentifier_example"; // string | Either auth key or id of reseller's child +$domainName = "domainName_example"; // string | Pass the existing domain that needs to be deleted + +try { + $apiInstance->deleteChildDomain($childIdentifier, $domainName); +} catch (Exception $e) { + echo 'Exception when calling ResellerApi->deleteChildDomain: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **childIdentifier** | **string**| Either auth key or id of reseller's child | + **domainName** | **string**| Pass the existing domain that needs to be deleted | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **deleteResellerChild** +> deleteResellerChild($childIdentifier) + +Delete a single reseller child based on the child identifier supplied + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ResellerApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$childIdentifier = "childIdentifier_example"; // string | Either auth key or child id of reseller's child + +try { + $apiInstance->deleteResellerChild($childIdentifier); +} catch (Exception $e) { + echo 'Exception when calling ResellerApi->deleteResellerChild: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **childIdentifier** | **string**| Either auth key or child id of reseller's child | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **dissociateIpFromChild** +> dissociateIpFromChild($childIdentifier, $ip) + +Dissociate a dedicated IP to the child + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ResellerApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$childIdentifier = "childIdentifier_example"; // string | Either auth key or id of reseller's child +$ip = new \Brevo\Client\Model\ManageIp(); // \Brevo\Client\Model\ManageIp | IP to dissociate + +try { + $apiInstance->dissociateIpFromChild($childIdentifier, $ip); +} catch (Exception $e) { + echo 'Exception when calling ResellerApi->dissociateIpFromChild: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **childIdentifier** | **string**| Either auth key or id of reseller's child | + **ip** | [**\Brevo\Client\Model\ManageIp**](../Model/ManageIp.md)| IP to dissociate | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getChildAccountCreationStatus** +> \Brevo\Client\Model\GetChildAccountCreationStatus getChildAccountCreationStatus($childIdentifier) + +Get the status of a reseller's child account creation, whether it is successfully created (exists) or not based on the identifier supplied + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ResellerApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$childIdentifier = "childIdentifier_example"; // string | Either auth key or id of reseller's child + +try { + $result = $apiInstance->getChildAccountCreationStatus($childIdentifier); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ResellerApi->getChildAccountCreationStatus: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **childIdentifier** | **string**| Either auth key or id of reseller's child | + +### Return type + +[**\Brevo\Client\Model\GetChildAccountCreationStatus**](../Model/GetChildAccountCreationStatus.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getChildDomains** +> \Brevo\Client\Model\GetChildDomains getChildDomains($childIdentifier) + +Get all sender domains for a specific child account + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ResellerApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$childIdentifier = "childIdentifier_example"; // string | Either auth key or id of reseller's child + +try { + $result = $apiInstance->getChildDomains($childIdentifier); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ResellerApi->getChildDomains: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **childIdentifier** | **string**| Either auth key or id of reseller's child | + +### Return type + +[**\Brevo\Client\Model\GetChildDomains**](../Model/GetChildDomains.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getChildInfo** +> \Brevo\Client\Model\GetChildInfo getChildInfo($childIdentifier) + +Get a child account's details + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ResellerApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$childIdentifier = "childIdentifier_example"; // string | Either auth key or id of reseller's child + +try { + $result = $apiInstance->getChildInfo($childIdentifier); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ResellerApi->getChildInfo: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **childIdentifier** | **string**| Either auth key or id of reseller's child | + +### Return type + +[**\Brevo\Client\Model\GetChildInfo**](../Model/GetChildInfo.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getResellerChilds** +> \Brevo\Client\Model\GetChildrenList getResellerChilds($limit, $offset) + +Get the list of all children accounts + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ResellerApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$limit = 10; // int | Number of documents for child accounts information per page +$offset = 0; // int | Index of the first document in the page + +try { + $result = $apiInstance->getResellerChilds($limit, $offset); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ResellerApi->getResellerChilds: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| Number of documents for child accounts information per page | [optional] [default to 10] + **offset** | **int**| Index of the first document in the page | [optional] [default to 0] + +### Return type + +[**\Brevo\Client\Model\GetChildrenList**](../Model/GetChildrenList.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getSsoToken** +> \Brevo\Client\Model\GetSsoToken getSsoToken($childIdentifier) + +Get session token to access Brevo (SSO) + +It returns a session [token] which will remain valid for a short period of time. A child account will be able to access a white-labeled section by using the following url pattern => https:/email.mydomain.com/login/sso?token=[token] + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ResellerApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$childIdentifier = "childIdentifier_example"; // string | Either auth key or id of reseller's child + +try { + $result = $apiInstance->getSsoToken($childIdentifier); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ResellerApi->getSsoToken: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **childIdentifier** | **string**| Either auth key or id of reseller's child | + +### Return type + +[**\Brevo\Client\Model\GetSsoToken**](../Model/GetSsoToken.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **removeCredits** +> \Brevo\Client\Model\RemainingCreditModel removeCredits($childIdentifier, $removeCredits) + +Remove Email and/or SMS credits from a specific child account + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ResellerApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$childIdentifier = "childIdentifier_example"; // string | Either auth key or id of reseller's child +$removeCredits = new \Brevo\Client\Model\RemoveCredits(); // \Brevo\Client\Model\RemoveCredits | Values to post to remove email or SMS credits from a specific child account + +try { + $result = $apiInstance->removeCredits($childIdentifier, $removeCredits); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ResellerApi->removeCredits: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **childIdentifier** | **string**| Either auth key or id of reseller's child | + **removeCredits** | [**\Brevo\Client\Model\RemoveCredits**](../Model/RemoveCredits.md)| Values to post to remove email or SMS credits from a specific child account | + +### Return type + +[**\Brevo\Client\Model\RemainingCreditModel**](../Model/RemainingCreditModel.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **updateChildAccountStatus** +> updateChildAccountStatus($childIdentifier, $updateChildAccountStatus) + +Update info of reseller's child account status based on the childIdentifier supplied + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ResellerApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$childIdentifier = "childIdentifier_example"; // string | Either auth key or id of reseller's child +$updateChildAccountStatus = new \Brevo\Client\Model\UpdateChildAccountStatus(); // \Brevo\Client\Model\UpdateChildAccountStatus | values to update in child account status + +try { + $apiInstance->updateChildAccountStatus($childIdentifier, $updateChildAccountStatus); +} catch (Exception $e) { + echo 'Exception when calling ResellerApi->updateChildAccountStatus: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **childIdentifier** | **string**| Either auth key or id of reseller's child | + **updateChildAccountStatus** | [**\Brevo\Client\Model\UpdateChildAccountStatus**](../Model/UpdateChildAccountStatus.md)| values to update in child account status | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **updateChildDomain** +> updateChildDomain($childIdentifier, $domainName, $updateChildDomain) + +Update the sender domain of reseller's child based on the childIdentifier and domainName passed + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ResellerApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$childIdentifier = "childIdentifier_example"; // string | Either auth key or id of reseller's child +$domainName = "domainName_example"; // string | Pass the existing domain that needs to be updated +$updateChildDomain = new \Brevo\Client\Model\UpdateChildDomain(); // \Brevo\Client\Model\UpdateChildDomain | value to update for sender domain + +try { + $apiInstance->updateChildDomain($childIdentifier, $domainName, $updateChildDomain); +} catch (Exception $e) { + echo 'Exception when calling ResellerApi->updateChildDomain: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **childIdentifier** | **string**| Either auth key or id of reseller's child | + **domainName** | **string**| Pass the existing domain that needs to be updated | + **updateChildDomain** | [**\Brevo\Client\Model\UpdateChildDomain**](../Model/UpdateChildDomain.md)| value to update for sender domain | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **updateResellerChild** +> updateResellerChild($childIdentifier, $resellerChild) + +Update info of reseller's child based on the child identifier supplied + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\ResellerApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$childIdentifier = "childIdentifier_example"; // string | Either auth key or id of reseller's child +$resellerChild = new \Brevo\Client\Model\UpdateChild(); // \Brevo\Client\Model\UpdateChild | values to update in child profile + +try { + $apiInstance->updateResellerChild($childIdentifier, $resellerChild); +} catch (Exception $e) { + echo 'Exception when calling ResellerApi->updateResellerChild: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **childIdentifier** | **string**| Either auth key or id of reseller's child | + **resellerChild** | [**\Brevo\Client\Model\UpdateChild**](../Model/UpdateChild.md)| values to update in child profile | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + diff --git a/vendor/getbrevo/brevo-php/docs/Api/SMSCampaignsApi.md b/vendor/getbrevo/brevo-php/docs/Api/SMSCampaignsApi.md new file mode 100644 index 0000000..ac37a41 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Api/SMSCampaignsApi.md @@ -0,0 +1,606 @@ +# Brevo\Client\SMSCampaignsApi + +All URIs are relative to *https://api.brevo.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createSmsCampaign**](SMSCampaignsApi.md#createSmsCampaign) | **POST** /smsCampaigns | Creates an SMS campaign +[**deleteSmsCampaign**](SMSCampaignsApi.md#deleteSmsCampaign) | **DELETE** /smsCampaigns/{campaignId} | Delete an SMS campaign +[**getSmsCampaign**](SMSCampaignsApi.md#getSmsCampaign) | **GET** /smsCampaigns/{campaignId} | Get an SMS campaign +[**getSmsCampaigns**](SMSCampaignsApi.md#getSmsCampaigns) | **GET** /smsCampaigns | Returns the information for all your created SMS campaigns +[**requestSmsRecipientExport**](SMSCampaignsApi.md#requestSmsRecipientExport) | **POST** /smsCampaigns/{campaignId}/exportRecipients | Export an SMS campaign's recipients +[**sendSmsCampaignNow**](SMSCampaignsApi.md#sendSmsCampaignNow) | **POST** /smsCampaigns/{campaignId}/sendNow | Send your SMS campaign immediately +[**sendSmsReport**](SMSCampaignsApi.md#sendSmsReport) | **POST** /smsCampaigns/{campaignId}/sendReport | Send an SMS campaign's report +[**sendTestSms**](SMSCampaignsApi.md#sendTestSms) | **POST** /smsCampaigns/{campaignId}/sendTest | Send a test SMS campaign +[**updateSmsCampaign**](SMSCampaignsApi.md#updateSmsCampaign) | **PUT** /smsCampaigns/{campaignId} | Update an SMS campaign +[**updateSmsCampaignStatus**](SMSCampaignsApi.md#updateSmsCampaignStatus) | **PUT** /smsCampaigns/{campaignId}/status | Update a campaign's status + + +# **createSmsCampaign** +> \Brevo\Client\Model\CreateModel createSmsCampaign($createSmsCampaign) + +Creates an SMS campaign + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\SMSCampaignsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$createSmsCampaign = new \Brevo\Client\Model\CreateSmsCampaign(); // \Brevo\Client\Model\CreateSmsCampaign | Values to create an SMS Campaign + +try { + $result = $apiInstance->createSmsCampaign($createSmsCampaign); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling SMSCampaignsApi->createSmsCampaign: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createSmsCampaign** | [**\Brevo\Client\Model\CreateSmsCampaign**](../Model/CreateSmsCampaign.md)| Values to create an SMS Campaign | + +### Return type + +[**\Brevo\Client\Model\CreateModel**](../Model/CreateModel.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **deleteSmsCampaign** +> deleteSmsCampaign($campaignId) + +Delete an SMS campaign + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\SMSCampaignsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$campaignId = 789; // int | id of the SMS campaign + +try { + $apiInstance->deleteSmsCampaign($campaignId); +} catch (Exception $e) { + echo 'Exception when calling SMSCampaignsApi->deleteSmsCampaign: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **int**| id of the SMS campaign | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getSmsCampaign** +> \Brevo\Client\Model\GetSmsCampaign getSmsCampaign($campaignId) + +Get an SMS campaign + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\SMSCampaignsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$campaignId = 789; // int | id of the SMS campaign + +try { + $result = $apiInstance->getSmsCampaign($campaignId); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling SMSCampaignsApi->getSmsCampaign: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **int**| id of the SMS campaign | + +### Return type + +[**\Brevo\Client\Model\GetSmsCampaign**](../Model/GetSmsCampaign.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getSmsCampaigns** +> \Brevo\Client\Model\GetSmsCampaigns getSmsCampaigns($status, $startDate, $endDate, $limit, $offset, $sort) + +Returns the information for all your created SMS campaigns + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\SMSCampaignsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$status = "status_example"; // string | Status of campaign. +$startDate = "startDate_example"; // string | Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) +$endDate = "endDate_example"; // string | Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) +$limit = 500; // int | Number limitation for the result returned +$offset = 0; // int | Beginning point in the list to retrieve from. +$sort = "desc"; // string | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + +try { + $result = $apiInstance->getSmsCampaigns($status, $startDate, $endDate, $limit, $offset, $sort); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling SMSCampaignsApi->getSmsCampaigns: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | **string**| Status of campaign. | [optional] + **startDate** | **string**| Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) | [optional] + **endDate** | **string**| Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) | [optional] + **limit** | **int**| Number limitation for the result returned | [optional] [default to 500] + **offset** | **int**| Beginning point in the list to retrieve from. | [optional] [default to 0] + **sort** | **string**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [optional] [default to desc] + +### Return type + +[**\Brevo\Client\Model\GetSmsCampaigns**](../Model/GetSmsCampaigns.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **requestSmsRecipientExport** +> \Brevo\Client\Model\CreatedProcessId requestSmsRecipientExport($campaignId, $recipientExport) + +Export an SMS campaign's recipients + +It returns the background process ID which on completion calls the notify URL that you have set in the input. + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\SMSCampaignsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$campaignId = 789; // int | id of the campaign +$recipientExport = new \Brevo\Client\Model\RequestSmsRecipientExport(); // \Brevo\Client\Model\RequestSmsRecipientExport | Values to send for a recipient export request + +try { + $result = $apiInstance->requestSmsRecipientExport($campaignId, $recipientExport); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling SMSCampaignsApi->requestSmsRecipientExport: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **int**| id of the campaign | + **recipientExport** | [**\Brevo\Client\Model\RequestSmsRecipientExport**](../Model/RequestSmsRecipientExport.md)| Values to send for a recipient export request | [optional] + +### Return type + +[**\Brevo\Client\Model\CreatedProcessId**](../Model/CreatedProcessId.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **sendSmsCampaignNow** +> sendSmsCampaignNow($campaignId) + +Send your SMS campaign immediately + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\SMSCampaignsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$campaignId = 789; // int | id of the campaign + +try { + $apiInstance->sendSmsCampaignNow($campaignId); +} catch (Exception $e) { + echo 'Exception when calling SMSCampaignsApi->sendSmsCampaignNow: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **int**| id of the campaign | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **sendSmsReport** +> sendSmsReport($campaignId, $sendReport) + +Send an SMS campaign's report + +Send report of Sent and Archived campaign, to the specified email addresses, with respective data and a pdf attachment in detail. + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\SMSCampaignsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$campaignId = 789; // int | id of the campaign +$sendReport = new \Brevo\Client\Model\SendReport(); // \Brevo\Client\Model\SendReport | Values for send a report + +try { + $apiInstance->sendSmsReport($campaignId, $sendReport); +} catch (Exception $e) { + echo 'Exception when calling SMSCampaignsApi->sendSmsReport: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **int**| id of the campaign | + **sendReport** | [**\Brevo\Client\Model\SendReport**](../Model/SendReport.md)| Values for send a report | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **sendTestSms** +> sendTestSms($campaignId, $phoneNumber) + +Send a test SMS campaign + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\SMSCampaignsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$campaignId = 789; // int | Id of the SMS campaign +$phoneNumber = new \Brevo\Client\Model\SendTestSms(); // \Brevo\Client\Model\SendTestSms | Mobile number of the recipient with the country code. This number must belong to one of your contacts in Brevo account and must not be blacklisted + +try { + $apiInstance->sendTestSms($campaignId, $phoneNumber); +} catch (Exception $e) { + echo 'Exception when calling SMSCampaignsApi->sendTestSms: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **int**| Id of the SMS campaign | + **phoneNumber** | [**\Brevo\Client\Model\SendTestSms**](../Model/SendTestSms.md)| Mobile number of the recipient with the country code. This number must belong to one of your contacts in Brevo account and must not be blacklisted | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **updateSmsCampaign** +> updateSmsCampaign($campaignId, $updateSmsCampaign) + +Update an SMS campaign + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\SMSCampaignsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$campaignId = 789; // int | id of the SMS campaign +$updateSmsCampaign = new \Brevo\Client\Model\UpdateSmsCampaign(); // \Brevo\Client\Model\UpdateSmsCampaign | Values to update an SMS Campaign + +try { + $apiInstance->updateSmsCampaign($campaignId, $updateSmsCampaign); +} catch (Exception $e) { + echo 'Exception when calling SMSCampaignsApi->updateSmsCampaign: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **int**| id of the SMS campaign | + **updateSmsCampaign** | [**\Brevo\Client\Model\UpdateSmsCampaign**](../Model/UpdateSmsCampaign.md)| Values to update an SMS Campaign | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **updateSmsCampaignStatus** +> updateSmsCampaignStatus($campaignId, $status) + +Update a campaign's status + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\SMSCampaignsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$campaignId = 789; // int | id of the campaign +$status = new \Brevo\Client\Model\UpdateCampaignStatus(); // \Brevo\Client\Model\UpdateCampaignStatus | Status of the campaign. + +try { + $apiInstance->updateSmsCampaignStatus($campaignId, $status); +} catch (Exception $e) { + echo 'Exception when calling SMSCampaignsApi->updateSmsCampaignStatus: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **int**| id of the campaign | + **status** | [**\Brevo\Client\Model\UpdateCampaignStatus**](../Model/UpdateCampaignStatus.md)| Status of the campaign. | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + diff --git a/vendor/getbrevo/brevo-php/docs/Api/SendersApi.md b/vendor/getbrevo/brevo-php/docs/Api/SendersApi.md new file mode 100644 index 0000000..53a1e77 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Api/SendersApi.md @@ -0,0 +1,413 @@ +# Brevo\Client\SendersApi + +All URIs are relative to *https://api.brevo.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createSender**](SendersApi.md#createSender) | **POST** /senders | Create a new sender +[**deleteSender**](SendersApi.md#deleteSender) | **DELETE** /senders/{senderId} | Delete a sender +[**getIps**](SendersApi.md#getIps) | **GET** /senders/ips | Get all the dedicated IPs for your account +[**getIpsFromSender**](SendersApi.md#getIpsFromSender) | **GET** /senders/{senderId}/ips | Get all the dedicated IPs for a sender +[**getSenders**](SendersApi.md#getSenders) | **GET** /senders | Get the list of all your senders +[**updateSender**](SendersApi.md#updateSender) | **PUT** /senders/{senderId} | Update a sender +[**validateSenderByOTP**](SendersApi.md#validateSenderByOTP) | **PUT** /senders/{senderId}/validate | Update a sender + + +# **createSender** +> \Brevo\Client\Model\CreateSenderModel createSender($sender) + +Create a new sender + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\SendersApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$sender = new \Brevo\Client\Model\CreateSender(); // \Brevo\Client\Model\CreateSender | sender's name + +try { + $result = $apiInstance->createSender($sender); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling SendersApi->createSender: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sender** | [**\Brevo\Client\Model\CreateSender**](../Model/CreateSender.md)| sender's name | [optional] + +### Return type + +[**\Brevo\Client\Model\CreateSenderModel**](../Model/CreateSenderModel.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **deleteSender** +> deleteSender($senderId) + +Delete a sender + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\SendersApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$senderId = 789; // int | Id of the sender + +try { + $apiInstance->deleteSender($senderId); +} catch (Exception $e) { + echo 'Exception when calling SendersApi->deleteSender: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **senderId** | **int**| Id of the sender | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getIps** +> \Brevo\Client\Model\GetIps getIps() + +Get all the dedicated IPs for your account + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\SendersApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); + +try { + $result = $apiInstance->getIps(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling SendersApi->getIps: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**\Brevo\Client\Model\GetIps**](../Model/GetIps.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getIpsFromSender** +> \Brevo\Client\Model\GetIpsFromSender getIpsFromSender($senderId) + +Get all the dedicated IPs for a sender + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\SendersApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$senderId = 789; // int | Id of the sender + +try { + $result = $apiInstance->getIpsFromSender($senderId); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling SendersApi->getIpsFromSender: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **senderId** | **int**| Id of the sender | + +### Return type + +[**\Brevo\Client\Model\GetIpsFromSender**](../Model/GetIpsFromSender.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getSenders** +> \Brevo\Client\Model\GetSendersList getSenders($ip, $domain) + +Get the list of all your senders + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\SendersApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$ip = "ip_example"; // string | Filter your senders for a specific ip (available for dedicated IP usage only) +$domain = "domain_example"; // string | Filter your senders for a specific domain + +try { + $result = $apiInstance->getSenders($ip, $domain); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling SendersApi->getSenders: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ip** | **string**| Filter your senders for a specific ip (available for dedicated IP usage only) | [optional] + **domain** | **string**| Filter your senders for a specific domain | [optional] + +### Return type + +[**\Brevo\Client\Model\GetSendersList**](../Model/GetSendersList.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **updateSender** +> updateSender($senderId, $sender) + +Update a sender + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\SendersApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$senderId = 789; // int | Id of the sender +$sender = new \Brevo\Client\Model\UpdateSender(); // \Brevo\Client\Model\UpdateSender | sender's name + +try { + $apiInstance->updateSender($senderId, $sender); +} catch (Exception $e) { + echo 'Exception when calling SendersApi->updateSender: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **senderId** | **int**| Id of the sender | + **sender** | [**\Brevo\Client\Model\UpdateSender**](../Model/UpdateSender.md)| sender's name | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **validateSenderByOTP** +> validateSenderByOTP($senderId, $otp) + +Update a sender + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\SendersApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$senderId = 789; // int | Id of the sender +$otp = new \Brevo\Client\Model\Otp(); // \Brevo\Client\Model\Otp | otp + +try { + $apiInstance->validateSenderByOTP($senderId, $otp); +} catch (Exception $e) { + echo 'Exception when calling SendersApi->validateSenderByOTP: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **senderId** | **int**| Id of the sender | + **otp** | [**\Brevo\Client\Model\Otp**](../Model/Otp.md)| otp | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + diff --git a/vendor/getbrevo/brevo-php/docs/Api/TasksApi.md b/vendor/getbrevo/brevo-php/docs/Api/TasksApi.md new file mode 100644 index 0000000..0d9a90e --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Api/TasksApi.md @@ -0,0 +1,376 @@ +# Brevo\Client\TasksApi + +All URIs are relative to *https://api.brevo.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**crmTasksGet**](TasksApi.md#crmTasksGet) | **GET** /crm/tasks | Get all tasks +[**crmTasksIdDelete**](TasksApi.md#crmTasksIdDelete) | **DELETE** /crm/tasks/{id} | Delete a task +[**crmTasksIdGet**](TasksApi.md#crmTasksIdGet) | **GET** /crm/tasks/{id} | Get a task +[**crmTasksIdPatch**](TasksApi.md#crmTasksIdPatch) | **PATCH** /crm/tasks/{id} | Update a task +[**crmTasksPost**](TasksApi.md#crmTasksPost) | **POST** /crm/tasks | Create a task +[**crmTasktypesGet**](TasksApi.md#crmTasktypesGet) | **GET** /crm/tasktypes | Get all task types + + +# **crmTasksGet** +> \Brevo\Client\Model\TaskList crmTasksGet($filterType, $filterStatus, $filterDate, $filterAssignTo, $filterContacts, $filterDeals, $filterCompanies, $dateFrom, $dateTo, $offset, $limit, $sort, $sortBy) + +Get all tasks + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\TasksApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$filterType = "filterType_example"; // string | Filter by task type (ID) +$filterStatus = "filterStatus_example"; // string | Filter by task status +$filterDate = "filterDate_example"; // string | Filter by date +$filterAssignTo = "filterAssignTo_example"; // string | Filter by assignTo id +$filterContacts = "filterContacts_example"; // string | Filter by contact ids +$filterDeals = "filterDeals_example"; // string | Filter by deals ids +$filterCompanies = "filterCompanies_example"; // string | Filter by companies ids +$dateFrom = 56; // int | dateFrom to date range filter type (timestamp in milliseconds) +$dateTo = 56; // int | dateTo to date range filter type (timestamp in milliseconds) +$offset = 789; // int | Index of the first document of the page +$limit = 50; // int | Number of documents per page +$sort = "sort_example"; // string | Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed +$sortBy = "sortBy_example"; // string | The field used to sort field names. + +try { + $result = $apiInstance->crmTasksGet($filterType, $filterStatus, $filterDate, $filterAssignTo, $filterContacts, $filterDeals, $filterCompanies, $dateFrom, $dateTo, $offset, $limit, $sort, $sortBy); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TasksApi->crmTasksGet: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **filterType** | **string**| Filter by task type (ID) | [optional] + **filterStatus** | **string**| Filter by task status | [optional] + **filterDate** | **string**| Filter by date | [optional] + **filterAssignTo** | **string**| Filter by assignTo id | [optional] + **filterContacts** | **string**| Filter by contact ids | [optional] + **filterDeals** | **string**| Filter by deals ids | [optional] + **filterCompanies** | **string**| Filter by companies ids | [optional] + **dateFrom** | **int**| dateFrom to date range filter type (timestamp in milliseconds) | [optional] + **dateTo** | **int**| dateTo to date range filter type (timestamp in milliseconds) | [optional] + **offset** | **int**| Index of the first document of the page | [optional] + **limit** | **int**| Number of documents per page | [optional] [default to 50] + **sort** | **string**| Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed | [optional] + **sortBy** | **string**| The field used to sort field names. | [optional] + +### Return type + +[**\Brevo\Client\Model\TaskList**](../Model/TaskList.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **crmTasksIdDelete** +> crmTasksIdDelete($id) + +Delete a task + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\TasksApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = "id_example"; // string | + +try { + $apiInstance->crmTasksIdDelete($id); +} catch (Exception $e) { + echo 'Exception when calling TasksApi->crmTasksIdDelete: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **crmTasksIdGet** +> \Brevo\Client\Model\Task crmTasksIdGet($id) + +Get a task + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\TasksApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = "id_example"; // string | + +try { + $result = $apiInstance->crmTasksIdGet($id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TasksApi->crmTasksIdGet: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| | + +### Return type + +[**\Brevo\Client\Model\Task**](../Model/Task.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **crmTasksIdPatch** +> crmTasksIdPatch($id, $body) + +Update a task + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\TasksApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = "id_example"; // string | +$body = new \Brevo\Client\Model\Body9(); // \Brevo\Client\Model\Body9 | Updated task details. + +try { + $apiInstance->crmTasksIdPatch($id, $body); +} catch (Exception $e) { + echo 'Exception when calling TasksApi->crmTasksIdPatch: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| | + **body** | [**\Brevo\Client\Model\Body9**](../Model/Body9.md)| Updated task details. | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **crmTasksPost** +> \Brevo\Client\Model\InlineResponse2012 crmTasksPost($body) + +Create a task + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\TasksApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$body = new \Brevo\Client\Model\Body8(); // \Brevo\Client\Model\Body8 | Task name. + +try { + $result = $apiInstance->crmTasksPost($body); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TasksApi->crmTasksPost: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**\Brevo\Client\Model\Body8**](../Model/Body8.md)| Task name. | + +### Return type + +[**\Brevo\Client\Model\InlineResponse2012**](../Model/InlineResponse2012.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **crmTasktypesGet** +> \Brevo\Client\Model\TaskTypes crmTasktypesGet() + +Get all task types + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\TasksApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); + +try { + $result = $apiInstance->crmTasktypesGet(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TasksApi->crmTasktypesGet: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**\Brevo\Client\Model\TaskTypes**](../Model/TaskTypes.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + diff --git a/vendor/getbrevo/brevo-php/docs/Api/TransactionalEmailsApi.md b/vendor/getbrevo/brevo-php/docs/Api/TransactionalEmailsApi.md new file mode 100644 index 0000000..52efc93 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Api/TransactionalEmailsApi.md @@ -0,0 +1,1379 @@ +# Brevo\Client\TransactionalEmailsApi + +All URIs are relative to *https://api.brevo.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**blockNewDomain**](TransactionalEmailsApi.md#blockNewDomain) | **POST** /smtp/blockedDomains | Add a new domain to the list of blocked domains +[**createSmtpTemplate**](TransactionalEmailsApi.md#createSmtpTemplate) | **POST** /smtp/templates | Create an email template +[**deleteBlockedDomain**](TransactionalEmailsApi.md#deleteBlockedDomain) | **DELETE** /smtp/blockedDomains/{domain} | Unblock an existing domain from the list of blocked domains +[**deleteHardbounces**](TransactionalEmailsApi.md#deleteHardbounces) | **POST** /smtp/deleteHardbounces | Delete hardbounces +[**deleteScheduledEmailById**](TransactionalEmailsApi.md#deleteScheduledEmailById) | **DELETE** /smtp/email/{identifier} | Delete scheduled emails by batchId or messageId +[**deleteSmtpTemplate**](TransactionalEmailsApi.md#deleteSmtpTemplate) | **DELETE** /smtp/templates/{templateId} | Delete an inactive email template +[**getAggregatedSmtpReport**](TransactionalEmailsApi.md#getAggregatedSmtpReport) | **GET** /smtp/statistics/aggregatedReport | Get your transactional email activity aggregated over a period of time +[**getBlockedDomains**](TransactionalEmailsApi.md#getBlockedDomains) | **GET** /smtp/blockedDomains | Get the list of blocked domains +[**getEmailEventReport**](TransactionalEmailsApi.md#getEmailEventReport) | **GET** /smtp/statistics/events | Get all your transactional email activity (unaggregated events) +[**getScheduledEmailByBatchId**](TransactionalEmailsApi.md#getScheduledEmailByBatchId) | **GET** /smtp/emailStatus/{batchId} | Fetch scheduled emails by batchId +[**getScheduledEmailByMessageId**](TransactionalEmailsApi.md#getScheduledEmailByMessageId) | **GET** /smtp/emailStatus/{messageId} | Fetch scheduled email by messageId +[**getSmtpReport**](TransactionalEmailsApi.md#getSmtpReport) | **GET** /smtp/statistics/reports | Get your transactional email activity aggregated per day +[**getSmtpTemplate**](TransactionalEmailsApi.md#getSmtpTemplate) | **GET** /smtp/templates/{templateId} | Returns the template information +[**getSmtpTemplates**](TransactionalEmailsApi.md#getSmtpTemplates) | **GET** /smtp/templates | Get the list of email templates +[**getTransacBlockedContacts**](TransactionalEmailsApi.md#getTransacBlockedContacts) | **GET** /smtp/blockedContacts | Get the list of blocked or unsubscribed transactional contacts +[**getTransacEmailContent**](TransactionalEmailsApi.md#getTransacEmailContent) | **GET** /smtp/emails/{uuid} | Get the personalized content of a sent transactional email +[**getTransacEmailsList**](TransactionalEmailsApi.md#getTransacEmailsList) | **GET** /smtp/emails | Get the list of transactional emails on the basis of allowed filters +[**sendTestTemplate**](TransactionalEmailsApi.md#sendTestTemplate) | **POST** /smtp/templates/{templateId}/sendTest | Send a template to your test list +[**sendTransacEmail**](TransactionalEmailsApi.md#sendTransacEmail) | **POST** /smtp/email | Send a transactional email +[**smtpBlockedContactsEmailDelete**](TransactionalEmailsApi.md#smtpBlockedContactsEmailDelete) | **DELETE** /smtp/blockedContacts/{email} | Unblock or resubscribe a transactional contact +[**smtpLogIdentifierDelete**](TransactionalEmailsApi.md#smtpLogIdentifierDelete) | **DELETE** /smtp/log/{identifier} | Delete an SMTP transactional log +[**updateSmtpTemplate**](TransactionalEmailsApi.md#updateSmtpTemplate) | **PUT** /smtp/templates/{templateId} | Update an email template + + +# **blockNewDomain** +> blockNewDomain($blockDomain) + +Add a new domain to the list of blocked domains + +Blocks a new domain in order to avoid messages being sent to the same + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\TransactionalEmailsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$blockDomain = new \Brevo\Client\Model\BlockDomain(); // \Brevo\Client\Model\BlockDomain | + +try { + $apiInstance->blockNewDomain($blockDomain); +} catch (Exception $e) { + echo 'Exception when calling TransactionalEmailsApi->blockNewDomain: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **blockDomain** | [**\Brevo\Client\Model\BlockDomain**](../Model/BlockDomain.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **createSmtpTemplate** +> \Brevo\Client\Model\CreateModel createSmtpTemplate($smtpTemplate) + +Create an email template + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\TransactionalEmailsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$smtpTemplate = new \Brevo\Client\Model\CreateSmtpTemplate(); // \Brevo\Client\Model\CreateSmtpTemplate | values to update in transactional email template + +try { + $result = $apiInstance->createSmtpTemplate($smtpTemplate); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TransactionalEmailsApi->createSmtpTemplate: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **smtpTemplate** | [**\Brevo\Client\Model\CreateSmtpTemplate**](../Model/CreateSmtpTemplate.md)| values to update in transactional email template | + +### Return type + +[**\Brevo\Client\Model\CreateModel**](../Model/CreateModel.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **deleteBlockedDomain** +> deleteBlockedDomain($domain) + +Unblock an existing domain from the list of blocked domains + +Unblocks an existing domain from the list of blocked domains + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\TransactionalEmailsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$domain = "domain_example"; // string | The name of the domain to be deleted + +try { + $apiInstance->deleteBlockedDomain($domain); +} catch (Exception $e) { + echo 'Exception when calling TransactionalEmailsApi->deleteBlockedDomain: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **domain** | **string**| The name of the domain to be deleted | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **deleteHardbounces** +> deleteHardbounces($deleteHardbounces) + +Delete hardbounces + +Delete hardbounces. To use carefully (e.g. in case of temporary ISP failures) + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\TransactionalEmailsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$deleteHardbounces = new \Brevo\Client\Model\DeleteHardbounces(); // \Brevo\Client\Model\DeleteHardbounces | values to delete hardbounces + +try { + $apiInstance->deleteHardbounces($deleteHardbounces); +} catch (Exception $e) { + echo 'Exception when calling TransactionalEmailsApi->deleteHardbounces: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deleteHardbounces** | [**\Brevo\Client\Model\DeleteHardbounces**](../Model/DeleteHardbounces.md)| values to delete hardbounces | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **deleteScheduledEmailById** +> deleteScheduledEmailById($identifier) + +Delete scheduled emails by batchId or messageId + +Delete scheduled batch of emails by batchId or single scheduled email by messageId + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\TransactionalEmailsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$identifier = "identifier_example"; // string | The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. + +try { + $apiInstance->deleteScheduledEmailById($identifier); +} catch (Exception $e) { + echo 'Exception when calling TransactionalEmailsApi->deleteScheduledEmailById: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **identifier** | **string**| The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **deleteSmtpTemplate** +> deleteSmtpTemplate($templateId) + +Delete an inactive email template + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\TransactionalEmailsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$templateId = 789; // int | id of the template + +try { + $apiInstance->deleteSmtpTemplate($templateId); +} catch (Exception $e) { + echo 'Exception when calling TransactionalEmailsApi->deleteSmtpTemplate: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateId** | **int**| id of the template | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getAggregatedSmtpReport** +> \Brevo\Client\Model\GetAggregatedReport getAggregatedSmtpReport($startDate, $endDate, $days, $tag) + +Get your transactional email activity aggregated over a period of time + +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 + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\TransactionalEmailsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$startDate = "startDate_example"; // string | Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate +$endDate = "endDate_example"; // string | Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate +$days = 789; // int | Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' +$tag = "tag_example"; // string | Tag of the emails + +try { + $result = $apiInstance->getAggregatedSmtpReport($startDate, $endDate, $days, $tag); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TransactionalEmailsApi->getAggregatedSmtpReport: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **startDate** | **string**| Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate | [optional] + **endDate** | **string**| Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate | [optional] + **days** | **int**| Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' | [optional] + **tag** | **string**| Tag of the emails | [optional] + +### Return type + +[**\Brevo\Client\Model\GetAggregatedReport**](../Model/GetAggregatedReport.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getBlockedDomains** +> \Brevo\Client\Model\GetBlockedDomains getBlockedDomains() + +Get the list of blocked domains + +Get the list of blocked domains + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\TransactionalEmailsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); + +try { + $result = $apiInstance->getBlockedDomains(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TransactionalEmailsApi->getBlockedDomains: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**\Brevo\Client\Model\GetBlockedDomains**](../Model/GetBlockedDomains.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getEmailEventReport** +> \Brevo\Client\Model\GetEmailEventReport getEmailEventReport($limit, $offset, $startDate, $endDate, $days, $email, $event, $tags, $messageId, $templateId, $sort) + +Get all your transactional email activity (unaggregated events) + +This endpoint will show the aggregated stats for past 30 days by default if `startDate` and `endDate` OR `days` is not passed. The date range can not exceed 90 days + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\TransactionalEmailsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$limit = 2500; // int | Number limitation for the result returned +$offset = 0; // int | Beginning point in the list to retrieve from. +$startDate = "startDate_example"; // string | Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate +$endDate = "endDate_example"; // string | Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate +$days = 789; // int | Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' +$email = "email_example"; // string | Filter the report for a specific email addresses +$event = "event_example"; // string | Filter the report for a specific event type +$tags = "tags_example"; // string | Filter the report for tags (serialized and urlencoded array) +$messageId = "messageId_example"; // string | Filter on a specific message id +$templateId = 789; // int | Filter on a specific template id +$sort = "desc"; // string | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + +try { + $result = $apiInstance->getEmailEventReport($limit, $offset, $startDate, $endDate, $days, $email, $event, $tags, $messageId, $templateId, $sort); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TransactionalEmailsApi->getEmailEventReport: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| Number limitation for the result returned | [optional] [default to 2500] + **offset** | **int**| Beginning point in the list to retrieve from. | [optional] [default to 0] + **startDate** | **string**| Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate | [optional] + **endDate** | **string**| Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate | [optional] + **days** | **int**| Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' | [optional] + **email** | **string**| Filter the report for a specific email addresses | [optional] + **event** | **string**| Filter the report for a specific event type | [optional] + **tags** | **string**| Filter the report for tags (serialized and urlencoded array) | [optional] + **messageId** | **string**| Filter on a specific message id | [optional] + **templateId** | **int**| Filter on a specific template id | [optional] + **sort** | **string**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [optional] [default to desc] + +### Return type + +[**\Brevo\Client\Model\GetEmailEventReport**](../Model/GetEmailEventReport.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getScheduledEmailByBatchId** +> \Brevo\Client\Model\GetScheduledEmailByBatchId getScheduledEmailByBatchId($batchId, $startDate, $endDate, $sort, $status, $limit, $offset) + +Fetch scheduled emails by batchId + +Fetch scheduled batch of emails by batchId (Can retrieve data upto 30 days old) + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\TransactionalEmailsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$batchId = "batchId_example"; // string | The batchId of scheduled emails batch (Should be a valid UUIDv4) +$startDate = new \DateTime("2013-10-20"); // \DateTime | 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. +$endDate = new \DateTime("2013-10-20"); // \DateTime | Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. +$sort = "desc"; // string | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed +$status = "status_example"; // string | Filter the records by `status` of the scheduled email batch or message. +$limit = 100; // int | Number of documents returned per page +$offset = 0; // int | Index of the first document on the page + +try { + $result = $apiInstance->getScheduledEmailByBatchId($batchId, $startDate, $endDate, $sort, $status, $limit, $offset); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TransactionalEmailsApi->getScheduledEmailByBatchId: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **batchId** | **string**| The batchId of scheduled emails batch (Should be a valid UUIDv4) | + **startDate** | **\DateTime**| Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. | [optional] + **endDate** | **\DateTime**| Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. | [optional] + **sort** | **string**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [optional] [default to desc] + **status** | **string**| Filter the records by `status` of the scheduled email batch or message. | [optional] + **limit** | **int**| Number of documents returned per page | [optional] [default to 100] + **offset** | **int**| Index of the first document on the page | [optional] [default to 0] + +### Return type + +[**\Brevo\Client\Model\GetScheduledEmailByBatchId**](../Model/GetScheduledEmailByBatchId.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getScheduledEmailByMessageId** +> \Brevo\Client\Model\GetScheduledEmailByMessageId getScheduledEmailByMessageId($messageId, $startDate, $endDate) + +Fetch scheduled email by messageId + +Fetch scheduled email by messageId (Can retrieve data upto 30 days old) + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\TransactionalEmailsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$messageId = "messageId_example"; // string | The messageId of scheduled email +$startDate = new \DateTime("2013-10-20"); // \DateTime | 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. +$endDate = new \DateTime("2013-10-20"); // \DateTime | 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. + +try { + $result = $apiInstance->getScheduledEmailByMessageId($messageId, $startDate, $endDate); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TransactionalEmailsApi->getScheduledEmailByMessageId: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **messageId** | **string**| The messageId of scheduled email | + **startDate** | **\DateTime**| Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. | [optional] + **endDate** | **\DateTime**| Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. | [optional] + +### Return type + +[**\Brevo\Client\Model\GetScheduledEmailByMessageId**](../Model/GetScheduledEmailByMessageId.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getSmtpReport** +> \Brevo\Client\Model\GetReports getSmtpReport($limit, $offset, $startDate, $endDate, $days, $tag, $sort) + +Get your transactional email activity aggregated per day + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\TransactionalEmailsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$limit = 10; // int | Number of documents returned per page +$offset = 0; // int | Index of the first document on the page +$startDate = "startDate_example"; // string | Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD) +$endDate = "endDate_example"; // string | Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD) +$days = 789; // int | Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' +$tag = "tag_example"; // string | Tag of the emails +$sort = "desc"; // string | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + +try { + $result = $apiInstance->getSmtpReport($limit, $offset, $startDate, $endDate, $days, $tag, $sort); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TransactionalEmailsApi->getSmtpReport: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| Number of documents returned per page | [optional] [default to 10] + **offset** | **int**| Index of the first document on the page | [optional] [default to 0] + **startDate** | **string**| Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD) | [optional] + **endDate** | **string**| Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD) | [optional] + **days** | **int**| Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' | [optional] + **tag** | **string**| Tag of the emails | [optional] + **sort** | **string**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [optional] [default to desc] + +### Return type + +[**\Brevo\Client\Model\GetReports**](../Model/GetReports.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getSmtpTemplate** +> \Brevo\Client\Model\GetSmtpTemplateOverview getSmtpTemplate($templateId) + +Returns the template information + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\TransactionalEmailsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$templateId = 789; // int | id of the template + +try { + $result = $apiInstance->getSmtpTemplate($templateId); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TransactionalEmailsApi->getSmtpTemplate: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateId** | **int**| id of the template | + +### Return type + +[**\Brevo\Client\Model\GetSmtpTemplateOverview**](../Model/GetSmtpTemplateOverview.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getSmtpTemplates** +> \Brevo\Client\Model\GetSmtpTemplates getSmtpTemplates($templateStatus, $limit, $offset, $sort) + +Get the list of email templates + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\TransactionalEmailsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$templateStatus = true; // bool | Filter on the status of the template. Active = true, inactive = false +$limit = 50; // int | Number of documents returned per page +$offset = 0; // int | Index of the first document in the page +$sort = "desc"; // string | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + +try { + $result = $apiInstance->getSmtpTemplates($templateStatus, $limit, $offset, $sort); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TransactionalEmailsApi->getSmtpTemplates: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateStatus** | **bool**| Filter on the status of the template. Active = true, inactive = false | [optional] + **limit** | **int**| Number of documents returned per page | [optional] [default to 50] + **offset** | **int**| Index of the first document in the page | [optional] [default to 0] + **sort** | **string**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [optional] [default to desc] + +### Return type + +[**\Brevo\Client\Model\GetSmtpTemplates**](../Model/GetSmtpTemplates.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getTransacBlockedContacts** +> \Brevo\Client\Model\GetTransacBlockedContacts getTransacBlockedContacts($startDate, $endDate, $limit, $offset, $senders, $sort) + +Get the list of blocked or unsubscribed transactional contacts + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\TransactionalEmailsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$startDate = "startDate_example"; // string | Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the blocked or unsubscribed contacts +$endDate = "endDate_example"; // string | Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the blocked or unsubscribed contacts +$limit = 50; // int | Number of documents returned per page +$offset = 0; // int | Index of the first document on the page +$senders = array("senders_example"); // string[] | Comma separated list of emails of the senders from which contacts are blocked or unsubscribed +$sort = "desc"; // string | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + +try { + $result = $apiInstance->getTransacBlockedContacts($startDate, $endDate, $limit, $offset, $senders, $sort); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TransactionalEmailsApi->getTransacBlockedContacts: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **startDate** | **string**| Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the blocked or unsubscribed contacts | [optional] + **endDate** | **string**| Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the blocked or unsubscribed contacts | [optional] + **limit** | **int**| Number of documents returned per page | [optional] [default to 50] + **offset** | **int**| Index of the first document on the page | [optional] [default to 0] + **senders** | [**string[]**](../Model/string.md)| Comma separated list of emails of the senders from which contacts are blocked or unsubscribed | [optional] + **sort** | **string**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [optional] [default to desc] + +### Return type + +[**\Brevo\Client\Model\GetTransacBlockedContacts**](../Model/GetTransacBlockedContacts.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getTransacEmailContent** +> \Brevo\Client\Model\GetTransacEmailContent getTransacEmailContent($uuid) + +Get the personalized content of a sent transactional email + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\TransactionalEmailsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$uuid = "uuid_example"; // string | Unique id of the transactional email that has been sent to a particular contact + +try { + $result = $apiInstance->getTransacEmailContent($uuid); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TransactionalEmailsApi->getTransacEmailContent: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **uuid** | **string**| Unique id of the transactional email that has been sent to a particular contact | + +### Return type + +[**\Brevo\Client\Model\GetTransacEmailContent**](../Model/GetTransacEmailContent.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getTransacEmailsList** +> \Brevo\Client\Model\GetTransacEmailsList getTransacEmailsList($email, $templateId, $messageId, $startDate, $endDate, $sort, $limit, $offset) + +Get the list of transactional emails on the basis of allowed filters + +This endpoint will show the list of emails for past 30 days by default. To retrieve emails before that time, please pass startDate and endDate in query filters. + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\TransactionalEmailsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$email = "email_example"; // string | Mandatory if templateId and messageId are not passed in query filters. Email address to which transactional email has been sent. +$templateId = 789; // int | Mandatory if email and messageId are not passed in query filters. Id of the template that was used to compose transactional email. +$messageId = "messageId_example"; // string | Mandatory if templateId and email are not passed in query filters. Message ID of the transactional email sent. +$startDate = "startDate_example"; // string | Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Maximum time period that can be selected is one month. +$endDate = "endDate_example"; // string | Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. +$sort = "desc"; // string | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed +$limit = 500; // int | Number of documents returned per page +$offset = 0; // int | Index of the first document in the page + +try { + $result = $apiInstance->getTransacEmailsList($email, $templateId, $messageId, $startDate, $endDate, $sort, $limit, $offset); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TransactionalEmailsApi->getTransacEmailsList: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **string**| Mandatory if templateId and messageId are not passed in query filters. Email address to which transactional email has been sent. | [optional] + **templateId** | **int**| Mandatory if email and messageId are not passed in query filters. Id of the template that was used to compose transactional email. | [optional] + **messageId** | **string**| Mandatory if templateId and email are not passed in query filters. Message ID of the transactional email sent. | [optional] + **startDate** | **string**| Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Maximum time period that can be selected is one month. | [optional] + **endDate** | **string**| Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. | [optional] + **sort** | **string**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [optional] [default to desc] + **limit** | **int**| Number of documents returned per page | [optional] [default to 500] + **offset** | **int**| Index of the first document in the page | [optional] [default to 0] + +### Return type + +[**\Brevo\Client\Model\GetTransacEmailsList**](../Model/GetTransacEmailsList.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **sendTestTemplate** +> sendTestTemplate($templateId, $sendTestEmail) + +Send a template to your test list + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\TransactionalEmailsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$templateId = 789; // int | Id of the template +$sendTestEmail = new \Brevo\Client\Model\SendTestEmail(); // \Brevo\Client\Model\SendTestEmail | + +try { + $apiInstance->sendTestTemplate($templateId, $sendTestEmail); +} catch (Exception $e) { + echo 'Exception when calling TransactionalEmailsApi->sendTestTemplate: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateId** | **int**| Id of the template | + **sendTestEmail** | [**\Brevo\Client\Model\SendTestEmail**](../Model/SendTestEmail.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **sendTransacEmail** +> \Brevo\Client\Model\CreateSmtpEmail sendTransacEmail($sendSmtpEmail) + +Send a transactional email + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\TransactionalEmailsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$sendSmtpEmail = new \Brevo\Client\Model\SendSmtpEmail(); // \Brevo\Client\Model\SendSmtpEmail | Values to send a transactional email + +try { + $result = $apiInstance->sendTransacEmail($sendSmtpEmail); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TransactionalEmailsApi->sendTransacEmail: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sendSmtpEmail** | [**\Brevo\Client\Model\SendSmtpEmail**](../Model/SendSmtpEmail.md)| Values to send a transactional email | + +### Return type + +[**\Brevo\Client\Model\CreateSmtpEmail**](../Model/CreateSmtpEmail.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **smtpBlockedContactsEmailDelete** +> smtpBlockedContactsEmailDelete($email) + +Unblock or resubscribe a transactional contact + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\TransactionalEmailsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$email = "email_example"; // string | contact email (urlencoded) to unblock. + +try { + $apiInstance->smtpBlockedContactsEmailDelete($email); +} catch (Exception $e) { + echo 'Exception when calling TransactionalEmailsApi->smtpBlockedContactsEmailDelete: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **string**| contact email (urlencoded) to unblock. | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **smtpLogIdentifierDelete** +> smtpLogIdentifierDelete($identifier) + +Delete an SMTP transactional log + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\TransactionalEmailsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$identifier = "identifier_example"; // string | MessageId or Email of the transactional log(s) to delete + +try { + $apiInstance->smtpLogIdentifierDelete($identifier); +} catch (Exception $e) { + echo 'Exception when calling TransactionalEmailsApi->smtpLogIdentifierDelete: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **identifier** | **string**| MessageId or Email of the transactional log(s) to delete | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **updateSmtpTemplate** +> updateSmtpTemplate($templateId, $smtpTemplate) + +Update an email template + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\TransactionalEmailsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$templateId = 789; // int | id of the template +$smtpTemplate = new \Brevo\Client\Model\UpdateSmtpTemplate(); // \Brevo\Client\Model\UpdateSmtpTemplate | values to update in transactional email template + +try { + $apiInstance->updateSmtpTemplate($templateId, $smtpTemplate); +} catch (Exception $e) { + echo 'Exception when calling TransactionalEmailsApi->updateSmtpTemplate: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateId** | **int**| id of the template | + **smtpTemplate** | [**\Brevo\Client\Model\UpdateSmtpTemplate**](../Model/UpdateSmtpTemplate.md)| values to update in transactional email template | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + diff --git a/vendor/getbrevo/brevo-php/docs/Api/TransactionalSMSApi.md b/vendor/getbrevo/brevo-php/docs/Api/TransactionalSMSApi.md new file mode 100644 index 0000000..685d4ba --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Api/TransactionalSMSApi.md @@ -0,0 +1,270 @@ +# Brevo\Client\TransactionalSMSApi + +All URIs are relative to *https://api.brevo.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getSmsEvents**](TransactionalSMSApi.md#getSmsEvents) | **GET** /transactionalSMS/statistics/events | Get all your SMS activity (unaggregated events) +[**getTransacAggregatedSmsReport**](TransactionalSMSApi.md#getTransacAggregatedSmsReport) | **GET** /transactionalSMS/statistics/aggregatedReport | Get your SMS activity aggregated over a period of time +[**getTransacSmsReport**](TransactionalSMSApi.md#getTransacSmsReport) | **GET** /transactionalSMS/statistics/reports | Get your SMS activity aggregated per day +[**sendTransacSms**](TransactionalSMSApi.md#sendTransacSms) | **POST** /transactionalSMS/sms | Send SMS message to a mobile number + + +# **getSmsEvents** +> \Brevo\Client\Model\GetSmsEventReport getSmsEvents($limit, $startDate, $endDate, $offset, $days, $phoneNumber, $event, $tags, $sort) + +Get all your SMS activity (unaggregated events) + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\TransactionalSMSApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$limit = 50; // int | Number of documents per page +$startDate = "startDate_example"; // string | Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report +$endDate = "endDate_example"; // string | Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report +$offset = 0; // int | Index of the first document of the page +$days = 789; // int | Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' +$phoneNumber = "phoneNumber_example"; // string | Filter the report for a specific phone number +$event = "event_example"; // string | Filter the report for specific events +$tags = "tags_example"; // string | Filter the report for specific tags passed as a serialized urlencoded array +$sort = "desc"; // string | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + +try { + $result = $apiInstance->getSmsEvents($limit, $startDate, $endDate, $offset, $days, $phoneNumber, $event, $tags, $sort); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TransactionalSMSApi->getSmsEvents: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| Number of documents per page | [optional] [default to 50] + **startDate** | **string**| Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report | [optional] + **endDate** | **string**| Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report | [optional] + **offset** | **int**| Index of the first document of the page | [optional] [default to 0] + **days** | **int**| Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' | [optional] + **phoneNumber** | **string**| Filter the report for a specific phone number | [optional] + **event** | **string**| Filter the report for specific events | [optional] + **tags** | **string**| Filter the report for specific tags passed as a serialized urlencoded array | [optional] + **sort** | **string**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [optional] [default to desc] + +### Return type + +[**\Brevo\Client\Model\GetSmsEventReport**](../Model/GetSmsEventReport.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getTransacAggregatedSmsReport** +> \Brevo\Client\Model\GetTransacAggregatedSmsReport getTransacAggregatedSmsReport($startDate, $endDate, $days, $tag) + +Get your SMS activity aggregated over a period of time + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\TransactionalSMSApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$startDate = "startDate_example"; // string | Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report +$endDate = "endDate_example"; // string | Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report +$days = 789; // int | Number of days in the past including today (positive integer). Not compatible with startDate and endDate +$tag = "tag_example"; // string | Filter on a tag + +try { + $result = $apiInstance->getTransacAggregatedSmsReport($startDate, $endDate, $days, $tag); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TransactionalSMSApi->getTransacAggregatedSmsReport: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **startDate** | **string**| Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report | [optional] + **endDate** | **string**| Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report | [optional] + **days** | **int**| Number of days in the past including today (positive integer). Not compatible with startDate and endDate | [optional] + **tag** | **string**| Filter on a tag | [optional] + +### Return type + +[**\Brevo\Client\Model\GetTransacAggregatedSmsReport**](../Model/GetTransacAggregatedSmsReport.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getTransacSmsReport** +> \Brevo\Client\Model\GetTransacSmsReport getTransacSmsReport($startDate, $endDate, $days, $tag, $sort) + +Get your SMS activity aggregated per day + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\TransactionalSMSApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$startDate = "startDate_example"; // string | Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report +$endDate = "endDate_example"; // string | Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report +$days = 789; // int | Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' +$tag = "tag_example"; // string | Filter on a tag +$sort = "desc"; // string | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + +try { + $result = $apiInstance->getTransacSmsReport($startDate, $endDate, $days, $tag, $sort); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TransactionalSMSApi->getTransacSmsReport: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **startDate** | **string**| Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report | [optional] + **endDate** | **string**| Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report | [optional] + **days** | **int**| Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' | [optional] + **tag** | **string**| Filter on a tag | [optional] + **sort** | **string**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [optional] [default to desc] + +### Return type + +[**\Brevo\Client\Model\GetTransacSmsReport**](../Model/GetTransacSmsReport.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **sendTransacSms** +> \Brevo\Client\Model\SendSms sendTransacSms($sendTransacSms) + +Send SMS message to a mobile number + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\TransactionalSMSApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$sendTransacSms = new \Brevo\Client\Model\SendTransacSms(); // \Brevo\Client\Model\SendTransacSms | Values to send a transactional SMS + +try { + $result = $apiInstance->sendTransacSms($sendTransacSms); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TransactionalSMSApi->sendTransacSms: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sendTransacSms** | [**\Brevo\Client\Model\SendTransacSms**](../Model/SendTransacSms.md)| Values to send a transactional SMS | + +### Return type + +[**\Brevo\Client\Model\SendSms**](../Model/SendSms.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + diff --git a/vendor/getbrevo/brevo-php/docs/Api/TransactionalWhatsAppApi.md b/vendor/getbrevo/brevo-php/docs/Api/TransactionalWhatsAppApi.md new file mode 100644 index 0000000..e1641af --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Api/TransactionalWhatsAppApi.md @@ -0,0 +1,142 @@ +# Brevo\Client\TransactionalWhatsAppApi + +All URIs are relative to *https://api.brevo.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getWhatsappEventReport**](TransactionalWhatsAppApi.md#getWhatsappEventReport) | **GET** /whatsapp/statistics/events | Get all your WhatsApp activity (unaggregated events) +[**sendWhatsappMessage**](TransactionalWhatsAppApi.md#sendWhatsappMessage) | **POST** /whatsapp/sendMessage | Send a WhatsApp message + + +# **getWhatsappEventReport** +> \Brevo\Client\Model\GetWhatsappEventReport getWhatsappEventReport($limit, $offset, $startDate, $endDate, $days, $contactNumber, $event, $sort) + +Get all your WhatsApp activity (unaggregated events) + +This endpoint will show the unaggregated statistics for WhatsApp activity (30 days by default if `startDate` and `endDate` or `days` is not passed. The date range can not exceed 90 days) + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\TransactionalWhatsAppApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$limit = 2500; // int | Number limitation for the result returned +$offset = 0; // int | Beginning point in the list to retrieve from +$startDate = "startDate_example"; // string | **Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate +$endDate = "endDate_example"; // string | **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate +$days = 789; // int | Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ +$contactNumber = "contactNumber_example"; // string | Filter results for specific contact (WhatsApp Number with country code. Example, 85264318721) +$event = "event_example"; // string | Filter the report for a specific event type +$sort = "desc"; // string | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + +try { + $result = $apiInstance->getWhatsappEventReport($limit, $offset, $startDate, $endDate, $days, $contactNumber, $event, $sort); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TransactionalWhatsAppApi->getWhatsappEventReport: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| Number limitation for the result returned | [optional] [default to 2500] + **offset** | **int**| Beginning point in the list to retrieve from | [optional] [default to 0] + **startDate** | **string**| **Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate | [optional] + **endDate** | **string**| **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate | [optional] + **days** | **int**| Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ | [optional] + **contactNumber** | **string**| Filter results for specific contact (WhatsApp Number with country code. Example, 85264318721) | [optional] + **event** | **string**| Filter the report for a specific event type | [optional] + **sort** | **string**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [optional] [default to desc] + +### Return type + +[**\Brevo\Client\Model\GetWhatsappEventReport**](../Model/GetWhatsappEventReport.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **sendWhatsappMessage** +> \Brevo\Client\Model\InlineResponse2014 sendWhatsappMessage($sendWhatsappMessage) + +Send a WhatsApp message + +This endpoint is used to send a WhatsApp message.
(**The first message you send using the API must contain a Template ID. You must create a template on WhatsApp on the Brevo platform to fetch the Template ID.**) + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\TransactionalWhatsAppApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$sendWhatsappMessage = new \Brevo\Client\Model\SendWhatsappMessage(); // \Brevo\Client\Model\SendWhatsappMessage | Values to send WhatsApp message + +try { + $result = $apiInstance->sendWhatsappMessage($sendWhatsappMessage); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TransactionalWhatsAppApi->sendWhatsappMessage: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sendWhatsappMessage** | [**\Brevo\Client\Model\SendWhatsappMessage**](../Model/SendWhatsappMessage.md)| Values to send WhatsApp message | + +### Return type + +[**\Brevo\Client\Model\InlineResponse2014**](../Model/InlineResponse2014.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + diff --git a/vendor/getbrevo/brevo-php/docs/Api/UserApi.md b/vendor/getbrevo/brevo-php/docs/Api/UserApi.md new file mode 100644 index 0000000..87f3900 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Api/UserApi.md @@ -0,0 +1,358 @@ +# Brevo\Client\UserApi + +All URIs are relative to *https://api.brevo.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**editUserPermission**](UserApi.md#editUserPermission) | **POST** /organization/user/update/permissions | Update permission for a user +[**getInvitedUsersList**](UserApi.md#getInvitedUsersList) | **GET** /organization/invited/users | Get the list of all your users +[**getUserPermission**](UserApi.md#getUserPermission) | **GET** /organization/user/{email}/permissions | Check user permission +[**inviteuser**](UserApi.md#inviteuser) | **POST** /organization/user/invitation/send | Send invitation to user +[**putRevokeUserPermission**](UserApi.md#putRevokeUserPermission) | **PUT** /organization/user/invitation/revoke/{email} | Revoke user permission +[**putresendcancelinvitation**](UserApi.md#putresendcancelinvitation) | **PUT** /organization/user/invitation/{action}/{email} | Resend / Cancel invitation + + +# **editUserPermission** +> \Brevo\Client\Model\Inviteuser editUserPermission($updatePermissions) + +Update permission for a user + +`Feature` - A Feature represents a specific functionality like Email campaign, Deals, Calls, Automations, etc. on Brevo. While inviting a user, determine which feature you want to manage access to. You must specify the feature accurately to avoid errors. `Permission` - A Permission defines the level of access or control a user has over a specific feature. While inviting user, decide on the permission level required for the selected feature. Make sure the chosen permission is related to the selected feature. Features and their respective permissions are as below: - `email_campaigns`: - \"create_edit_delete\" - \"send_schedule_suspend\" - `sms_campaigns`: - \"create_edit_delete\" - \"send_schedule_suspend\" - `contacts`: - \"view\" - \"send_schedule_suspend\" - \"import\" - \"export\" - \"list_and_attributes\" - \"forms\" - `templates`: - \"create_edit_delete\" - \"activate_deactivate\" - `workflows`: - \"create_edit_delete\" - \"activate_deactivate_pause\" - \"settings\" - `facebook_ads`: - \"create_edit_delete\" - \"schedule_pause\" - `landing_pages`: - \"all\" - `transactional_emails`: - \"settings\" - \"logs\" - `smtp_api`: - \"smtp\" - \"api_keys\" - \"authorized_ips\" - `user_management`: - \"all\" - `sales_platform`: - \"manage_owned_deals_tasks_companies\" - \"manage_others_deals_tasks_companies\" - \"reports\" - \"settings\" - `phone`: - \"all\" - `conversations`: - \"access\" - \"assign\" - \"configure\" - `senders_domains_dedicated_ips`: - \"senders_management\" - \"domains_management\" - \"dedicated_ips_management\" - `push_notifications`: - \"view\" - \"create_edit_delete\" - \"send\" - \"settings\" **Note**: - The privileges array remains the same as in the send invitation; the user simply needs to provide the permissions that need to be updated. - The availability of feature and its permission depends on your current plan. Please select the features and permissions accordingly. + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\UserApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$updatePermissions = new \Brevo\Client\Model\Inviteuser(); // \Brevo\Client\Model\Inviteuser | Values to update permissions for an invited user + +try { + $result = $apiInstance->editUserPermission($updatePermissions); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling UserApi->editUserPermission: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updatePermissions** | [**\Brevo\Client\Model\Inviteuser**](../Model/Inviteuser.md)| Values to update permissions for an invited user | + +### Return type + +[**\Brevo\Client\Model\Inviteuser**](../Model/Inviteuser.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getInvitedUsersList** +> \Brevo\Client\Model\GetInvitedUsersList getInvitedUsersList() + +Get the list of all your users + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\UserApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); + +try { + $result = $apiInstance->getInvitedUsersList(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling UserApi->getInvitedUsersList: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**\Brevo\Client\Model\GetInvitedUsersList**](../Model/GetInvitedUsersList.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getUserPermission** +> \Brevo\Client\Model\GetUserPermission getUserPermission($email) + +Check user permission + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\UserApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$email = "email_example"; // string | Email of the invited user. + +try { + $result = $apiInstance->getUserPermission($email); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling UserApi->getUserPermission: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **string**| Email of the invited user. | + +### Return type + +[**\Brevo\Client\Model\GetUserPermission**](../Model/GetUserPermission.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **inviteuser** +> \Brevo\Client\Model\Inviteuser inviteuser($sendInvitation) + +Send invitation to user + +`Feature` - A Feature represents a specific functionality like Email campaign, Deals, Calls, Automations, etc. on Brevo. While inviting a user, determine which feature you want to manage access to. You must specify the feature accurately to avoid errors. `Permission` - A Permission defines the level of access or control a user has over a specific feature. While inviting user, decide on the permission level required for the selected feature. Make sure the chosen permission is related to the selected feature. Features and their respective permissions are as below: - `email_campaigns`: - \"create_edit_delete\" - \"send_schedule_suspend\" - `sms_campaigns`: - \"create_edit_delete\" - \"send_schedule_suspend\" - `contacts`: - \"view\" - \"send_schedule_suspend\" - \"import\" - \"export\" - \"list_and_attributes\" - \"forms\" - `templates`: - \"create_edit_delete\" - \"activate_deactivate\" - `workflows`: - \"create_edit_delete\" - \"activate_deactivate_pause\" - \"settings\" - `facebook_ads`: - \"create_edit_delete\" - \"schedule_pause\" - `landing_pages`: - \"all\" - `transactional_emails`: - \"settings\" - \"logs\" - `smtp_api`: - \"smtp\" - \"api_keys\" - \"authorized_ips\" - `user_management`: - \"all\" - `sales_platform`: - \"manage_owned_deals_tasks_companies\" - \"manage_others_deals_tasks_companies\" - \"reports\" - \"settings\" - `phone`: - \"all\" - `conversations`: - \"access\" - \"assign\" - \"configure\" - `senders_domains_dedicated_ips`: - \"senders_management\" - \"domains_management\" - \"dedicated_ips_management\" - `push_notifications`: - \"view\" - \"create_edit_delete\" - \"send\" - \"settings\" **Note**: - If `all_features_access: false` then only privileges are required otherwise if `true` then it's assumed that all permissions will be there for the invited user. - The availability of feature and its permission depends on your current plan. Please select the features and permissions accordingly. + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\UserApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$sendInvitation = new \Brevo\Client\Model\Inviteuser(); // \Brevo\Client\Model\Inviteuser | Values to create an invitation + +try { + $result = $apiInstance->inviteuser($sendInvitation); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling UserApi->inviteuser: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sendInvitation** | [**\Brevo\Client\Model\Inviteuser**](../Model/Inviteuser.md)| Values to create an invitation | + +### Return type + +[**\Brevo\Client\Model\Inviteuser**](../Model/Inviteuser.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **putRevokeUserPermission** +> \Brevo\Client\Model\PutRevokeUserPermission putRevokeUserPermission($email) + +Revoke user permission + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\UserApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$email = "email_example"; // string | Email of the invited user. + +try { + $result = $apiInstance->putRevokeUserPermission($email); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling UserApi->putRevokeUserPermission: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **string**| Email of the invited user. | + +### Return type + +[**\Brevo\Client\Model\PutRevokeUserPermission**](../Model/PutRevokeUserPermission.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **putresendcancelinvitation** +> \Brevo\Client\Model\Putresendcancelinvitation putresendcancelinvitation($action, $email) + +Resend / Cancel invitation + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\UserApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$action = "action_example"; // string | action +$email = "email_example"; // string | Email of the invited user. + +try { + $result = $apiInstance->putresendcancelinvitation($action, $email); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling UserApi->putresendcancelinvitation: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **action** | **string**| action | + **email** | **string**| Email of the invited user. | + +### Return type + +[**\Brevo\Client\Model\Putresendcancelinvitation**](../Model/Putresendcancelinvitation.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + diff --git a/vendor/getbrevo/brevo-php/docs/Api/WebhooksApi.md b/vendor/getbrevo/brevo-php/docs/Api/WebhooksApi.md new file mode 100644 index 0000000..9dca158 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Api/WebhooksApi.md @@ -0,0 +1,360 @@ +# Brevo\Client\WebhooksApi + +All URIs are relative to *https://api.brevo.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createWebhook**](WebhooksApi.md#createWebhook) | **POST** /webhooks | Create a webhook +[**deleteWebhook**](WebhooksApi.md#deleteWebhook) | **DELETE** /webhooks/{webhookId} | Delete a webhook +[**exportWebhooksHistory**](WebhooksApi.md#exportWebhooksHistory) | **POST** /webhooks/export | Export all webhook events +[**getWebhook**](WebhooksApi.md#getWebhook) | **GET** /webhooks/{webhookId} | Get a webhook details +[**getWebhooks**](WebhooksApi.md#getWebhooks) | **GET** /webhooks | Get all webhooks +[**updateWebhook**](WebhooksApi.md#updateWebhook) | **PUT** /webhooks/{webhookId} | Update a webhook + + +# **createWebhook** +> \Brevo\Client\Model\CreateModel createWebhook($createWebhook) + +Create a webhook + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\WebhooksApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$createWebhook = new \Brevo\Client\Model\CreateWebhook(); // \Brevo\Client\Model\CreateWebhook | Values to create a webhook + +try { + $result = $apiInstance->createWebhook($createWebhook); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling WebhooksApi->createWebhook: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createWebhook** | [**\Brevo\Client\Model\CreateWebhook**](../Model/CreateWebhook.md)| Values to create a webhook | + +### Return type + +[**\Brevo\Client\Model\CreateModel**](../Model/CreateModel.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **deleteWebhook** +> deleteWebhook($webhookId) + +Delete a webhook + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\WebhooksApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$webhookId = 789; // int | Id of the webhook + +try { + $apiInstance->deleteWebhook($webhookId); +} catch (Exception $e) { + echo 'Exception when calling WebhooksApi->deleteWebhook: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhookId** | **int**| Id of the webhook | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **exportWebhooksHistory** +> \Brevo\Client\Model\CreatedProcessId exportWebhooksHistory($exportWebhookHistory) + +Export all webhook events + +This endpoint will submit a request to get the history of webhooks in the CSV file. The link to download the CSV file will be sent to the webhook that was provided in the notifyURL. + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\WebhooksApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$exportWebhookHistory = new \Brevo\Client\Model\ExportWebhooksHistory(); // \Brevo\Client\Model\ExportWebhooksHistory | Values to submit for webhooks history + +try { + $result = $apiInstance->exportWebhooksHistory($exportWebhookHistory); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling WebhooksApi->exportWebhooksHistory: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **exportWebhookHistory** | [**\Brevo\Client\Model\ExportWebhooksHistory**](../Model/ExportWebhooksHistory.md)| Values to submit for webhooks history | + +### Return type + +[**\Brevo\Client\Model\CreatedProcessId**](../Model/CreatedProcessId.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getWebhook** +> \Brevo\Client\Model\GetWebhook getWebhook($webhookId) + +Get a webhook details + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\WebhooksApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$webhookId = 789; // int | Id of the webhook + +try { + $result = $apiInstance->getWebhook($webhookId); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling WebhooksApi->getWebhook: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhookId** | **int**| Id of the webhook | + +### Return type + +[**\Brevo\Client\Model\GetWebhook**](../Model/GetWebhook.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getWebhooks** +> \Brevo\Client\Model\GetWebhooks getWebhooks($type, $sort) + +Get all webhooks + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\WebhooksApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$type = "transactional"; // string | Filter on webhook type +$sort = "desc"; // string | Sort the results in the ascending/descending order of webhook creation + +try { + $result = $apiInstance->getWebhooks($type, $sort); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling WebhooksApi->getWebhooks: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **type** | **string**| Filter on webhook type | [optional] [default to transactional] + **sort** | **string**| Sort the results in the ascending/descending order of webhook creation | [optional] [default to desc] + +### Return type + +[**\Brevo\Client\Model\GetWebhooks**](../Model/GetWebhooks.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **updateWebhook** +> updateWebhook($webhookId, $updateWebhook) + +Update a webhook + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\WebhooksApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$webhookId = 789; // int | Id of the webhook +$updateWebhook = new \Brevo\Client\Model\UpdateWebhook(); // \Brevo\Client\Model\UpdateWebhook | Values to update a webhook + +try { + $apiInstance->updateWebhook($webhookId, $updateWebhook); +} catch (Exception $e) { + echo 'Exception when calling WebhooksApi->updateWebhook: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhookId** | **int**| Id of the webhook | + **updateWebhook** | [**\Brevo\Client\Model\UpdateWebhook**](../Model/UpdateWebhook.md)| Values to update a webhook | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + diff --git a/vendor/getbrevo/brevo-php/docs/Api/WhatsAppCampaignsApi.md b/vendor/getbrevo/brevo-php/docs/Api/WhatsAppCampaignsApi.md new file mode 100644 index 0000000..32b4a15 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Api/WhatsAppCampaignsApi.md @@ -0,0 +1,543 @@ +# Brevo\Client\WhatsAppCampaignsApi + +All URIs are relative to *https://api.brevo.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createWhatsAppCampaign**](WhatsAppCampaignsApi.md#createWhatsAppCampaign) | **POST** /whatsappCampaigns | Create and Send a WhatsApp campaign +[**createWhatsAppTemplate**](WhatsAppCampaignsApi.md#createWhatsAppTemplate) | **POST** /whatsppCampaigns/template | Create a WhatsApp template +[**deleteWhatsAppCampaign**](WhatsAppCampaignsApi.md#deleteWhatsAppCampaign) | **DELETE** /whatsappCampaigns/{campaignId} | Delete a WhatsApp campaign +[**getWhatsAppCampaign**](WhatsAppCampaignsApi.md#getWhatsAppCampaign) | **GET** /whatsappCampaigns/{campaignId} | Get a WhatsApp campaign +[**getWhatsAppCampaigns**](WhatsAppCampaignsApi.md#getWhatsAppCampaigns) | **GET** /whatsappCampaigns | Return all your created WhatsApp campaigns +[**getWhatsAppConfig**](WhatsAppCampaignsApi.md#getWhatsAppConfig) | **GET** /whatsappCampaigns/config | Get your WhatsApp API account information +[**getWhatsAppTemplates**](WhatsAppCampaignsApi.md#getWhatsAppTemplates) | **GET** /whatsappCampaigns/template-list | Return all your created WhatsApp templates +[**sendWhatsAppTemplateApproval**](WhatsAppCampaignsApi.md#sendWhatsAppTemplateApproval) | **POST** /whatsappCampaigns/template/approval/{templateId} | Send your WhatsApp template for approval +[**updateWhatsAppCampaign**](WhatsAppCampaignsApi.md#updateWhatsAppCampaign) | **PUT** /whatsappCampaigns/{campaignId} | Update a WhatsApp campaign + + +# **createWhatsAppCampaign** +> \Brevo\Client\Model\CreateModel createWhatsAppCampaign($whatsAppCampaigns) + +Create and Send a WhatsApp campaign + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\WhatsAppCampaignsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$whatsAppCampaigns = new \Brevo\Client\Model\CreateWhatsAppCampaign(); // \Brevo\Client\Model\CreateWhatsAppCampaign | Values to create a campaign + +try { + $result = $apiInstance->createWhatsAppCampaign($whatsAppCampaigns); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling WhatsAppCampaignsApi->createWhatsAppCampaign: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **whatsAppCampaigns** | [**\Brevo\Client\Model\CreateWhatsAppCampaign**](../Model/CreateWhatsAppCampaign.md)| Values to create a campaign | + +### Return type + +[**\Brevo\Client\Model\CreateModel**](../Model/CreateModel.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **createWhatsAppTemplate** +> \Brevo\Client\Model\CreateModel createWhatsAppTemplate($whatsAppTemplates) + +Create a WhatsApp template + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\WhatsAppCampaignsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$whatsAppTemplates = new \Brevo\Client\Model\CreateWhatsAppTemplate(); // \Brevo\Client\Model\CreateWhatsAppTemplate | Values to create a template + +try { + $result = $apiInstance->createWhatsAppTemplate($whatsAppTemplates); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling WhatsAppCampaignsApi->createWhatsAppTemplate: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **whatsAppTemplates** | [**\Brevo\Client\Model\CreateWhatsAppTemplate**](../Model/CreateWhatsAppTemplate.md)| Values to create a template | + +### Return type + +[**\Brevo\Client\Model\CreateModel**](../Model/CreateModel.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **deleteWhatsAppCampaign** +> deleteWhatsAppCampaign($campaignId) + +Delete a WhatsApp campaign + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\WhatsAppCampaignsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$campaignId = 789; // int | id of the campaign + +try { + $apiInstance->deleteWhatsAppCampaign($campaignId); +} catch (Exception $e) { + echo 'Exception when calling WhatsAppCampaignsApi->deleteWhatsAppCampaign: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **int**| id of the campaign | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getWhatsAppCampaign** +> \Brevo\Client\Model\GetWhatsappCampaignOverview getWhatsAppCampaign($campaignId) + +Get a WhatsApp campaign + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\WhatsAppCampaignsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$campaignId = 789; // int | Id of the campaign + +try { + $result = $apiInstance->getWhatsAppCampaign($campaignId); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling WhatsAppCampaignsApi->getWhatsAppCampaign: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **int**| Id of the campaign | + +### Return type + +[**\Brevo\Client\Model\GetWhatsappCampaignOverview**](../Model/GetWhatsappCampaignOverview.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getWhatsAppCampaigns** +> \Brevo\Client\Model\GetWhatsappCampaigns getWhatsAppCampaigns($startDate, $endDate, $limit, $offset, $sort) + +Return all your created WhatsApp campaigns + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\WhatsAppCampaignsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$startDate = "startDate_example"; // string | **Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the campaigns created. **Prefer to pass your timezone in date-time format for accurate result** +$endDate = "endDate_example"; // string | **Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the campaigns created. **Prefer to pass your timezone in date-time format for accurate result** +$limit = 50; // int | Number of documents per page +$offset = 0; // int | Index of the first document in the page +$sort = "desc"; // string | Sort the results in the ascending/descending order of record modification. Default order is **descending** if `sort` is not passed + +try { + $result = $apiInstance->getWhatsAppCampaigns($startDate, $endDate, $limit, $offset, $sort); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling WhatsAppCampaignsApi->getWhatsAppCampaigns: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **startDate** | **string**| **Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the campaigns created. **Prefer to pass your timezone in date-time format for accurate result** | [optional] + **endDate** | **string**| **Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the campaigns created. **Prefer to pass your timezone in date-time format for accurate result** | [optional] + **limit** | **int**| Number of documents per page | [optional] [default to 50] + **offset** | **int**| Index of the first document in the page | [optional] [default to 0] + **sort** | **string**| Sort the results in the ascending/descending order of record modification. Default order is **descending** if `sort` is not passed | [optional] [default to desc] + +### Return type + +[**\Brevo\Client\Model\GetWhatsappCampaigns**](../Model/GetWhatsappCampaigns.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getWhatsAppConfig** +> \Brevo\Client\Model\GetWhatsAppConfig getWhatsAppConfig() + +Get your WhatsApp API account information + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\WhatsAppCampaignsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); + +try { + $result = $apiInstance->getWhatsAppConfig(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling WhatsAppCampaignsApi->getWhatsAppConfig: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**\Brevo\Client\Model\GetWhatsAppConfig**](../Model/GetWhatsAppConfig.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getWhatsAppTemplates** +> \Brevo\Client\Model\GetWATemplates getWhatsAppTemplates($startDate, $endDate, $limit, $offset, $sort, $source) + +Return all your created WhatsApp templates + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\WhatsAppCampaignsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$startDate = "startDate_example"; // string | **Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates created. **Prefer to pass your timezone in date-time format for accurate result** +$endDate = "endDate_example"; // string | **Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates created. **Prefer to pass your timezone in date-time format for accurate result** +$limit = 50; // int | Number of documents per page +$offset = 0; // int | Index of the first document in the page +$sort = "desc"; // string | Sort the results in the ascending/descending order of record modification. Default order is **descending** if `sort` is not passed +$source = "source_example"; // string | source of the template + +try { + $result = $apiInstance->getWhatsAppTemplates($startDate, $endDate, $limit, $offset, $sort, $source); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling WhatsAppCampaignsApi->getWhatsAppTemplates: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **startDate** | **string**| **Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates created. **Prefer to pass your timezone in date-time format for accurate result** | [optional] + **endDate** | **string**| **Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates created. **Prefer to pass your timezone in date-time format for accurate result** | [optional] + **limit** | **int**| Number of documents per page | [optional] [default to 50] + **offset** | **int**| Index of the first document in the page | [optional] [default to 0] + **sort** | **string**| Sort the results in the ascending/descending order of record modification. Default order is **descending** if `sort` is not passed | [optional] [default to desc] + **source** | **string**| source of the template | [optional] + +### Return type + +[**\Brevo\Client\Model\GetWATemplates**](../Model/GetWATemplates.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **sendWhatsAppTemplateApproval** +> sendWhatsAppTemplateApproval($templateId) + +Send your WhatsApp template for approval + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\WhatsAppCampaignsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$templateId = 789; // int | id of the campaign + +try { + $apiInstance->sendWhatsAppTemplateApproval($templateId); +} catch (Exception $e) { + echo 'Exception when calling WhatsAppCampaignsApi->sendWhatsAppTemplateApproval: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateId** | **int**| id of the campaign | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **updateWhatsAppCampaign** +> updateWhatsAppCampaign($campaignId, $whatsAppCampaign) + +Update a WhatsApp campaign + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new Brevo\Client\Api\WhatsAppCampaignsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$campaignId = 789; // int | Id of the campaign +$whatsAppCampaign = new \Brevo\Client\Model\UpdateWhatsAppCampaign(); // \Brevo\Client\Model\UpdateWhatsAppCampaign | values to update WhatsApp Campaign + +try { + $apiInstance->updateWhatsAppCampaign($campaignId, $whatsAppCampaign); +} catch (Exception $e) { + echo 'Exception when calling WhatsAppCampaignsApi->updateWhatsAppCampaign: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **int**| Id of the campaign | + **whatsAppCampaign** | [**\Brevo\Client\Model\UpdateWhatsAppCampaign**](../Model/UpdateWhatsAppCampaign.md)| values to update WhatsApp Campaign | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + diff --git a/vendor/getbrevo/brevo-php/docs/Model/AbTestCampaignResult.md b/vendor/getbrevo/brevo-php/docs/Model/AbTestCampaignResult.md new file mode 100644 index 0000000..b3c5ae9 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/AbTestCampaignResult.md @@ -0,0 +1,17 @@ +# AbTestCampaignResult + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**winningVersion** | **string** | Winning Campaign Info. pending = Campaign has been picked for sending and winning version is yet to be decided, tie = A tie happened between both the versions, notAvailable = Campaign has not yet been picked for sending. | [optional] +**winningCriteria** | **string** | Criteria choosen for winning version (Open/Click) | [optional] +**winningSubjectLine** | **string** | Subject Line of current winning version | [optional] +**openRate** | **string** | Open rate for current winning version | [optional] +**clickRate** | **string** | Click rate for current winning version | [optional] +**winningVersionRate** | **string** | Open/Click rate for the winner version | [optional] +**statistics** | [**\Brevo\Client\Model\AbTestCampaignResultStatistics**](AbTestCampaignResultStatistics.md) | | [optional] +**clickedLinks** | [**\Brevo\Client\Model\AbTestCampaignResultClickedLinks**](AbTestCampaignResultClickedLinks.md) | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/AbTestCampaignResultClickedLinks.md b/vendor/getbrevo/brevo-php/docs/Model/AbTestCampaignResultClickedLinks.md new file mode 100644 index 0000000..64a07a5 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/AbTestCampaignResultClickedLinks.md @@ -0,0 +1,11 @@ +# AbTestCampaignResultClickedLinks + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**versionA** | [**\Brevo\Client\Model\AbTestVersionClicks**](AbTestVersionClicks.md) | | +**versionB** | [**\Brevo\Client\Model\AbTestVersionClicks**](AbTestVersionClicks.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/AbTestCampaignResultStatistics.md b/vendor/getbrevo/brevo-php/docs/Model/AbTestCampaignResultStatistics.md new file mode 100644 index 0000000..8a081d2 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/AbTestCampaignResultStatistics.md @@ -0,0 +1,15 @@ +# AbTestCampaignResultStatistics + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**openers** | [**\Brevo\Client\Model\AbTestVersionStats**](AbTestVersionStats.md) | | +**clicks** | [**\Brevo\Client\Model\AbTestVersionStats**](AbTestVersionStats.md) | | +**unsubscribed** | [**\Brevo\Client\Model\AbTestVersionStats**](AbTestVersionStats.md) | | +**hardBounces** | [**\Brevo\Client\Model\AbTestVersionStats**](AbTestVersionStats.md) | | +**softBounces** | [**\Brevo\Client\Model\AbTestVersionStats**](AbTestVersionStats.md) | | +**complaints** | [**\Brevo\Client\Model\AbTestVersionStats**](AbTestVersionStats.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/AbTestVersionClicks.md b/vendor/getbrevo/brevo-php/docs/Model/AbTestVersionClicks.md new file mode 100644 index 0000000..b178c69 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/AbTestVersionClicks.md @@ -0,0 +1,9 @@ +# AbTestVersionClicks + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/AbTestVersionClicksInner.md b/vendor/getbrevo/brevo-php/docs/Model/AbTestVersionClicksInner.md new file mode 100644 index 0000000..e83fd39 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/AbTestVersionClicksInner.md @@ -0,0 +1,12 @@ +# AbTestVersionClicksInner + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**link** | **string** | URL of the link | +**clicksCount** | **int** | Number of times a link is clicked | +**clickRate** | **string** | Percentage of clicks of link with respect to total clicks | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/AbTestVersionStats.md b/vendor/getbrevo/brevo-php/docs/Model/AbTestVersionStats.md new file mode 100644 index 0000000..270d356 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/AbTestVersionStats.md @@ -0,0 +1,11 @@ +# AbTestVersionStats + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**versionA** | **string** | percentage of an event for version A | +**versionB** | **string** | percentage of an event for version B | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/AddChildDomain.md b/vendor/getbrevo/brevo-php/docs/Model/AddChildDomain.md new file mode 100644 index 0000000..25d5a30 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/AddChildDomain.md @@ -0,0 +1,10 @@ +# AddChildDomain + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain** | **string** | Sender domain to add for a specific child account | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/AddContactToList.md b/vendor/getbrevo/brevo-php/docs/Model/AddContactToList.md new file mode 100644 index 0000000..8153336 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/AddContactToList.md @@ -0,0 +1,11 @@ +# AddContactToList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**emails** | **string[]** | Mandatory if IDs are not passed, ignored otherwise. Emails to add to a list. You can pass a maximum of 150 emails for addition in one request. If you need to add the emails in bulk, please prefer /contacts/import api. | [optional] +**ids** | **int[]** | Mandatory if Emails are not passed, ignored otherwise. Emails to add to a list. You can pass a maximum of 150 emails for addition in one request. If you need to add the emails in bulk, please prefer /contacts/import api. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/AddCredits.md b/vendor/getbrevo/brevo-php/docs/Model/AddCredits.md new file mode 100644 index 0000000..81e3694 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/AddCredits.md @@ -0,0 +1,11 @@ +# AddCredits + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sms** | **int** | Required if email credits are empty. SMS credits to be added to the child account | [optional] +**email** | **int** | Required if sms credits are empty. Email credits to be added to the child account | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/AuthenticateDomainModel.md b/vendor/getbrevo/brevo-php/docs/Model/AuthenticateDomainModel.md new file mode 100644 index 0000000..fdebfed --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/AuthenticateDomainModel.md @@ -0,0 +1,11 @@ +# AuthenticateDomainModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domainName** | **string** | Domain | +**message** | **string** | Success message | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/BlockDomain.md b/vendor/getbrevo/brevo-php/docs/Model/BlockDomain.md new file mode 100644 index 0000000..4410eda --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/BlockDomain.md @@ -0,0 +1,10 @@ +# BlockDomain + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain** | **string** | name of the domain to be blocked | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/Body.md b/vendor/getbrevo/brevo-php/docs/Model/Body.md new file mode 100644 index 0000000..a8259be --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/Body.md @@ -0,0 +1,11 @@ +# Body + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**groupName** | **string** | The name of the group of sub-accounts | +**subAccountIds** | **int[]** | Pass the list of sub-account Ids to be included in the group | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/Body1.md b/vendor/getbrevo/brevo-php/docs/Model/Body1.md new file mode 100644 index 0000000..4ddc5ee --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/Body1.md @@ -0,0 +1,11 @@ +# Body1 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**groupName** | **string** | The name of the group of sub-accounts | +**subAccountIds** | **int[]** | Pass the list of sub-account Ids to be included in the group | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/Body10.md b/vendor/getbrevo/brevo-php/docs/Model/Body10.md new file mode 100644 index 0000000..5552229 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/Body10.md @@ -0,0 +1,15 @@ +# Body10 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**visitorId** | **string** | visitor’s ID received <a href=\"https://developers.brevo.com/docs/conversations-webhooks\">from a webhook</a> or generated by you to <a href=\"https://developers.brevo.com/docs/customize-the-widget#identifying-existing-users\">bind existing user account to Conversations</a> | +**text** | **string** | message text | +**agentId** | **string** | agent ID. It can be found on agent’s page or received <a href=\"https://developers.brevo.com/docs/conversations-webhooks\">from a webhook</a>. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). | [optional] +**receivedFrom** | **string** | mark your messages to distinguish messages created by you from the others. | [optional] +**agentEmail** | **string** | agent email. When sending messages from a standalone system, it’s hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address. | [optional] +**agentName** | **string** | agent name | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/Body11.md b/vendor/getbrevo/brevo-php/docs/Model/Body11.md new file mode 100644 index 0000000..e74265d --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/Body11.md @@ -0,0 +1,10 @@ +# Body11 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**text** | **string** | edited message text | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/Body12.md b/vendor/getbrevo/brevo-php/docs/Model/Body12.md new file mode 100644 index 0000000..6ca690c --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/Body12.md @@ -0,0 +1,13 @@ +# Body12 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**visitorId** | **string** | visitor’s ID received <a href=\"https://developers.brevo.com/docs/conversations-webhooks\">from a webhook</a> or generated by you to <a href=\"https://developers.brevo.com/docs/customize-the-widget#identifying-existing-users\">bind existing user account to Conversations</a> | +**text** | **string** | message text | +**agentId** | **string** | agent ID. It can be found on agent’s page or received <a href=\"https://developers.brevo.com/docs/conversations-webhooks\">from a webhook</a>. Optional if `groupId` is set. | [optional] +**groupId** | **string** | group ID. It can be found on group’s page. Optional if `agentId` is set. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/Body13.md b/vendor/getbrevo/brevo-php/docs/Model/Body13.md new file mode 100644 index 0000000..c317817 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/Body13.md @@ -0,0 +1,10 @@ +# Body13 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**text** | **string** | edited message text | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/Body14.md b/vendor/getbrevo/brevo-php/docs/Model/Body14.md new file mode 100644 index 0000000..00d11af --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/Body14.md @@ -0,0 +1,13 @@ +# Body14 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**agentId** | **string** | agent ID. It can be found on agent’s page or received <a href=\"https://developers.brevo.com/docs/conversations-webhooks\">from a webhook</a>. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). | [optional] +**receivedFrom** | **string** | mark your messages to distinguish messages created by you from the others. | [optional] +**agentEmail** | **string** | agent email. When sending online pings from a standalone system, it’s hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address. If there’s no agent with the specified email address in your Brevo organization, a dummy agent will be created automatically. | [optional] +**agentName** | **string** | agent name. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/Body2.md b/vendor/getbrevo/brevo-php/docs/Model/Body2.md new file mode 100644 index 0000000..49657a1 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/Body2.md @@ -0,0 +1,12 @@ +# Body2 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Name of company | +**attributes** | **object** | Attributes for company creation | [optional] +**countryCode** | **int** | Country code if phone_number is passed in attributes. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/Body3.md b/vendor/getbrevo/brevo-php/docs/Model/Body3.md new file mode 100644 index 0000000..66ca62b --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/Body3.md @@ -0,0 +1,12 @@ +# Body3 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Name of company | [optional] +**attributes** | **object** | Attributes for company update | [optional] +**countryCode** | **int** | Country code if phone_number is passed in attributes. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/Body4.md b/vendor/getbrevo/brevo-php/docs/Model/Body4.md new file mode 100644 index 0000000..5229618 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/Body4.md @@ -0,0 +1,13 @@ +# Body4 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**linkContactIds** | **int[]** | Contact ids for contacts to be linked with company | [optional] +**unlinkContactIds** | **int[]** | Contact ids for contacts to be unlinked from company | [optional] +**linkDealsIds** | **string[]** | Deals ids for deals to be linked with company | [optional] +**unlinkDealsIds** | **string[]** | Deals ids for deals to be unlinked from company | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/Body5.md b/vendor/getbrevo/brevo-php/docs/Model/Body5.md new file mode 100644 index 0000000..12bb233 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/Body5.md @@ -0,0 +1,11 @@ +# Body5 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Name of deal | +**attributes** | **object** | Attributes for deal creation If you want to create a deal on a specific pipeline and stage you can use the following attributes `pipeline` and `deal_stage`. Pipeline and deal_stage are ids you can fetch using this endpoint `/crm/pipeline/details/{pipelineID}` | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/Body6.md b/vendor/getbrevo/brevo-php/docs/Model/Body6.md new file mode 100644 index 0000000..b9e9d14 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/Body6.md @@ -0,0 +1,11 @@ +# Body6 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Name of deal | [optional] +**attributes** | **object** | Attributes for deal update If you wish to update the pipeline of a deal you need to provide the `pipeline` and the `deal_stage`. Pipeline and deal_stage are ids you can fetch using this endpoint `/crm/pipeline/details/{pipelineID}` | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/Body7.md b/vendor/getbrevo/brevo-php/docs/Model/Body7.md new file mode 100644 index 0000000..409dc33 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/Body7.md @@ -0,0 +1,13 @@ +# Body7 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**linkContactIds** | **int[]** | Contact ids for contacts to be linked with deal | [optional] +**unlinkContactIds** | **int[]** | Contact ids for contacts to be unlinked from deal | [optional] +**linkCompanyIds** | **string[]** | Company ids to be linked with deal | [optional] +**unlinkCompanyIds** | **string[]** | Company ids to be unlinked from deal | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/Body8.md b/vendor/getbrevo/brevo-php/docs/Model/Body8.md new file mode 100644 index 0000000..a35d577 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/Body8.md @@ -0,0 +1,20 @@ +# Body8 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Name of task | +**duration** | **int** | Duration of task in milliseconds [1 minute = 60000 ms] | [optional] +**taskTypeId** | **string** | Id for type of task e.g Call / Email / Meeting etc. | +**date** | [**\DateTime**] | Task due date and time | +**notes** | **string** | Notes added to a task | [optional] +**done** | **bool** | Task marked as done | [optional] +**assignToId** | **string** | User id to whom task is assigned | [optional] +**contactsIds** | **int[]** | Contact ids for contacts linked to this task | [optional] +**dealsIds** | **string[]** | Deal ids for deals a task is linked to | [optional] +**companiesIds** | **string[]** | Companies ids for companies a task is linked to | [optional] +**reminder** | [**\Brevo\Client\Model\TaskReminder**](TaskReminder.md) | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/Body9.md b/vendor/getbrevo/brevo-php/docs/Model/Body9.md new file mode 100644 index 0000000..393dac0 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/Body9.md @@ -0,0 +1,19 @@ +# Body9 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Name of task | [optional] +**duration** | **int** | Duration of task in milliseconds [1 minute = 60000 ms] | [optional] +**taskTypeId** | **string** | Id for type of task e.g Call / Email / Meeting etc. | [optional] +**date** | [**\DateTime**] | Task date/time | [optional] +**notes** | **string** | Notes added to a task | [optional] +**done** | **bool** | Task marked as done | [optional] +**assignToId** | **string** | User id to whom task is assigned | [optional] +**contactsIds** | **int[]** | Contact ids for contacts linked to this task | [optional] +**dealsIds** | **string[]** | Deal ids for deals a task is linked to | [optional] +**companiesIds** | **string[]** | Companies ids for companies a task is linked to | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/BodyVariablesItems.md b/vendor/getbrevo/brevo-php/docs/Model/BodyVariablesItems.md new file mode 100644 index 0000000..71240ad --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/BodyVariablesItems.md @@ -0,0 +1,9 @@ +# BodyVariablesItems + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CompaniesList.md b/vendor/getbrevo/brevo-php/docs/Model/CompaniesList.md new file mode 100644 index 0000000..ec65186 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CompaniesList.md @@ -0,0 +1,10 @@ +# CompaniesList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**items** | [**\Brevo\Client\Model\Company[]**](Company.md) | List of compaies | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/Company.md b/vendor/getbrevo/brevo-php/docs/Model/Company.md new file mode 100644 index 0000000..7bfb6b3 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/Company.md @@ -0,0 +1,13 @@ +# Company + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique company id | [optional] +**attributes** | **object** | Company attributes with values | [optional] +**linkedContactsIds** | **int[]** | Contact ids for contacts linked to this company | [optional] +**linkedDealsIds** | **string[]** | Deals ids for companies linked to this company | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CompanyAttributes.md b/vendor/getbrevo/brevo-php/docs/Model/CompanyAttributes.md new file mode 100644 index 0000000..3698f9e --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CompanyAttributes.md @@ -0,0 +1,9 @@ +# CompanyAttributes + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CompanyAttributesInner.md b/vendor/getbrevo/brevo-php/docs/Model/CompanyAttributesInner.md new file mode 100644 index 0000000..c0011f0 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CompanyAttributesInner.md @@ -0,0 +1,14 @@ +# CompanyAttributesInner + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**internalName** | **string** | | [optional] +**label** | **string** | | [optional] +**attributeTypeName** | **string** | | [optional] +**attributeOptions** | **object[]** | | [optional] +**isRequired** | **bool** | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/ComponentItems.md b/vendor/getbrevo/brevo-php/docs/Model/ComponentItems.md new file mode 100644 index 0000000..9b44af1 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/ComponentItems.md @@ -0,0 +1,11 @@ +# ComponentItems + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | | [optional] +**text** | **string** | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/Contact.md b/vendor/getbrevo/brevo-php/docs/Model/Contact.md new file mode 100644 index 0000000..aa35bd3 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/Contact.md @@ -0,0 +1,17 @@ +# Contact + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**virtualNextTask** | **object** | Next incomplete task of contact | [optional] +**email** | **string** | Contact email | +**assignToId** | **string** | User id to whom contact is assigned | [optional] +**contactsId** | **int** | Contact id | [optional] +**crmLists** | **object** | CRM lists in which contact is added | +**attributes** | **object** | Contact attributes e.g firstname / lastname / SMS etc. | [optional] +**createdAt** | [**\DateTime**] | Contact created date/time | [optional] +**updatedAt** | [**\DateTime**] | Contact updated date/time | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/ConversationsMessageFile.md b/vendor/getbrevo/brevo-php/docs/Model/ConversationsMessageFile.md new file mode 100644 index 0000000..d9d691d --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/ConversationsMessageFile.md @@ -0,0 +1,14 @@ +# ConversationsMessageFile + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filename** | **string** | Name of the file | [optional] +**size** | **int** | Size in bytes | [optional] +**isImage** | **bool** | Whether the file is an image | [optional] +**url** | **string** | URL of the file | [optional] +**imageInfo** | [**\Brevo\Client\Model\ConversationsMessageFileImageInfo**](ConversationsMessageFileImageInfo.md) | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/Conversationsmessage.md b/vendor/getbrevo/brevo-php/docs/Model/Conversationsmessage.md new file mode 100644 index 0000000..7c0dc49 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/Conversationsmessage.md @@ -0,0 +1,19 @@ +# ConversationsMessage + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Message ID. It can be used for further manipulations with the message. | [optional] +**type** | **string** | `\"agent\"` for agents’ messages, `\"visitor\"` for visitors’ messages. | [optional] +**text** | **string** | Message text or name of the attached file | [optional] +**visitorId** | **string** | visitor’s ID | [optional] +**agentId** | **string** | ID of the agent on whose behalf the message was sent (only in messages sent by an agent). | [optional] +**agentName** | **string** | Agent’s name as displayed to the visitor. Only in the messages sent by an agent. | [optional] +**createdAt** | **int** | Timestamp in milliseconds. | [optional] +**isPushed** | **bool** | `true` for pushed messages | [optional] +**receivedFrom** | **string** | In two-way integrations, messages sent via REST API can be marked with receivedFrom property and then filtered out when received in a webhook to avoid infinite loop. | [optional] +**file** | [**\Brevo\Client\Model\ConversationsMessageFile**](ConversationsMessageFile.md) | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/ConversationsmessageFileImageInfo.md b/vendor/getbrevo/brevo-php/docs/Model/ConversationsmessageFileImageInfo.md new file mode 100644 index 0000000..12e18ca --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/ConversationsmessageFileImageInfo.md @@ -0,0 +1,12 @@ +# ConversationsMessageFileImageInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**width** | **int** | Width of the image | [optional] +**height** | **int** | height of the image | [optional] +**previewUrl** | **string** | URL of the preview | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateApiKeyRequest.md b/vendor/getbrevo/brevo-php/docs/Model/CreateApiKeyRequest.md new file mode 100644 index 0000000..252d23e --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateApiKeyRequest.md @@ -0,0 +1,11 @@ +# CreateApiKeyRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Id of the sub-account organization | +**name** | **string** | Name of the API key | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateApiKeyResponse.md b/vendor/getbrevo/brevo-php/docs/Model/CreateApiKeyResponse.md new file mode 100644 index 0000000..3f3e3ea --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateApiKeyResponse.md @@ -0,0 +1,11 @@ +# CreateApiKeyResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **string** | Status of the API operation. | [optional] +**key** | **string** | API Key | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateAttribute.md b/vendor/getbrevo/brevo-php/docs/Model/CreateAttribute.md new file mode 100644 index 0000000..357be1f --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateAttribute.md @@ -0,0 +1,13 @@ +# CreateAttribute + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **string** | Value of the attribute. Use only if the attribute's category is 'calculated' or 'global' | [optional] +**isRecurring** | **bool** | Type of the attribute. Use only if the attribute's category is 'calculated' or 'global' | [optional] +**enumeration** | [**\Brevo\Client\Model\CreateAttributeEnumeration[]**](CreateAttributeEnumeration.md) | List of values and labels that the attribute can take. Use only if the attribute's category is \"category\". For example, [{\"value\":1, \"label\":\"male\"}, {\"value\":2, \"label\":\"female\"}] | [optional] +**type** | **string** | Type of the attribute. Use only if the attribute's category is 'normal', 'category' or 'transactional' ( type 'boolean' is only available if the category is 'normal' attribute, type 'id' is only available if the category is 'transactional' attribute & type 'category' is only available if the category is 'category' attribute ) | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateAttributeEnumeration.md b/vendor/getbrevo/brevo-php/docs/Model/CreateAttributeEnumeration.md new file mode 100644 index 0000000..a88a8af --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateAttributeEnumeration.md @@ -0,0 +1,11 @@ +# CreateAttributeEnumeration + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **int** | Id of the value | +**label** | **string** | Label of the value | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateCategoryModel.md b/vendor/getbrevo/brevo-php/docs/Model/CreateCategoryModel.md new file mode 100644 index 0000000..b159bae --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateCategoryModel.md @@ -0,0 +1,10 @@ +# CreateCategoryModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | ID of the category when a new category is created | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateChild.md b/vendor/getbrevo/brevo-php/docs/Model/CreateChild.md new file mode 100644 index 0000000..cc18ace --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateChild.md @@ -0,0 +1,15 @@ +# CreateChild + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **string** | Email address to create the child account | +**firstName** | **string** | First name to use to create the child account | +**lastName** | **string** | Last name to use to create the child account | +**companyName** | **string** | Company name to use to create the child account | +**password** | **string** | Password for the child account to login | +**language** | **string** | Language of the child account | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateContact.md b/vendor/getbrevo/brevo-php/docs/Model/CreateContact.md new file mode 100644 index 0000000..84fe8f4 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateContact.md @@ -0,0 +1,17 @@ +# CreateContact + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **string** | Email address of the user. Mandatory if \"SMS\" field is not passed in \"attributes\" parameter. Mobile Number in \"SMS\" field should be passed with proper country code. For example {'SMS':'+91xxxxxxxxxx'} or {'SMS':'0091xxxxxxxxxx'} | [optional] +**extId** | **string** | Pass your own Id to create a contact. | [optional] +**attributes** | **object** | Pass the set of attributes and their values. The attribute's parameter should be passed in capital letter while creating a contact. Values that don't match the attribute type (e.g. text or string in a date attribute) will be ignored.These attributes must be present in your Brevo account. For eg. {\"FNAME\":\"Elly\", \"LNAME\":\"Roger\"} | [optional] +**emailBlacklisted** | **bool** | Set this field to blacklist the contact for emails (emailBlacklisted = true) | [optional] +**smsBlacklisted** | **bool** | Set this field to blacklist the contact for SMS (smsBlacklisted = true) | [optional] +**listIds** | **int[]** | Ids of the lists to add the contact to | [optional] +**updateEnabled** | **bool** | Facilitate to update the existing contact in the same request (updateEnabled = true) | [optional] [default to false] +**smtpBlacklistSender** | **string[]** | transactional email forbidden sender for contact. Use only for email Contact ( only available if updateEnabled = true ) | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateCouponCollection.md b/vendor/getbrevo/brevo-php/docs/Model/CreateCouponCollection.md new file mode 100644 index 0000000..343ba37 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateCouponCollection.md @@ -0,0 +1,11 @@ +# CreateCouponCollection + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **object** | Name of the collection with no white spaces between words | +**defaultCoupon** | **object** | A default coupon to be used in case there are no coupons left | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateCoupons.md b/vendor/getbrevo/brevo-php/docs/Model/CreateCoupons.md new file mode 100644 index 0000000..10b5195 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateCoupons.md @@ -0,0 +1,11 @@ +# CreateCoupons + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**collectionId** | **string** | The id of the coupon collection for which the coupons will be created | +**coupons** | **string[]** | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateDoiContact.md b/vendor/getbrevo/brevo-php/docs/Model/CreateDoiContact.md new file mode 100644 index 0000000..8ec195d --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateDoiContact.md @@ -0,0 +1,15 @@ +# CreateDoiContact + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **string** | Email address where the confirmation email will be sent. This email address will be the identifier for all other contact attributes. | +**attributes** | **object** | Pass the set of attributes and their values. These attributes must be present in your Brevo account. For eg. {'FNAME':'Elly', 'LNAME':'Roger'} | [optional] +**includeListIds** | **int[]** | Lists under user account where contact should be added | +**excludeListIds** | **int[]** | Lists under user account where contact should not be added | [optional] +**templateId** | **int** | Id of the Double opt-in (DOI) template | +**redirectionUrl** | **string** | URL of the web page that user will be redirected to after clicking on the double opt in URL. When editing your DOI template you can reference this URL by using the tag {{ params.DOIurl }}. | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateDomain.md b/vendor/getbrevo/brevo-php/docs/Model/CreateDomain.md new file mode 100644 index 0000000..bffba78 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateDomain.md @@ -0,0 +1,10 @@ +# CreateDomain + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Domain name | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateDomainModel.md b/vendor/getbrevo/brevo-php/docs/Model/CreateDomainModel.md new file mode 100644 index 0000000..34b5901 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateDomainModel.md @@ -0,0 +1,13 @@ +# CreateDomainModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | ID of the Domain created | +**domainName** | **string** | Domain | [optional] +**message** | **string** | Success message | [optional] +**dnsRecords** | [**\Brevo\Client\Model\CreateDomainModelDnsRecords**](CreateDomainModelDnsRecords.md) | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateDomainModelDnsRecords.md b/vendor/getbrevo/brevo-php/docs/Model/CreateDomainModelDnsRecords.md new file mode 100644 index 0000000..c697281 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateDomainModelDnsRecords.md @@ -0,0 +1,11 @@ +# CreateDomainModelDnsRecords + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dkimRecord** | [**\Brevo\Client\Model\CreateDomainModelDnsRecordsDkimRecord**](CreateDomainModelDnsRecordsDkimRecord.md) | | [optional] +**brevoCode** | [**\Brevo\Client\Model\CreateDomainModelDnsRecordsDkimRecord**](CreateDomainModelDnsRecordsDkimRecord.md) | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateDomainModelDnsRecordsDkimRecord.md b/vendor/getbrevo/brevo-php/docs/Model/CreateDomainModelDnsRecordsDkimRecord.md new file mode 100644 index 0000000..b45d54c --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateDomainModelDnsRecordsDkimRecord.md @@ -0,0 +1,13 @@ +# CreateDomainModelDnsRecordsDkimRecord + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | | [optional] +**value** | **string** | | [optional] +**hostName** | **string** | | [optional] +**status** | **bool** | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateEmailCampaign.md b/vendor/getbrevo/brevo-php/docs/Model/CreateEmailCampaign.md new file mode 100644 index 0000000..85dd214 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateEmailCampaign.md @@ -0,0 +1,40 @@ +# CreateEmailCampaign + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tag** | **string** | Tag of the campaign | [optional] +**sender** | [**\Brevo\Client\Model\CreateEmailCampaignSender**](CreateEmailCampaignSender.md) | | +**name** | **string** | Name of the campaign | +**htmlContent** | **string** | Mandatory if htmlUrl and templateId are empty. Body of the message (HTML) | [optional] +**htmlUrl** | **string** | Mandatory if htmlContent and templateId are empty. Url to the message (HTML) | [optional] +**templateId** | **int** | Mandatory if htmlContent and htmlUrl are empty. Id of the transactional email template with status 'active'. Used to copy only its content fetched from htmlContent/htmlUrl to an email campaign for RSS feature. | [optional] +**scheduledAt** | **string** | Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. If sendAtBestTime is set to true, your campaign will be sent according to the date passed (ignoring the time part). | [optional] +**subject** | **string** | Subject of the campaign. Mandatory if abTesting is false. Ignored if abTesting is true. | [optional] +**previewText** | **string** | Preview text or preheader of the email campaign | [optional] +**replyTo** | **string** | Email on which the campaign recipients will be able to reply to | [optional] +**toField** | **string** | To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your Brevo account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization | [optional] +**recipients** | [**\Brevo\Client\Model\CreateEmailCampaignRecipients**](CreateEmailCampaignRecipients.md) | | [optional] +**attachmentUrl** | **string** | Absolute url of the attachment (no local file). 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] +**inlineImageActivation** | **bool** | Use true to embedded the images in your email. Final size of the email should be less than 4MB. Campaigns with embedded images can not be sent to more than 5000 contacts | [optional] [default to false] +**mirrorActive** | **bool** | Use true to enable the mirror link | [optional] +**footer** | **string** | Footer of the email campaign | [optional] +**header** | **string** | Header of the email campaign | [optional] +**utmCampaign** | **string** | Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed | [optional] +**params** | **object** | Pass the set of attributes to customize the type classic campaign. For example, `{\"FNAME\":\"Joe\", \"LNAME:\"Doe\"}`. Only available if 'type' is 'classic'. It's considered only if campaign is in New Template Language format. The New Template Language is dependent on the values of 'subject', 'htmlContent/htmlUrl', 'sender.name' & 'toField' | [optional] +**sendAtBestTime** | **bool** | Set this to true if you want to send your campaign at best time. | [optional] [default to false] +**abTesting** | **bool** | Status of A/B Test. abTesting = false means it is disabled, & abTesting = true means it is enabled. 'subjectA', 'subjectB', 'splitRule', 'winnerCriteria' & 'winnerDelay' will be considered when abTesting is set to true. 'subjectA' & 'subjectB' are mandatory together & 'subject' if passed is ignored. Can be set to true only if 'sendAtBestTime' is 'false'. You will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B | [optional] [default to false] +**subjectA** | **string** | Subject A of the campaign. Mandatory if abTesting = true. subjectA & subjectB should have unique value | [optional] +**subjectB** | **string** | Subject B of the campaign. Mandatory if abTesting = true. subjectA & subjectB should have unique value | [optional] +**splitRule** | **int** | Add the size of your test groups. Mandatory if abTesting = true & 'recipients' is passed. We'll send version A and B to a random sample of recipients, and then the winning version to everyone else | [optional] +**winnerCriteria** | **string** | Choose the metrics that will determinate the winning version. Mandatory if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerCriteria' is ignored if passed | [optional] +**winnerDelay** | **int** | Choose the duration of the test in hours. Maximum is 7 days, pass 24*7 = 168 hours. The winning version will be sent at the end of the test. Mandatory if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerDelay' is ignored if passed | [optional] +**ipWarmupEnable** | **bool** | Available for dedicated ip clients. Set this to true if you wish to warm up your ip. | [optional] [default to false] +**initialQuota** | **int** | Mandatory if ipWarmupEnable is set to true. Set an initial quota greater than 1 for warming up your ip. We recommend you set a value of 3000. | [optional] +**increaseRate** | **int** | Mandatory if ipWarmupEnable is set to true. Set a percentage increase rate for warming up your ip. We recommend you set the increase rate to 30% per day. If you want to send the same number of emails every day, set the daily increase value to 0%. | [optional] +**unsubscriptionPageId** | **string** | Enter an unsubscription page id. The page id is a 24 digit alphanumeric id that can be found in the URL when editing the page. If not entered, then the default unsubscription page will be used. | [optional] +**updateFormId** | **string** | Mandatory if templateId is used containing the {{ update_profile }} tag. Enter an update profile form id. The form id is a 24 digit alphanumeric id that can be found in the URL when editing the form. If not entered, then the default update profile form will be used. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateEmailCampaignRecipients.md b/vendor/getbrevo/brevo-php/docs/Model/CreateEmailCampaignRecipients.md new file mode 100644 index 0000000..3c037ee --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateEmailCampaignRecipients.md @@ -0,0 +1,12 @@ +# CreateEmailCampaignRecipients + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**exclusionListIds** | **int[]** | List ids to exclude from the campaign | [optional] +**listIds** | **int[]** | Mandatory if scheduledAt is not empty. List Ids to send the campaign to | [optional] +**segmentIds** | **int[]** | Mandatory if listIds are not used. Segment ids to send the campaign to. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateEmailCampaignSender.md b/vendor/getbrevo/brevo-php/docs/Model/CreateEmailCampaignSender.md new file mode 100644 index 0000000..2892c2e --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateEmailCampaignSender.md @@ -0,0 +1,12 @@ +# CreateEmailCampaignSender + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Sender Name | [optional] +**email** | **string** | Sender email | +**id** | **int** | Select the sender for the campaign on the basis of sender id. In order to select a sender with specific pool of IP’s, dedicated ip users shall pass id (instead of email). | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateExternalFeed.md b/vendor/getbrevo/brevo-php/docs/Model/CreateExternalFeed.md new file mode 100644 index 0000000..c86ac9e --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateExternalFeed.md @@ -0,0 +1,18 @@ +# CreateExternalFeed + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Name of the feed | +**url** | **string** | URL of the feed | +**authType** | **string** | Auth type of the feed: * `basic` * `token` * `noAuth` | [optional] [default to 'noAuth'] +**username** | **string** | Username for authType `basic` | [optional] +**password** | **string** | Password for authType `basic` | [optional] +**token** | **string** | Token for authType `token` | [optional] +**headers** | [**\Brevo\Client\Model\GetExternalFeedByUUIDHeaders[]**](GetExternalFeedByUUIDHeaders.md) | Custom headers for the feed | [optional] +**maxRetries** | **int** | Maximum number of retries on the feed url | [optional] +**cache** | **bool** | Toggle caching of feed url response | [optional] [default to false] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateList.md b/vendor/getbrevo/brevo-php/docs/Model/CreateList.md new file mode 100644 index 0000000..78c8344 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateList.md @@ -0,0 +1,11 @@ +# CreateList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Name of the list | +**folderId** | **int** | Id of the parent folder in which this list is to be created | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateModel.md b/vendor/getbrevo/brevo-php/docs/Model/CreateModel.md new file mode 100644 index 0000000..f660732 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateModel.md @@ -0,0 +1,10 @@ +# CreateModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | ID of the object created | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateProductModel.md b/vendor/getbrevo/brevo-php/docs/Model/CreateProductModel.md new file mode 100644 index 0000000..38538c5 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateProductModel.md @@ -0,0 +1,10 @@ +# CreateProductModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | ID of the Product when a new product is created | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateReseller.md b/vendor/getbrevo/brevo-php/docs/Model/CreateReseller.md new file mode 100644 index 0000000..c2a7e84 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateReseller.md @@ -0,0 +1,11 @@ +# CreateReseller + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**authKey** | **string** | AuthKey of Reseller child created | +**id** | **int** | Id of Reseller child created | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateSender.md b/vendor/getbrevo/brevo-php/docs/Model/CreateSender.md new file mode 100644 index 0000000..d862758 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateSender.md @@ -0,0 +1,12 @@ +# CreateSender + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | From Name to use for the sender | +**email** | **string** | From email to use for the sender. A verification email will be sent to this address. | +**ips** | [**\Brevo\Client\Model\CreateSenderIps[]**](CreateSenderIps.md) | Mandatory in case of dedicated IP, IPs to associate to the sender | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateSenderIps.md b/vendor/getbrevo/brevo-php/docs/Model/CreateSenderIps.md new file mode 100644 index 0000000..18c602d --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateSenderIps.md @@ -0,0 +1,12 @@ +# CreateSenderIps + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ip** | **string** | Dedicated IP available in your account | +**domain** | **string** | Domain of the IP | +**weight** | **int** | Weight to apply to the IP. Sum of all IP weights must be 100. Should be passed for either ALL or NONE of the IPs. If it's not passed, the sending will be equally balanced on all IPs. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateSenderModel.md b/vendor/getbrevo/brevo-php/docs/Model/CreateSenderModel.md new file mode 100644 index 0000000..ae4b381 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateSenderModel.md @@ -0,0 +1,12 @@ +# CreateSenderModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | ID of the Sender created | +**spfError** | **bool** | Status of SPF configuration for the sender (true = SPF not well configured, false = SPF well configured) | [optional] +**dkimError** | **bool** | Status of DKIM configuration for the sender (true = DKIM not well configured, false = DKIM well configured) | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateSmsCampaign.md b/vendor/getbrevo/brevo-php/docs/Model/CreateSmsCampaign.md new file mode 100644 index 0000000..769bfa1 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateSmsCampaign.md @@ -0,0 +1,17 @@ +# CreateSmsCampaign + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Name of the campaign | +**sender** | **string** | Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters** | +**content** | **string** | Content of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS | +**recipients** | [**\Brevo\Client\Model\CreateSmsCampaignRecipients**](CreateSmsCampaignRecipients.md) | | [optional] +**scheduledAt** | **string** | UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. | [optional] +**unicodeEnabled** | **bool** | Format of the message. It indicates whether the content should be treated as unicode or not. | [optional] [default to false] +**organisationPrefix** | **string** | A recognizable prefix will ensure your audience knows who you are. Recommended by U.S. carriers. This will be added as your Brand Name before the message content. **Prefer verifying maximum length of 160 characters including this prefix in message content to avoid multiple sending of same sms.** | [optional] +**unsubscribeInstruction** | **string** | Instructions to unsubscribe from future communications. Recommended by U.S. carriers. Must include **STOP** keyword. This will be added as instructions after the end of message content. **Prefer verifying maximum length of 160 characters including this instructions in message content to avoid multiple sending of same sms.** | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateSmsCampaignRecipients.md b/vendor/getbrevo/brevo-php/docs/Model/CreateSmsCampaignRecipients.md new file mode 100644 index 0000000..fb8799d --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateSmsCampaignRecipients.md @@ -0,0 +1,11 @@ +# CreateSmsCampaignRecipients + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**listIds** | **int[]** | Lists Ids to send the campaign to. REQUIRED if scheduledAt is not empty | +**exclusionListIds** | **int[]** | List ids which have to be excluded from a campaign | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateSmtpEmail.md b/vendor/getbrevo/brevo-php/docs/Model/CreateSmtpEmail.md new file mode 100644 index 0000000..64940e9 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateSmtpEmail.md @@ -0,0 +1,11 @@ +# CreateSmtpEmail + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**messageId** | **string** | Message ID of the transactional email sent | [optional] +**messageIds** | **string[]** | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateSmtpTemplate.md b/vendor/getbrevo/brevo-php/docs/Model/CreateSmtpTemplate.md new file mode 100644 index 0000000..847908f --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateSmtpTemplate.md @@ -0,0 +1,19 @@ +# CreateSmtpTemplate + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tag** | **string** | Tag of the template | [optional] +**sender** | [**\Brevo\Client\Model\CreateSmtpTemplateSender**](CreateSmtpTemplateSender.md) | | +**templateName** | **string** | Name of the template | +**htmlContent** | **string** | Body of the message (HTML version). The field must have more than 10 characters. REQUIRED if htmlUrl is empty | [optional] +**htmlUrl** | **string** | Url which contents the body of the email message. REQUIRED if htmlContent is empty | [optional] +**subject** | **string** | Subject of the template | +**replyTo** | **string** | Email on which campaign recipients will be able to reply to | [optional] +**toField** | **string** | To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your Brevo account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization | [optional] +**attachmentUrl** | **string** | Absolute url of the attachment (no local file). 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] +**isActive** | **bool** | Status of template. isActive = true means template is active and isActive = false means template is inactive | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateSmtpTemplateSender.md b/vendor/getbrevo/brevo-php/docs/Model/CreateSmtpTemplateSender.md new file mode 100644 index 0000000..474ffc3 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateSmtpTemplateSender.md @@ -0,0 +1,12 @@ +# CreateSmtpTemplateSender + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Name of the sender. If not passed, will be set to default | [optional] +**email** | **string** | Email of the sender | [optional] +**id** | **int** | Select the sender for the template on the basis of sender id. In order to select a sender with specific pool of IP’s, dedicated ip users shall pass id (instead of email). | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateSubAccount.md b/vendor/getbrevo/brevo-php/docs/Model/CreateSubAccount.md new file mode 100644 index 0000000..ae80e64 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateSubAccount.md @@ -0,0 +1,13 @@ +# CreateSubAccount + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**companyName** | **string** | Set the name of the sub-account company | +**email** | **string** | Email address for the organization | +**language** | **string** | Set the language of the sub-account | [optional] +**timezone** | **string** | Set the timezone of the sub-account | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateSubAccountResponse.md b/vendor/getbrevo/brevo-php/docs/Model/CreateSubAccountResponse.md new file mode 100644 index 0000000..db5fd6b --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateSubAccountResponse.md @@ -0,0 +1,10 @@ +# CreateSubAccountResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | ID of the sub-account created | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateUpdateBatchCategory.md b/vendor/getbrevo/brevo-php/docs/Model/CreateUpdateBatchCategory.md new file mode 100644 index 0000000..1549710 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateUpdateBatchCategory.md @@ -0,0 +1,11 @@ +# CreateUpdateBatchCategory + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**categories** | [**\Brevo\Client\Model\CreateUpdateCategories[]**](CreateUpdateCategories.md) | array of categories objects | +**updateEnabled** | **bool** | Facilitate to update the existing categories in the same request (updateEnabled = true) | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateUpdateBatchCategoryModel.md b/vendor/getbrevo/brevo-php/docs/Model/CreateUpdateBatchCategoryModel.md new file mode 100644 index 0000000..1934ae9 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateUpdateBatchCategoryModel.md @@ -0,0 +1,11 @@ +# CreateUpdateBatchCategoryModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**createdCount** | **int** | Number of the new created categories | [optional] +**updatedCount** | **int** | Number of the existing categories updated | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateUpdateBatchProducts.md b/vendor/getbrevo/brevo-php/docs/Model/CreateUpdateBatchProducts.md new file mode 100644 index 0000000..19d9cae --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateUpdateBatchProducts.md @@ -0,0 +1,11 @@ +# CreateUpdateBatchProducts + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**products** | [**\Brevo\Client\Model\CreateUpdateProducts[]**](CreateUpdateProducts.md) | array of products objects | +**updateEnabled** | **bool** | Facilitate to update the existing categories in the same request (updateEnabled = true) | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateUpdateBatchProductsModel.md b/vendor/getbrevo/brevo-php/docs/Model/CreateUpdateBatchProductsModel.md new file mode 100644 index 0000000..7b9821c --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateUpdateBatchProductsModel.md @@ -0,0 +1,11 @@ +# CreateUpdateBatchProductsModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**createdCount** | **int** | Number of the new created products | [optional] +**updatedCount** | **int** | Number of the existing products updated | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateUpdateCategories.md b/vendor/getbrevo/brevo-php/docs/Model/CreateUpdateCategories.md new file mode 100644 index 0000000..b08d1be --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateUpdateCategories.md @@ -0,0 +1,13 @@ +# CreateUpdateCategories + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique Category ID as saved in the shop | +**name** | **string** | **Mandatory in case of creation**. Name of the Category, as displayed in the shop | [optional] +**url** | **string** | URL to the category | [optional] +**deletedAt** | **string** | UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the category deleted from the shop's database | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateUpdateCategory.md b/vendor/getbrevo/brevo-php/docs/Model/CreateUpdateCategory.md new file mode 100644 index 0000000..244ba34 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateUpdateCategory.md @@ -0,0 +1,14 @@ +# CreateUpdateCategory + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique Category ID as saved in the shop | +**name** | **string** | **Mandatory in case of creation**. Name of the Category, as displayed in the shop | [optional] +**url** | **string** | URL to the category | [optional] +**updateEnabled** | **bool** | Facilitate to update the existing category in the same request (updateEnabled = true) | [optional] [default to false] +**deletedAt** | **string** | UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the category deleted from the shop's database | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateUpdateContactModel.md b/vendor/getbrevo/brevo-php/docs/Model/CreateUpdateContactModel.md new file mode 100644 index 0000000..1fbb07c --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateUpdateContactModel.md @@ -0,0 +1,10 @@ +# CreateUpdateContactModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | ID of the contact when a new contact is created | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateUpdateFolder.md b/vendor/getbrevo/brevo-php/docs/Model/CreateUpdateFolder.md new file mode 100644 index 0000000..0a4d2e0 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateUpdateFolder.md @@ -0,0 +1,10 @@ +# CreateUpdateFolder + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Name of the folder | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateUpdateProducts.md b/vendor/getbrevo/brevo-php/docs/Model/CreateUpdateProducts.md new file mode 100644 index 0000000..49b848b --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateUpdateProducts.md @@ -0,0 +1,19 @@ +# CreateUpdateProducts + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Product ID for which you requested the details | +**name** | **string** | Mandatory in case of creation**. Name of the product for which you requested the details | +**url** | **string** | URL to the product | [optional] +**imageUrl** | **string** | Absolute URL to the cover image of the product | [optional] +**sku** | **string** | Product identifier from the shop | [optional] +**price** | **float** | Price of the product | [optional] +**categories** | **string[]** | Category ID-s of the product | [optional] +**parentId** | **string** | Parent product id of the product | [optional] +**metaInfo** | **map[string,string]** | Meta data of product such as description, vendor, producer, stock level. The size of cumulative metaInfo shall not exceed **1000 KB**. Maximum length of metaInfo object can be 10. | [optional] +**deletedAt** | **string** | UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the product deleted from the shop's database | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateUpdateproduct.md b/vendor/getbrevo/brevo-php/docs/Model/CreateUpdateproduct.md new file mode 100644 index 0000000..8890bf3 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateUpdateproduct.md @@ -0,0 +1,20 @@ +# CreateUpdateProduct + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Product ID for which you requested the details | +**name** | **string** | Mandatory in case of creation**. Name of the product for which you requested the details | +**url** | **string** | URL to the product | [optional] +**imageUrl** | **string** | Absolute URL to the cover image of the product | [optional] +**sku** | **string** | Product identifier from the shop | [optional] +**price** | **float** | Price of the product | [optional] +**categories** | **string[]** | Category ID-s of the product | [optional] +**parentId** | **string** | Parent product id of the product | [optional] +**metaInfo** | **map[string,string]** | Meta data of product such as description, vendor, producer, stock level. The size of cumulative metaInfo shall not exceed **1000 KB**. Maximum length of metaInfo object can be 10. | [optional] +**updateEnabled** | **bool** | Facilitate to update the existing category in the same request (updateEnabled = true) | [optional] [default to false] +**deletedAt** | **string** | UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the product deleted from the shop's database | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateWebhook.md b/vendor/getbrevo/brevo-php/docs/Model/CreateWebhook.md new file mode 100644 index 0000000..e2d77b9 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateWebhook.md @@ -0,0 +1,17 @@ +# CreateWebhook + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **string** | URL of the webhook | +**description** | **string** | Description of the webhook | [optional] +**events** | **string[]** | - Events triggering the webhook. Possible values for **Transactional** type webhook: #### `sent` OR `request`, `delivered`, `hardBounce`, `softBounce`, `blocked`, `spam`, `invalid`, `deferred`, `click`, `opened`, `uniqueOpened` and `unsubscribed` - Possible values for **Marketing** type webhook: #### `spam`, `opened`, `click`, `hardBounce`, `softBounce`, `unsubscribed`, `listAddition` & `delivered` - Possible values for **Inbound** type webhook: #### `inboundEmailProcessed` | +**type** | **string** | Type of the webhook | [optional] [default to 'transactional'] +**domain** | **string** | Inbound domain of webhook, required in case of event type `inbound` | [optional] +**batched** | **bool** | To send batched webhooks | [optional] +**auth** | [**\Brevo\Client\Model\GetWebhookAuth**](GetWebhookAuth.md) | | [optional] +**headers** | [**\Brevo\Client\Model\GetWebhookHeaders[]**](GetWebhookHeaders.md) | Custom headers to be send with webhooks | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateWhatsAppCampaign.md b/vendor/getbrevo/brevo-php/docs/Model/CreateWhatsAppCampaign.md new file mode 100644 index 0000000..75ea401 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateWhatsAppCampaign.md @@ -0,0 +1,13 @@ +# CreateWhatsAppCampaign + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Name of the WhatsApp campaign creation | +**templateId** | **int** | Id of the WhatsApp template in **approved** state | +**scheduledAt** | **string** | Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.For example: **2017-06-01T12:30:00+02:00** | +**recipients** | [**\Brevo\Client\Model\CreateWhatsAppCampaignRecipients**](CreateWhatsAppCampaignRecipients.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateWhatsAppCampaignRecipients.md b/vendor/getbrevo/brevo-php/docs/Model/CreateWhatsAppCampaignRecipients.md new file mode 100644 index 0000000..95d274f --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateWhatsAppCampaignRecipients.md @@ -0,0 +1,12 @@ +# CreateWhatsAppCampaignRecipients + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**excludedListIds** | **int[]** | List ids to exclude from the campaign | [optional] +**listIds** | **int[]** | **Mandatory if scheduledAt is not empty**. List Ids to send the campaign to | [optional] +**segments** | **int[]** | **Mandatory if listIds are not used**. Segment ids to send the campaign to. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreateWhatsAppTemplate.md b/vendor/getbrevo/brevo-php/docs/Model/CreateWhatsAppTemplate.md new file mode 100644 index 0000000..5b14eae --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreateWhatsAppTemplate.md @@ -0,0 +1,16 @@ +# CreateWhatsAppTemplate + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Name of the template | +**language** | **string** | Language of the template. For Example : **en** for English | +**category** | **string** | Category of the template | +**mediaUrl** | **string** | Absolute url of the media file **(no local file)** for the header. **Use this field in you want to add media in Template header and headerText is empty.** Allowed extensions for media files are: #### jpeg | png | mp4 | pdf | [optional] +**bodyText** | **string** | Body of the template. **Maximum allowed characters are 1024** | +**headerText** | **string** | Text content of the header in the template. **Maximum allowed characters are 45** **Use this field to add text content in template header and if mediaUrl is empty** | [optional] +**source** | **string** | source of the template | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreatedBatchId.md b/vendor/getbrevo/brevo-php/docs/Model/CreatedBatchId.md new file mode 100644 index 0000000..6007b70 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreatedBatchId.md @@ -0,0 +1,10 @@ +# CreatedBatchId + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**batchId** | **float** | Batch ID of the request | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/CreatedProcessId.md b/vendor/getbrevo/brevo-php/docs/Model/CreatedProcessId.md new file mode 100644 index 0000000..06151d3 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/CreatedProcessId.md @@ -0,0 +1,10 @@ +# CreatedProcessId + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**processId** | **int** | Id of the process created | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/Deal.md b/vendor/getbrevo/brevo-php/docs/Model/Deal.md new file mode 100644 index 0000000..7900025 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/Deal.md @@ -0,0 +1,13 @@ +# Deal + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique deal id | [optional] +**attributes** | **object** | Deal attributes with values | [optional] +**linkedContactsIds** | **int[]** | Contact ids for contacts linked to this deal | [optional] +**linkedCompaniesIds** | **string[]** | Companies ids for companies linked to this deal | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/DealAttributes.md b/vendor/getbrevo/brevo-php/docs/Model/DealAttributes.md new file mode 100644 index 0000000..f8ee78d --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/DealAttributes.md @@ -0,0 +1,9 @@ +# DealAttributes + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/DealAttributesInner.md b/vendor/getbrevo/brevo-php/docs/Model/DealAttributesInner.md new file mode 100644 index 0000000..5e8e2cb --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/DealAttributesInner.md @@ -0,0 +1,14 @@ +# DealAttributesInner + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**internalName** | **string** | | [optional] +**label** | **string** | | [optional] +**attributeTypeName** | **string** | | [optional] +**attributeOptions** | **object[]** | | [optional] +**isRequired** | **bool** | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/DealsList.md b/vendor/getbrevo/brevo-php/docs/Model/DealsList.md new file mode 100644 index 0000000..f76bcc1 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/DealsList.md @@ -0,0 +1,10 @@ +# DealsList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**items** | [**\Brevo\Client\Model\Deal[]**](Deal.md) | List of deals | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/DeleteHardbounces.md b/vendor/getbrevo/brevo-php/docs/Model/DeleteHardbounces.md new file mode 100644 index 0000000..e726299 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/DeleteHardbounces.md @@ -0,0 +1,12 @@ +# DeleteHardbounces + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**startDate** | **string** | Starting date (YYYY-MM-DD) of the time period for deletion. The hardbounces occurred after this date will be deleted. Must be less than or equal to the endDate | [optional] +**endDate** | **string** | Ending date (YYYY-MM-DD) of the time period for deletion. The hardbounces until this date will be deleted. Must be greater than or equal to the startDate | [optional] +**contactEmail** | **string** | Target a specific email address | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/EmailExportRecipients.md b/vendor/getbrevo/brevo-php/docs/Model/EmailExportRecipients.md new file mode 100644 index 0000000..c039748 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/EmailExportRecipients.md @@ -0,0 +1,11 @@ +# EmailExportRecipients + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**notifyURL** | **string** | Webhook called once the export process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479 | [optional] +**recipientsType** | **string** | Type of recipients to export for a campaign | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/ErrorModel.md b/vendor/getbrevo/brevo-php/docs/Model/ErrorModel.md new file mode 100644 index 0000000..697c3ca --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/ErrorModel.md @@ -0,0 +1,11 @@ +# ErrorModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **string** | Error code displayed in case of a failure | +**message** | **string** | Readable message associated to the failure | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/Event.md b/vendor/getbrevo/brevo-php/docs/Model/Event.md new file mode 100644 index 0000000..959614d --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/Event.md @@ -0,0 +1,14 @@ +# Event + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**eventName** | **string** | The name of the event that occurred. This is how you will find your event in Brevo. Limited to 255 characters, alphanumerical characters and - _ only. | +**eventDate** | **string** | Timestamp of when the event occurred (e.g. \"2024-01-24T17:39:57+01:00\"). If no value is passed, the timestamp of the event creation is used. | [optional] +**identifiers** | [**\Brevo\Client\Model\EventIdentifiers**](EventIdentifiers.md) | | +**contactProperties** | **object** | Properties defining the state of the contact associated to this event. Useful to update contact attributes defined in your contacts database while passing the event. For example: **\"FIRSTNAME\": \"Jane\" , \"AGE\": 37** | [optional] +**eventProperties** | **object** | Properties of the event. Top level properties and nested properties can be used to better segment contacts and personalise workflow conditions. The following field type are supported: string, number, boolean (true/false), date (Timestamp e.g. \"2024-01-24T17:39:57+01:00\"). Keys are limited to 255 characters, alphanumerical characters and - _ only. Size is limited to 50Kb. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/EventIdentifiers.md b/vendor/getbrevo/brevo-php/docs/Model/EventIdentifiers.md new file mode 100644 index 0000000..f515fb9 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/EventIdentifiers.md @@ -0,0 +1,14 @@ +# EventIdentifiers + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**emailId** | **string** | Email Id associated with the event | [optional] +**phoneId** | **string** | SMS associated with the event | [optional] +**whatsappId** | **string** | whatsapp associated with the event | [optional] +**landlineNumberId** | **string** | landline_number associated with the event | [optional] +**extId** | **string** | ext_id associated with the event | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/ExportWebhooksHistory.md b/vendor/getbrevo/brevo-php/docs/Model/ExportWebhooksHistory.md new file mode 100644 index 0000000..c9b81fa --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/ExportWebhooksHistory.md @@ -0,0 +1,19 @@ +# ExportWebhooksHistory + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**days** | **int** | Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ | [optional] +**startDate** | **string** | Mandatory if endDate is used. Starting date of the history (YYYY-MM-DD). Must be lower than equal to endDate | [optional] +**endDate** | **string** | Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate | [optional] +**sort** | **string** | Sorting order of records (asc or desc) | [optional] +**type** | **string** | Filter the history based on webhook type | +**event** | **string** | Filter the history for a specific event type | +**notifyURL** | **string** | Webhook URL to receive CSV file link | +**webhookId** | **int** | Filter the history for a specific webhook id | [optional] +**email** | **string** | Filter the history for a specific email | [optional] +**messageId** | **int** | Filter the history for a specific message id. Applicable only for transactional webhooks. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/FileData.md b/vendor/getbrevo/brevo-php/docs/Model/FileData.md new file mode 100644 index 0000000..8e87a73 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/FileData.md @@ -0,0 +1,19 @@ +# FileData + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **string** | Url of uploaded file | [optional] +**id** | **string** | Id of uploaded file | [optional] +**name** | **string** | Name of uploaded file | [optional] +**authorId** | **string** | Account id of user which created the file | [optional] +**author** | **object** | Account details of user which created the file | [optional] +**contactId** | **int** | Contact id of contact on which file is uploaded | [optional] +**dealId** | **string** | Deal id linked to a file | [optional] +**companyId** | **string** | Company id linked to a file | [optional] +**size** | **int** | Size of file in bytes | [optional] +**createdAt** | [**\DateTime**] | File created date/time | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/FileDownloadableLink.md b/vendor/getbrevo/brevo-php/docs/Model/FileDownloadableLink.md new file mode 100644 index 0000000..5e30ce3 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/FileDownloadableLink.md @@ -0,0 +1,10 @@ +# FileDownloadableLink + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fileUrl** | **string** | A unique link to download the requested file. | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/FileList.md b/vendor/getbrevo/brevo-php/docs/Model/FileList.md new file mode 100644 index 0000000..beb2b81 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/FileList.md @@ -0,0 +1,9 @@ +# FileList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetAccount.md b/vendor/getbrevo/brevo-php/docs/Model/GetAccount.md new file mode 100644 index 0000000..7ab8a70 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetAccount.md @@ -0,0 +1,12 @@ +# GetAccount + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan** | [**\Brevo\Client\Model\GetAccountPlan[]**](GetAccountPlan.md) | Information about your plans and credits | +**relay** | [**\Brevo\Client\Model\GetAccountRelay**](GetAccountRelay.md) | | +**marketingAutomation** | [**\Brevo\Client\Model\GetAccountMarketingAutomation**](GetAccountMarketingAutomation.md) | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetAccountActivity.md b/vendor/getbrevo/brevo-php/docs/Model/GetAccountActivity.md new file mode 100644 index 0000000..67b5955 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetAccountActivity.md @@ -0,0 +1,10 @@ +# GetAccountActivity + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**logs** | [**\Brevo\Client\Model\GetAccountActivityLogs[]**](GetAccountActivityLogs.md) | Get user activity logs | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetAccountActivityLogs.md b/vendor/getbrevo/brevo-php/docs/Model/GetAccountActivityLogs.md new file mode 100644 index 0000000..061aac8 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetAccountActivityLogs.md @@ -0,0 +1,14 @@ +# GetAccountActivityLogs + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**action** | **string** | Type of activity in the account. | +**date** | **string** | Time of the activity. | +**userEmail** | **string** | Email address of the user who performed activity in the account. | +**userIp** | **string** | IP address of the user who performed activity in the account. | +**userAgent** | **string** | Browser details of the user who performed the activity. | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetAccountMarketingAutomation.md b/vendor/getbrevo/brevo-php/docs/Model/GetAccountMarketingAutomation.md new file mode 100644 index 0000000..7fc91c8 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetAccountMarketingAutomation.md @@ -0,0 +1,11 @@ +# GetAccountMarketingAutomation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**key** | **string** | Marketing Automation Tracker ID | [optional] +**enabled** | **bool** | Status of Marketing Automation Plateform activation for your account (true=enabled, false=disabled) | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetAccountPlan.md b/vendor/getbrevo/brevo-php/docs/Model/GetAccountPlan.md new file mode 100644 index 0000000..1ea58ad --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetAccountPlan.md @@ -0,0 +1,15 @@ +# GetAccountPlan + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | Displays the plan type of the user | +**creditsType** | **string** | This is the type of the credit, \"Send Limit\" is one of the possible types of credit of a user. \"Send Limit\" implies the total number of emails you can send to the subscribers in your account. | +**credits** | **float** | Remaining credits of the user | +**startDate** | [**\DateTime**] | Date of the period from which the plan will start (only available for \"subscription\" and \"reseller\" plan type) | [optional] +**endDate** | [**\DateTime**] | Date of the period from which the plan will end (only available for \"subscription\" and \"reseller\" plan type) | [optional] +**userLimit** | **int** | Only in case of reseller account. It implies the total number of child accounts you can add to your account. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetAccountRelay.md b/vendor/getbrevo/brevo-php/docs/Model/GetAccountRelay.md new file mode 100644 index 0000000..5824073 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetAccountRelay.md @@ -0,0 +1,11 @@ +# GetAccountRelay + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | Status of your transactional email Account (true=Enabled, false=Disabled) | +**data** | [**\Brevo\Client\Model\GetAccountRelayData**](GetAccountRelayData.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetAccountRelayData.md b/vendor/getbrevo/brevo-php/docs/Model/GetAccountRelayData.md new file mode 100644 index 0000000..ff92c00 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetAccountRelayData.md @@ -0,0 +1,12 @@ +# GetAccountRelayData + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**userName** | **string** | Email to use as login on transactional platform | +**relay** | **string** | URL of the SMTP Relay | +**port** | **int** | Port used for SMTP Relay | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetAggregatedReport.md b/vendor/getbrevo/brevo-php/docs/Model/GetAggregatedReport.md new file mode 100644 index 0000000..e02ad03 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetAggregatedReport.md @@ -0,0 +1,22 @@ +# GetAggregatedReport + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**range** | **string** | Time frame of the report | [optional] +**requests** | **int** | Number of requests for the timeframe | [optional] +**delivered** | **int** | Number of delivered emails for the timeframe | [optional] +**hardBounces** | **int** | Number of hardbounces for the timeframe | [optional] +**softBounces** | **int** | Number of softbounces for the timeframe | [optional] +**clicks** | **int** | Number of clicks for the timeframe | [optional] +**uniqueClicks** | **int** | Number of unique clicks for the timeframe | [optional] +**opens** | **int** | Number of openings for the timeframe | [optional] +**uniqueOpens** | **int** | Number of unique openings for the timeframe | [optional] +**spamReports** | **int** | Number of complaint (spam report) for the timeframe | [optional] +**blocked** | **int** | Number of blocked contact emails for the timeframe | [optional] +**invalid** | **int** | Number of invalid emails for the timeframe | [optional] +**unsubscribed** | **int** | Number of unsubscribed emails for the timeframe | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetAllExternalFeeds.md b/vendor/getbrevo/brevo-php/docs/Model/GetAllExternalFeeds.md new file mode 100644 index 0000000..5e68eca --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetAllExternalFeeds.md @@ -0,0 +1,11 @@ +# GetAllExternalFeeds + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**count** | **int** | Total number of batches | [optional] +**feeds** | [**\Brevo\Client\Model\GetAllExternalFeedsFeeds[]**](GetAllExternalFeedsFeeds.md) | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetAllExternalFeedsFeeds.md b/vendor/getbrevo/brevo-php/docs/Model/GetAllExternalFeedsFeeds.md new file mode 100644 index 0000000..a4302b3 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetAllExternalFeedsFeeds.md @@ -0,0 +1,21 @@ +# GetAllExternalFeedsFeeds + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | ID of the feed | +**name** | **string** | Name of the feed | +**url** | **string** | URL of the feed | +**authType** | **string** | Auth type of the feed: * `basic` * `token` * `noAuth` | +**username** | **string** | Username for authType `basic` | [optional] +**password** | **string** | Password for authType `basic` | [optional] +**token** | **string** | Token for authType `token` | [optional] +**headers** | [**\Brevo\Client\Model\GetExternalFeedByUUIDHeaders[]**](GetExternalFeedByUUIDHeaders.md) | Custom headers for the feed | +**maxRetries** | **int** | Maximum number of retries on the feed url | +**cache** | **bool** | Toggle caching of feed url response | +**createdAt** | [**\DateTime**] | Datetime on which the feed was created | +**modifiedAt** | [**\DateTime**] | Datetime on which the feed was modified | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetAttributes.md b/vendor/getbrevo/brevo-php/docs/Model/GetAttributes.md new file mode 100644 index 0000000..5c068df --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetAttributes.md @@ -0,0 +1,10 @@ +# GetAttributes + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attributes** | [**\Brevo\Client\Model\GetAttributesAttributes[]**](GetAttributesAttributes.md) | Listing of available contact attributes in your account | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetAttributesAttributes.md b/vendor/getbrevo/brevo-php/docs/Model/GetAttributesAttributes.md new file mode 100644 index 0000000..97d3e59 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetAttributesAttributes.md @@ -0,0 +1,14 @@ +# GetAttributesAttributes + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Name of the attribute | +**category** | **string** | Category of the attribute | +**type** | **string** | Type of the attribute | [optional] +**enumeration** | [**\Brevo\Client\Model\GetAttributesEnumeration[]**](GetAttributesEnumeration.md) | Parameter only available for \"category\" type attributes. | [optional] +**calculatedValue** | **string** | Calculated value formula | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetAttributesEnumeration.md b/vendor/getbrevo/brevo-php/docs/Model/GetAttributesEnumeration.md new file mode 100644 index 0000000..6407aab --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetAttributesEnumeration.md @@ -0,0 +1,11 @@ +# GetAttributesEnumeration + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **int** | ID of Value of the \"category\" type attribute | +**label** | **string** | Label of the \"category\" type attribute | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetBlockedDomains.md b/vendor/getbrevo/brevo-php/docs/Model/GetBlockedDomains.md new file mode 100644 index 0000000..3098d0b --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetBlockedDomains.md @@ -0,0 +1,10 @@ +# GetBlockedDomains + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domains** | **string[]** | List of all blocked domains | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetCampaignOverview.md b/vendor/getbrevo/brevo-php/docs/Model/GetCampaignOverview.md new file mode 100644 index 0000000..9e9d9e8 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetCampaignOverview.md @@ -0,0 +1,23 @@ +# GetCampaignOverview + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | ID of the campaign | +**name** | **string** | Name of the campaign | +**subject** | **string** | Subject of the campaign. Only available if `abTesting` flag of the campaign is `false` | [optional] +**previewText** | **string** | Preview text or preheader of the email campaign | [optional] +**type** | **string** | Type of campaign | +**status** | **string** | Status of the campaign | +**scheduledAt** | **string** | UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ) | [optional] +**abTesting** | **bool** | Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled. | [optional] +**subjectA** | **string** | Subject A of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` | [optional] +**subjectB** | **string** | Subject B of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` | [optional] +**splitRule** | **int** | The size of your ab-test groups. Only available if `abTesting` flag of the campaign is `true` | [optional] +**winnerCriteria** | **string** | Criteria for the winning version. Only available if `abTesting` flag of the campaign is `true` | [optional] +**winnerDelay** | **int** | The duration of the test in hours at the end of which the winning version will be sent. Only available if `abTesting` flag of the campaign is `true` | [optional] +**sendAtBestTime** | **bool** | It is true if you have chosen to send your campaign at best time, otherwise it is false | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetCampaignRecipients.md b/vendor/getbrevo/brevo-php/docs/Model/GetCampaignRecipients.md new file mode 100644 index 0000000..4dc68b4 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetCampaignRecipients.md @@ -0,0 +1,11 @@ +# GetCampaignRecipients + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**lists** | **int[]** | | +**exclusionLists** | **int[]** | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetCampaignStats.md b/vendor/getbrevo/brevo-php/docs/Model/GetCampaignStats.md new file mode 100644 index 0000000..79c3a63 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetCampaignStats.md @@ -0,0 +1,25 @@ +# GetCampaignStats + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**listId** | **int** | List Id of email campaign (only in case of get email campaign(s)(not for global stats)) | [optional] +**uniqueClicks** | **int** | Number of unique clicks for the campaign | +**clickers** | **int** | Number of total clicks for the campaign | +**complaints** | **int** | Number of complaints (Spam reports) for the campaign | +**delivered** | **int** | Number of delivered emails for the campaign | +**sent** | **int** | Number of sent emails for the campaign | +**softBounces** | **int** | Number of softbounce for the campaign | +**hardBounces** | **int** | Number of harbounce for the campaign | +**uniqueViews** | **int** | Number of unique openings for the campaign | +**trackableViews** | **int** | Recipients without any privacy protection option enabled in their email client | +**trackableViewsRate** | **float** | Rate of recipients without any privacy protection option enabled in their email client | [optional] +**estimatedViews** | **int** | Rate of recipients without any privacy protection option enabled in their email client, applied to all delivered emails | [optional] +**unsubscriptions** | **int** | Number of unsubscription for the campaign | +**viewed** | **int** | Number of openings for the campaign | +**deferred** | **int** | Number of deferred emails for the campaign | [optional] +**returnBounce** | **int** | Total number of non-delivered campaigns for a particular campaign id. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetCategories.md b/vendor/getbrevo/brevo-php/docs/Model/GetCategories.md new file mode 100644 index 0000000..3479e5b --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetCategories.md @@ -0,0 +1,11 @@ +# GetCategories + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**categories** | **object[]** | | +**count** | **int** | Number of categories | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetCategoryDetails.md b/vendor/getbrevo/brevo-php/docs/Model/GetCategoryDetails.md new file mode 100644 index 0000000..c9f2607 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetCategoryDetails.md @@ -0,0 +1,15 @@ +# GetCategoryDetails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Category ID for which you requested the details | +**name** | **string** | Name of the category for which you requested the details | +**createdAt** | **string** | Creation UTC date-time of the category (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**modifiedAt** | **string** | Last modification UTC date-time of the category (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**url** | **string** | URL to the category | [optional] +**isDeleted** | **bool** | category deleted from the shop's database | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetChildAccountCreationStatus.md b/vendor/getbrevo/brevo-php/docs/Model/GetChildAccountCreationStatus.md new file mode 100644 index 0000000..e8c6ca9 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetChildAccountCreationStatus.md @@ -0,0 +1,10 @@ +# GetChildAccountCreationStatus + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**childAccountCreated** | **bool** | Status of child account creation whether it is successfully created (exists) or not. | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetChildDomain.md b/vendor/getbrevo/brevo-php/docs/Model/GetChildDomain.md new file mode 100644 index 0000000..8cede17 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetChildDomain.md @@ -0,0 +1,11 @@ +# GetChildDomain + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain** | **string** | Sender domain | [optional] +**active** | **bool** | indicates whether a domain is verified or not | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetChildDomains.md b/vendor/getbrevo/brevo-php/docs/Model/GetChildDomains.md new file mode 100644 index 0000000..1021351 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetChildDomains.md @@ -0,0 +1,9 @@ +# GetChildDomains + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetChildInfo.md b/vendor/getbrevo/brevo-php/docs/Model/GetChildInfo.md new file mode 100644 index 0000000..cb381ae --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetChildInfo.md @@ -0,0 +1,14 @@ +# GetChildInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**credits** | [**\Brevo\Client\Model\GetChildInfoCredits**](GetChildInfoCredits.md) | | [optional] +**statistics** | [**\Brevo\Client\Model\GetChildInfoStatistics**](GetChildInfoStatistics.md) | | [optional] +**password** | **string** | The encrypted password of child account | +**ips** | **string[]** | IP(s) associated to a child account user | [optional] +**apiKeys** | [**\Brevo\Client\Model\GetChildInfoApiKeys**](GetChildInfoApiKeys.md) | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetChildInfoApiKeys.md b/vendor/getbrevo/brevo-php/docs/Model/GetChildInfoApiKeys.md new file mode 100644 index 0000000..d5537c8 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetChildInfoApiKeys.md @@ -0,0 +1,11 @@ +# GetChildInfoApiKeys + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**v2** | [**\Brevo\Client\Model\GetChildInfoApiKeysV2[]**](GetChildInfoApiKeysV2.md) | | +**v3** | [**\Brevo\Client\Model\GetChildInfoApiKeysV3[]**](GetChildInfoApiKeysV3.md) | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetChildInfoApiKeysV2.md b/vendor/getbrevo/brevo-php/docs/Model/GetChildInfoApiKeysV2.md new file mode 100644 index 0000000..0034d6f --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetChildInfoApiKeysV2.md @@ -0,0 +1,11 @@ +# GetChildInfoApiKeysV2 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Name of the key for version 2 | +**key** | **string** | API Key for version 2 | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetChildInfoApiKeysV3.md b/vendor/getbrevo/brevo-php/docs/Model/GetChildInfoApiKeysV3.md new file mode 100644 index 0000000..1efa20f --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetChildInfoApiKeysV3.md @@ -0,0 +1,11 @@ +# GetChildInfoApiKeysV3 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Name of the key for version 3 | +**key** | **string** | API Key for version 3 | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetChildInfoCredits.md b/vendor/getbrevo/brevo-php/docs/Model/GetChildInfoCredits.md new file mode 100644 index 0000000..5d6cc5a --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetChildInfoCredits.md @@ -0,0 +1,11 @@ +# GetChildInfoCredits + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**emailCredits** | **int** | Email credits available for your child | [optional] +**smsCredits** | **int** | SMS credits available for your child | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetChildInfoStatistics.md b/vendor/getbrevo/brevo-php/docs/Model/GetChildInfoStatistics.md new file mode 100644 index 0000000..b4e3e37 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetChildInfoStatistics.md @@ -0,0 +1,12 @@ +# GetChildInfoStatistics + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**previousMonthTotalSent** | **int** | Overall emails sent for the previous month | [optional] +**currentMonthTotalSent** | **int** | Overall emails sent for current month | [optional] +**totalSent** | **int** | Overall emails sent for since the account exists | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetChildrenList.md b/vendor/getbrevo/brevo-php/docs/Model/GetChildrenList.md new file mode 100644 index 0000000..f6ff2d6 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetChildrenList.md @@ -0,0 +1,11 @@ +# GetChildrenList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**children** | **object[]** | Your children's account information | [optional] +**count** | **int** | Number of child accounts | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetClient.md b/vendor/getbrevo/brevo-php/docs/Model/GetClient.md new file mode 100644 index 0000000..0b99349 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetClient.md @@ -0,0 +1,13 @@ +# GetClient + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **string** | Login Email | +**firstName** | **string** | First Name | +**lastName** | **string** | Last Name | +**companyName** | **string** | Name of the company | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetContactCampaignStats.md b/vendor/getbrevo/brevo-php/docs/Model/GetContactCampaignStats.md new file mode 100644 index 0000000..a79fab9 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetContactCampaignStats.md @@ -0,0 +1,18 @@ +# GetContactCampaignStats + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**messagesSent** | [**\Brevo\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[]**](GetExtendedContactDetailsStatisticsMessagesSent.md) | | [optional] +**hardBounces** | [**\Brevo\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[]**](GetExtendedContactDetailsStatisticsMessagesSent.md) | | [optional] +**softBounces** | [**\Brevo\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[]**](GetExtendedContactDetailsStatisticsMessagesSent.md) | | [optional] +**complaints** | [**\Brevo\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[]**](GetExtendedContactDetailsStatisticsMessagesSent.md) | | [optional] +**unsubscriptions** | [**\Brevo\Client\Model\GetContactCampaignStatsUnsubscriptions**](GetContactCampaignStatsUnsubscriptions.md) | | [optional] +**opened** | [**\Brevo\Client\Model\GetContactCampaignStatsOpened[]**](GetContactCampaignStatsOpened.md) | | [optional] +**clicked** | [**\Brevo\Client\Model\GetContactCampaignStatsClicked[]**](GetContactCampaignStatsClicked.md) | | [optional] +**transacAttributes** | [**\Brevo\Client\Model\GetContactCampaignStatsTransacAttributes[]**](GetContactCampaignStatsTransacAttributes.md) | | [optional] +**delivered** | [**\Brevo\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[]**](GetExtendedContactDetailsStatisticsMessagesSent.md) | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetContactCampaignStatsClicked.md b/vendor/getbrevo/brevo-php/docs/Model/GetContactCampaignStatsClicked.md new file mode 100644 index 0000000..06edf1f --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetContactCampaignStatsClicked.md @@ -0,0 +1,11 @@ +# GetContactCampaignStatsClicked + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**campaignId** | **int** | ID of the campaign which generated the event | +**links** | [**\Brevo\Client\Model\GetExtendedContactDetailsStatisticsLinks[]**](GetExtendedContactDetailsStatisticsLinks.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetContactCampaignStatsOpened.md b/vendor/getbrevo/brevo-php/docs/Model/GetContactCampaignStatsOpened.md new file mode 100644 index 0000000..f34053f --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetContactCampaignStatsOpened.md @@ -0,0 +1,13 @@ +# GetContactCampaignStatsOpened + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**campaignId** | **int** | ID of the campaign which generated the event | +**count** | **int** | Number of openings of the campaign | +**eventTime** | **string** | UTC date-time of the event | +**ip** | **string** | IP from which the user has opened the campaign | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetContactCampaignStatsTransacAttributes.md b/vendor/getbrevo/brevo-php/docs/Model/GetContactCampaignStatsTransacAttributes.md new file mode 100644 index 0000000..a23e752 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetContactCampaignStatsTransacAttributes.md @@ -0,0 +1,12 @@ +# GetContactCampaignStatsTransacAttributes + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**orderDate** | [**\DateTime**] | Date of the order | +**orderPrice** | **float** | Price of the order | +**orderId** | **int** | ID of the order | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetContactCampaignStatsUnsubscriptions.md b/vendor/getbrevo/brevo-php/docs/Model/GetContactCampaignStatsUnsubscriptions.md new file mode 100644 index 0000000..97a8f16 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetContactCampaignStatsUnsubscriptions.md @@ -0,0 +1,11 @@ +# GetContactCampaignStatsUnsubscriptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**userUnsubscription** | [**\Brevo\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription[]**](GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.md) | Contact has unsubscribed via the unsubscription link in the email | +**adminUnsubscription** | [**\Brevo\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription[]**](GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.md) | Contact has been unsubscribed from the administrator | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetContactDetails.md b/vendor/getbrevo/brevo-php/docs/Model/GetContactDetails.md new file mode 100644 index 0000000..044d618 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetContactDetails.md @@ -0,0 +1,18 @@ +# GetContactDetails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **string** | Email address of the contact for which you requested the details | [optional] +**id** | **int** | ID of the contact for which you requested the details | +**emailBlacklisted** | **bool** | Blacklist status for email campaigns (true=blacklisted, false=not blacklisted) | +**smsBlacklisted** | **bool** | Blacklist status for SMS campaigns (true=blacklisted, false=not blacklisted) | +**createdAt** | **string** | Creation UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**modifiedAt** | **string** | Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**listIds** | **int[]** | | +**listUnsubscribed** | **int[]** | | [optional] +**attributes** | **object** | Set of attributes of the contact | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetContacts.md b/vendor/getbrevo/brevo-php/docs/Model/GetContacts.md new file mode 100644 index 0000000..1411462 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetContacts.md @@ -0,0 +1,11 @@ +# GetContacts + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**contacts** | **object[]** | | +**count** | **int** | Number of contacts | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetCorporateInvitedUsersList.md b/vendor/getbrevo/brevo-php/docs/Model/GetCorporateInvitedUsersList.md new file mode 100644 index 0000000..d6c1cb0 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetCorporateInvitedUsersList.md @@ -0,0 +1,10 @@ +# GetCorporateInvitedUsersList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**users** | [**\Brevo\Client\Model\GetCorporateInvitedUsersListUsers[]**](GetCorporateInvitedUsersListUsers.md) | Get invited users list | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetCorporateInvitedUsersListFeatureAccess.md b/vendor/getbrevo/brevo-php/docs/Model/GetCorporateInvitedUsersListFeatureAccess.md new file mode 100644 index 0000000..80b0321 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetCorporateInvitedUsersListFeatureAccess.md @@ -0,0 +1,13 @@ +# GetCorporateInvitedUsersListFeatureAccess + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**userManagement** | **string[]** | User management accessiblity. | [optional] +**apiKeys** | **string[]** | Api keys accessiblity. | [optional] +**myPlan** | **string[]** | My plan accessiblity. | [optional] +**appsManagement** | **string[]** | Apps management accessiblity | Not available in ENTv2 | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetCorporateInvitedUsersListGroups.md b/vendor/getbrevo/brevo-php/docs/Model/GetCorporateInvitedUsersListGroups.md new file mode 100644 index 0000000..b28382b --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetCorporateInvitedUsersListGroups.md @@ -0,0 +1,11 @@ +# GetCorporateInvitedUsersListGroups + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | group id | [optional] +**name** | **string** | group name | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetCorporateInvitedUsersListUsers.md b/vendor/getbrevo/brevo-php/docs/Model/GetCorporateInvitedUsersListUsers.md new file mode 100644 index 0000000..6268f26 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetCorporateInvitedUsersListUsers.md @@ -0,0 +1,14 @@ +# GetCorporateInvitedUsersListUsers + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**groups** | [**\Brevo\Client\Model\GetCorporateInvitedUsersListGroups**](GetCorporateInvitedUsersListGroups.md) | | +**email** | **string** | Email address of the user. | +**isOwner** | **string** | Flag for indicating is user owner of the organization. | +**status** | **string** | Status of the invited user. | +**featureAccess** | [**\Brevo\Client\Model\GetCorporateInvitedUsersListFeatureAccess**](GetCorporateInvitedUsersListFeatureAccess.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetCouponCollection.md b/vendor/getbrevo/brevo-php/docs/Model/GetCouponCollection.md new file mode 100644 index 0000000..9828cb1 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetCouponCollection.md @@ -0,0 +1,15 @@ +# GetCouponCollection + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | The id of the collection | +**name** | **string** | The name of the collection | +**defaultCoupon** | **string** | The default coupon of the collection | +**createdAt** | [**\DateTime**] | Datetime on which the collection was created | +**totalCoupons** | **int** | Total coupons in the collection | +**remainingCoupons** | **int** | Not sent coupons in the collection | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetDeviceBrowserStats.md b/vendor/getbrevo/brevo-php/docs/Model/GetDeviceBrowserStats.md new file mode 100644 index 0000000..630fd54 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetDeviceBrowserStats.md @@ -0,0 +1,13 @@ +# GetDeviceBrowserStats + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**clickers** | **int** | Number of total clicks for the campaign using the particular browser | +**uniqueClicks** | **int** | Number of unique clicks for the campaign using the particular browser | +**viewed** | **int** | Number of openings for the campaign using the particular browser | +**uniqueViews** | **int** | Number of unique openings for the campaign using the particular browser | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetDomainConfigurationModel.md b/vendor/getbrevo/brevo-php/docs/Model/GetDomainConfigurationModel.md new file mode 100644 index 0000000..f3a1410 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetDomainConfigurationModel.md @@ -0,0 +1,13 @@ +# GetDomainConfigurationModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain** | **string** | Domain | +**verified** | **bool** | Status of domain verification (true=verified, false=non verified) | +**authenticated** | **bool** | Status of domain authentication (true=authenticated, false=non authenticated) | +**dnsRecords** | [**\Brevo\Client\Model\CreateDomainModelDnsRecords**](CreateDomainModelDnsRecords.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetDomainsList.md b/vendor/getbrevo/brevo-php/docs/Model/GetDomainsList.md new file mode 100644 index 0000000..ebaa190 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetDomainsList.md @@ -0,0 +1,10 @@ +# GetDomainsList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domains** | [**\Brevo\Client\Model\GetDomainsListDomains[]**](GetDomainsListDomains.md) | List of the domains available in your account | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetDomainsListDomains.md b/vendor/getbrevo/brevo-php/docs/Model/GetDomainsListDomains.md new file mode 100644 index 0000000..925ea14 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetDomainsListDomains.md @@ -0,0 +1,14 @@ +# GetDomainsListDomains + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Id of the domain | +**domainName** | **string** | Domain name | +**authenticated** | **bool** | Status of domain authentication (true=authenticated, false=non authenticated) | +**verified** | **bool** | Status of domain verification (true=verified, false=non verified) | +**ip** | **string** | Dedicated IP associated with domain | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetEmailCampaign.md b/vendor/getbrevo/brevo-php/docs/Model/GetEmailCampaign.md new file mode 100644 index 0000000..afb9f8b --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetEmailCampaign.md @@ -0,0 +1,40 @@ +# GetEmailCampaign + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | ID of the campaign | +**name** | **string** | Name of the campaign | +**subject** | **string** | Subject of the campaign. Only available if `abTesting` flag of the campaign is `false` | [optional] +**type** | **string** | Type of campaign | +**status** | **string** | Status of the campaign | +**scheduledAt** | **string** | UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ) | [optional] +**abTesting** | **bool** | Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled. | [optional] +**subjectA** | **string** | Subject A of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` | [optional] +**subjectB** | **string** | Subject B of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` | [optional] +**splitRule** | **int** | The size of your ab-test groups. Only available if `abTesting` flag of the campaign is `true` | [optional] +**winnerCriteria** | **string** | Criteria for the winning version. Only available if `abTesting` flag of the campaign is `true` | [optional] +**winnerDelay** | **int** | The duration of the test in hours at the end of which the winning version will be sent. Only available if `abTesting` flag of the campaign is `true` | [optional] +**sendAtBestTime** | **bool** | It is true if you have chosen to send your campaign at best time, otherwise it is false | [optional] +**testSent** | **bool** | Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent) | +**header** | **string** | Header of the campaign | +**footer** | **string** | Footer of the campaign | +**sender** | [**\Brevo\Client\Model\GetExtendedCampaignOverviewSender**](GetExtendedCampaignOverviewSender.md) | | +**replyTo** | **string** | Email defined as the \"Reply to\" of the campaign | +**toField** | **string** | Customisation of the \"to\" field of the campaign | [optional] +**htmlContent** | **string** | HTML content of the campaign | +**shareLink** | **string** | Link to share the campaign on social medias | [optional] +**tag** | **string** | Tag of the campaign | [optional] +**createdAt** | **string** | Creation UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**modifiedAt** | **string** | UTC date-time of last modification of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**inlineImageActivation** | **bool** | Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. | [optional] +**mirrorActive** | **bool** | 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** | **bool** | 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] +**sentDate** | **string** | Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent' | [optional] +**returnBounce** | **int** | Total number of non-delivered campaigns for a particular campaign id. | [optional] +**recipients** | **object** | | +**statistics** | **object** | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetEmailCampaigns.md b/vendor/getbrevo/brevo-php/docs/Model/GetEmailCampaigns.md new file mode 100644 index 0000000..945dd56 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetEmailCampaigns.md @@ -0,0 +1,11 @@ +# GetEmailCampaigns + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**campaigns** | **object[]** | | [optional] +**count** | **int** | Number of Email campaigns retrieved | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetEmailEventReport.md b/vendor/getbrevo/brevo-php/docs/Model/GetEmailEventReport.md new file mode 100644 index 0000000..f3a2a49 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetEmailEventReport.md @@ -0,0 +1,10 @@ +# GetEmailEventReport + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**events** | [**\Brevo\Client\Model\GetEmailEventReportEvents[]**](GetEmailEventReportEvents.md) | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetEmailEventReportEvents.md b/vendor/getbrevo/brevo-php/docs/Model/GetEmailEventReportEvents.md new file mode 100644 index 0000000..260e26b --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetEmailEventReportEvents.md @@ -0,0 +1,20 @@ +# GetEmailEventReportEvents + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **string** | Email address which generates the event | +**date** | **string** | UTC date-time on which the event has been generated | +**subject** | **string** | Subject of the event | [optional] +**messageId** | **string** | Message ID which generated the event | +**event** | **string** | Event which occurred | +**reason** | **string** | Reason of bounce (only available if the event is hardbounce or softbounce) | [optional] +**tag** | **string** | Tag of the email which generated the event | [optional] +**ip** | **string** | IP from which the user has opened the email or clicked on the link (only available if the event is opened or clicks) | [optional] +**link** | **string** | The link which is sent to the user (only available if the event is requests or opened or clicks) | [optional] +**from** | **string** | Sender email from which the emails are sent | [optional] +**templateId** | **int** | ID of the template (only available if the email is template based) | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetExtendedCampaignOverview.md b/vendor/getbrevo/brevo-php/docs/Model/GetExtendedCampaignOverview.md new file mode 100644 index 0000000..4a14d09 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetExtendedCampaignOverview.md @@ -0,0 +1,35 @@ +# GetExtendedCampaignOverview + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | ID of the campaign | +**name** | **string** | Name of the campaign | +**subject** | **string** | Subject of the campaign. Only available if `abTesting` flag of the campaign is `false` | [optional] +**type** | **string** | Type of campaign | +**status** | **string** | Status of the campaign | +**scheduledAt** | **string** | UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ) | [optional] +**abTesting** | **bool** | Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled. | [optional] +**subjectA** | **string** | Subject A of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` | [optional] +**subjectB** | **string** | Subject B of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` | [optional] +**splitRule** | **int** | The size of your ab-test groups. Only available if `abTesting` flag of the campaign is `true` | [optional] +**winnerCriteria** | **string** | Criteria for the winning version. Only available if `abTesting` flag of the campaign is `true` | [optional] +**winnerDelay** | **int** | The duration of the test in hours at the end of which the winning version will be sent. Only available if `abTesting` flag of the campaign is `true` | [optional] +**sendAtBestTime** | **bool** | It is true if you have chosen to send your campaign at best time, otherwise it is false | [optional] +**testSent** | **bool** | Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent) | +**header** | **string** | Header of the campaign | +**footer** | **string** | Footer of the campaign | +**sender** | [**\Brevo\Client\Model\GetExtendedCampaignOverviewSender**](GetExtendedCampaignOverviewSender.md) | | +**replyTo** | **string** | Email defined as the \"Reply to\" of the campaign | +**toField** | **string** | Customisation of the \"to\" field of the campaign | [optional] +**htmlContent** | **string** | HTML content of the campaign | +**shareLink** | **string** | Link to share the campaign on social medias | [optional] +**tag** | **string** | Tag of the campaign | [optional] +**createdAt** | **string** | Creation UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**modifiedAt** | **string** | UTC date-time of last modification of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**inlineImageActivation** | **bool** | Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. | [optional] +**mirrorActive** | **bool** | 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** | **bool** | 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] +**sentDate** | **string** | Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent' | [optional] +**returnBounce** | **int** | Total number of non-delivered campaigns for a particular campaign id. | [optional] +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetExtendedCampaignOverviewSender.md b/vendor/getbrevo/brevo-php/docs/Model/GetExtendedCampaignOverviewSender.md new file mode 100644 index 0000000..7ca0634 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetExtendedCampaignOverviewSender.md @@ -0,0 +1,12 @@ +# GetExtendedCampaignOverviewSender + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Sender name of the campaign | [optional] +**email** | **string** | Sender email of the campaign | [optional] +**id** | **int** | Sender id of the campaign | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetExtendedCampaignStats.md b/vendor/getbrevo/brevo-php/docs/Model/GetExtendedCampaignStats.md new file mode 100644 index 0000000..a3cf455 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetExtendedCampaignStats.md @@ -0,0 +1,17 @@ +# GetExtendedCampaignStats + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**globalStats** | [**\Brevo\Client\Model\GetExtendedCampaignStatsGlobalStats**](GetExtendedCampaignStatsGlobalStats.md) | | +**campaignStats** | **object[]** | List-wise statistics of the campaign. | +**mirrorClick** | **int** | Number of clicks on mirror link | +**remaining** | **int** | Number of remaning emails to send | +**linksStats** | **object** | Statistics about the number of clicks for the links | +**statsByDomain** | [**\Brevo\Client\Model\GetStatsByDomain**](GetStatsByDomain.md) | | +**statsByDevice** | [**\Brevo\Client\Model\GetStatsByDevice**](GetStatsByDevice.md) | Statistics about the campaign on the basis of various devices | +**statsByBrowser** | [**\Brevo\Client\Model\GetStatsByBrowser**](GetStatsByBrowser.md) | Statistics about the campaign on the basis of various browsers | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetExtendedCampaignStatsGlobalStats.md b/vendor/getbrevo/brevo-php/docs/Model/GetExtendedCampaignStatsGlobalStats.md new file mode 100644 index 0000000..47c4255 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetExtendedCampaignStatsGlobalStats.md @@ -0,0 +1,9 @@ +# GetExtendedCampaignStatsGlobalStats + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetExtendedClient.md b/vendor/getbrevo/brevo-php/docs/Model/GetExtendedClient.md new file mode 100644 index 0000000..d779061 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetExtendedClient.md @@ -0,0 +1,10 @@ +# GetExtendedClient + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**address** | [**\Brevo\Client\Model\GetExtendedClientAddress**](GetExtendedClientAddress.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetExtendedClientAddress.md b/vendor/getbrevo/brevo-php/docs/Model/GetExtendedClientAddress.md new file mode 100644 index 0000000..15c9b1b --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetExtendedClientAddress.md @@ -0,0 +1,13 @@ +# GetExtendedClientAddress + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**street** | **string** | Street information | +**city** | **string** | City information | +**zipCode** | **string** | Zip Code information | +**country** | **string** | Country information | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetExtendedContactDetails.md b/vendor/getbrevo/brevo-php/docs/Model/GetExtendedContactDetails.md new file mode 100644 index 0000000..1200c78 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetExtendedContactDetails.md @@ -0,0 +1,17 @@ +# GetExtendedContactDetails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **string** | Email address of the contact for which you requested the details | +**id** | **int** | ID of the contact for which you requested the details | +**emailBlacklisted** | **bool** | Blacklist status for email campaigns (true=blacklisted, false=not blacklisted) | +**smsBlacklisted** | **bool** | Blacklist status for SMS campaigns (true=blacklisted, false=not blacklisted) | +**createdAt** | **string** | Creation UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**modifiedAt** | **string** | Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**listIds** | **int[]** | | +**listUnsubscribed** | **int[]** | | [optional] +**attributes** | **object** | Set of attributes of the contact | +**statistics** | [**\Brevo\Client\Model\GetExtendedContactDetailsStatistics**](GetExtendedContactDetailsStatistics.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetExtendedContactDetailsStatistics.md b/vendor/getbrevo/brevo-php/docs/Model/GetExtendedContactDetailsStatistics.md new file mode 100644 index 0000000..a8b7977 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetExtendedContactDetailsStatistics.md @@ -0,0 +1,18 @@ +# GetExtendedContactDetailsStatistics + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**messagesSent** | [**\Brevo\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[]**](GetExtendedContactDetailsStatisticsMessagesSent.md) | Listing of the sent campaign for the contact | [optional] +**hardBounces** | [**\Brevo\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[]**](GetExtendedContactDetailsStatisticsMessagesSent.md) | Listing of the hardbounes generated by the contact | [optional] +**softBounces** | [**\Brevo\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[]**](GetExtendedContactDetailsStatisticsMessagesSent.md) | Listing of the softbounes generated by the contact | [optional] +**complaints** | [**\Brevo\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[]**](GetExtendedContactDetailsStatisticsMessagesSent.md) | Listing of the complaints generated by the contact | [optional] +**unsubscriptions** | [**\Brevo\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptions**](GetExtendedContactDetailsStatisticsUnsubscriptions.md) | | [optional] +**opened** | [**\Brevo\Client\Model\GetExtendedContactDetailsStatisticsOpened[]**](GetExtendedContactDetailsStatisticsOpened.md) | Listing of the openings generated by the contact | [optional] +**clicked** | [**\Brevo\Client\Model\GetExtendedContactDetailsStatisticsClicked[]**](GetExtendedContactDetailsStatisticsClicked.md) | Listing of the clicks generated by the contact | [optional] +**transacAttributes** | **object[]** | Listing of the transactional attributes for the contact | [optional] +**delivered** | [**\Brevo\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[]**](GetExtendedContactDetailsStatisticsMessagesSent.md) | Listing of the delivered campaign for the contact | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetExtendedContactDetailsStatisticsClicked.md b/vendor/getbrevo/brevo-php/docs/Model/GetExtendedContactDetailsStatisticsClicked.md new file mode 100644 index 0000000..9316f75 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetExtendedContactDetailsStatisticsClicked.md @@ -0,0 +1,11 @@ +# GetExtendedContactDetailsStatisticsClicked + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**campaignId** | **int** | ID of the campaign which generated the event | +**links** | [**\Brevo\Client\Model\GetExtendedContactDetailsStatisticsLinks[]**](GetExtendedContactDetailsStatisticsLinks.md) | Listing of the clicked links for the campaign | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetExtendedContactDetailsStatisticsDelivered.md b/vendor/getbrevo/brevo-php/docs/Model/GetExtendedContactDetailsStatisticsDelivered.md new file mode 100644 index 0000000..bab4f11 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetExtendedContactDetailsStatisticsDelivered.md @@ -0,0 +1,11 @@ +# GetExtendedContactDetailsStatisticsDelivered + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**campaignId** | **int** | ID of the campaign which generated the event | +**eventTime** | **string** | UTC date-time of the event | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetExtendedContactDetailsStatisticsLinks.md b/vendor/getbrevo/brevo-php/docs/Model/GetExtendedContactDetailsStatisticsLinks.md new file mode 100644 index 0000000..3baf33a --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetExtendedContactDetailsStatisticsLinks.md @@ -0,0 +1,13 @@ +# GetExtendedContactDetailsStatisticsLinks + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**count** | **int** | Number of clicks on this link for the campaign | +**eventTime** | **string** | UTC date-time of the event | +**ip** | **string** | IP from which the user has clicked on the link | +**url** | **string** | URL of the clicked link | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetExtendedContactDetailsStatisticsMessagesSent.md b/vendor/getbrevo/brevo-php/docs/Model/GetExtendedContactDetailsStatisticsMessagesSent.md new file mode 100644 index 0000000..b7b14c0 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetExtendedContactDetailsStatisticsMessagesSent.md @@ -0,0 +1,11 @@ +# GetExtendedContactDetailsStatisticsMessagesSent + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**campaignId** | **int** | ID of the campaign which generated the event | +**eventTime** | **string** | UTC date-time of the event | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetExtendedContactDetailsStatisticsOpened.md b/vendor/getbrevo/brevo-php/docs/Model/GetExtendedContactDetailsStatisticsOpened.md new file mode 100644 index 0000000..9931b77 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetExtendedContactDetailsStatisticsOpened.md @@ -0,0 +1,13 @@ +# GetExtendedContactDetailsStatisticsOpened + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**campaignId** | **int** | ID of the campaign which generated the event | +**count** | **int** | Number of openings for the campaign | +**eventTime** | **string** | UTC date-time of the event | +**ip** | **string** | IP from which the user has opened the email | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetExtendedContactDetailsStatisticsUnsubscriptions.md b/vendor/getbrevo/brevo-php/docs/Model/GetExtendedContactDetailsStatisticsUnsubscriptions.md new file mode 100644 index 0000000..86c348f --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetExtendedContactDetailsStatisticsUnsubscriptions.md @@ -0,0 +1,11 @@ +# GetExtendedContactDetailsStatisticsUnsubscriptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**userUnsubscription** | [**\Brevo\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription[]**](GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.md) | Contact unsubscribe via unsubscription link in a campaign | +**adminUnsubscription** | [**\Brevo\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription[]**](GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.md) | Contact has been unsubscribed from the administrator | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.md b/vendor/getbrevo/brevo-php/docs/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.md new file mode 100644 index 0000000..898c563 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.md @@ -0,0 +1,11 @@ +# GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**eventTime** | **string** | UTC date-time of the event | +**ip** | **string** | IP from which the user has been unsubscribed | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.md b/vendor/getbrevo/brevo-php/docs/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.md new file mode 100644 index 0000000..1167e0a --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.md @@ -0,0 +1,12 @@ +# GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**campaignId** | **int** | ID of the campaign which generated the event | +**eventTime** | **string** | UTC date-time of the event | +**ip** | **string** | IP from which the user has unsubscribed | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetExtendedList.md b/vendor/getbrevo/brevo-php/docs/Model/GetExtendedList.md new file mode 100644 index 0000000..05cae4e --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetExtendedList.md @@ -0,0 +1,13 @@ +# GetExtendedList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**folderId** | **int** | ID of the folder | +**createdAt** | **string** | Creation UTC date-time of the list (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**campaignStats** | [**\Brevo\Client\Model\GetExtendedListCampaignStats[]**](GetExtendedListCampaignStats.md) | | [optional] +**dynamicList** | **bool** | Status telling if the list is dynamic or not (true=dynamic, false=not dynamic) | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetExtendedListCampaignStats.md b/vendor/getbrevo/brevo-php/docs/Model/GetExtendedListCampaignStats.md new file mode 100644 index 0000000..5ea98e2 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetExtendedListCampaignStats.md @@ -0,0 +1,11 @@ +# GetExtendedListCampaignStats + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**campaignId** | **int** | ID of the campaign | +**stats** | [**\Brevo\Client\Model\GetCampaignStats**](GetCampaignStats.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetExternalFeedByUUID.md b/vendor/getbrevo/brevo-php/docs/Model/GetExternalFeedByUUID.md new file mode 100644 index 0000000..ecd3ca4 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetExternalFeedByUUID.md @@ -0,0 +1,21 @@ +# GetExternalFeedByUUID + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | ID of the feed | +**name** | **string** | Name of the feed | +**url** | **string** | URL of the feed | +**authType** | **string** | Auth type of the feed: * `basic` * `token` * `noAuth` | +**username** | **string** | Username for authType `basic` | [optional] +**password** | **string** | Password for authType `basic` | [optional] +**token** | **string** | Token for authType `token` | [optional] +**headers** | [**\Brevo\Client\Model\GetExternalFeedByUUIDHeaders[]**](GetExternalFeedByUUIDHeaders.md) | Custom headers for the feed | +**maxRetries** | **int** | Maximum number of retries on the feed url | +**cache** | **bool** | Toggle caching of feed url response | +**createdAt** | [**\DateTime**] | Datetime on which the feed was created | +**modifiedAt** | [**\DateTime**] | Datetime on which the feed was modified | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetExternalFeedByUUIDHeaders.md b/vendor/getbrevo/brevo-php/docs/Model/GetExternalFeedByUUIDHeaders.md new file mode 100644 index 0000000..2b01f98 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetExternalFeedByUUIDHeaders.md @@ -0,0 +1,11 @@ +# GetExternalFeedByUUIDHeaders + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Name of the header | [optional] +**value** | **string** | Value of the header | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetFolder.md b/vendor/getbrevo/brevo-php/docs/Model/GetFolder.md new file mode 100644 index 0000000..2043959 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetFolder.md @@ -0,0 +1,14 @@ +# GetFolder + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | ID of the folder | +**name** | **string** | Name of the folder | +**totalBlacklisted** | **int** | Number of blacklisted contacts in the folder | +**totalSubscribers** | **int** | Number of contacts in the folder | +**uniqueSubscribers** | **int** | Number of unique contacts in the folder | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetFolderLists.md b/vendor/getbrevo/brevo-php/docs/Model/GetFolderLists.md new file mode 100644 index 0000000..fcc8e7e --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetFolderLists.md @@ -0,0 +1,11 @@ +# GetFolderLists + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**lists** | **object[]** | | [optional] +**count** | **int** | Number of lists in the folder | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetFolders.md b/vendor/getbrevo/brevo-php/docs/Model/GetFolders.md new file mode 100644 index 0000000..efdfe2f --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetFolders.md @@ -0,0 +1,11 @@ +# GetFolders + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**folders** | **object[]** | | [optional] +**count** | **int** | Number of folders available in your account | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetInboundEmailEvents.md b/vendor/getbrevo/brevo-php/docs/Model/GetInboundEmailEvents.md new file mode 100644 index 0000000..f2628e1 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetInboundEmailEvents.md @@ -0,0 +1,10 @@ +# GetInboundEmailEvents + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**events** | [**\Brevo\Client\Model\GetInboundEmailEventsEvents[]**](GetInboundEmailEventsEvents.md) | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetInboundEmailEventsByUuid.md b/vendor/getbrevo/brevo-php/docs/Model/GetInboundEmailEventsByUuid.md new file mode 100644 index 0000000..6b4640b --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetInboundEmailEventsByUuid.md @@ -0,0 +1,17 @@ +# GetInboundEmailEventsByUuid + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**receivedAt** | [**\DateTime**] | Date when email was received on SMTP relay | [optional] +**deliveredAt** | [**\DateTime**] | Date when email was delivered successfully to client’s webhook | [optional] +**recipient** | **string** | Recipient’s email address | [optional] +**sender** | **string** | Sender’s email address | [optional] +**messageId** | **string** | Value of the Message-ID header. This will be present only after the processing is done. | [optional] +**subject** | **string** | Value of the Subject header. This will be present only after the processing is done. | [optional] +**attachments** | [**\Brevo\Client\Model\GetInboundEmailEventsByUuidAttachments[]**](GetInboundEmailEventsByUuidAttachments.md) | List of attachments of the email. This will be present only after the processing is done. | [optional] +**logs** | [**\Brevo\Client\Model\GetInboundEmailEventsByUuidLogs[]**](GetInboundEmailEventsByUuidLogs.md) | List of events/logs that describe the lifecycle of the email on SIB platform | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetInboundEmailEventsByUuidAttachments.md b/vendor/getbrevo/brevo-php/docs/Model/GetInboundEmailEventsByUuidAttachments.md new file mode 100644 index 0000000..f1af599 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetInboundEmailEventsByUuidAttachments.md @@ -0,0 +1,13 @@ +# GetInboundEmailEventsByUuidAttachments + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | filename specified in the Content-Disposition header of the attachment | [optional] +**contentType** | **string** | value of the Content-Type header of the attachment | [optional] +**contentId** | **string** | value of the Content-ID header of the attachment. | [optional] +**contentLength** | **int** | size of the attachment in bytes | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetInboundEmailEventsByUuidLogs.md b/vendor/getbrevo/brevo-php/docs/Model/GetInboundEmailEventsByUuidLogs.md new file mode 100644 index 0000000..6325cc7 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetInboundEmailEventsByUuidLogs.md @@ -0,0 +1,11 @@ +# GetInboundEmailEventsByUuidLogs + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**date** | [**\DateTime**] | Date of the event | [optional] +**type** | **string** | Type of the event | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetInboundEmailEventsEvents.md b/vendor/getbrevo/brevo-php/docs/Model/GetInboundEmailEventsEvents.md new file mode 100644 index 0000000..4804fc4 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetInboundEmailEventsEvents.md @@ -0,0 +1,13 @@ +# GetInboundEmailEventsEvents + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | **string** | UUID that can be used to fetch additional data | +**date** | [**\DateTime**] | Date when email was received on SMTP relay | +**sender** | **string** | Sender’s email address | +**recipient** | **string** | Recipient’s email address | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetInvitedUsersList.md b/vendor/getbrevo/brevo-php/docs/Model/GetInvitedUsersList.md new file mode 100644 index 0000000..0766463 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetInvitedUsersList.md @@ -0,0 +1,10 @@ +# GetInvitedUsersList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**users** | [**\Brevo\Client\Model\GetInvitedUsersListUsers[]**](GetInvitedUsersListUsers.md) | Get invited users list | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetInvitedUsersListFeatureAccess.md b/vendor/getbrevo/brevo-php/docs/Model/GetInvitedUsersListFeatureAccess.md new file mode 100644 index 0000000..f1f28e9 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetInvitedUsersListFeatureAccess.md @@ -0,0 +1,12 @@ +# GetInvitedUsersListFeatureAccess + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**marketing** | **object** | Marketing features accessiblity. | [optional] +**conversations** | **object** | Conversations features accessiblity. | [optional] +**crm** | **object** | CRM features accessiblity. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetInvitedUsersListUsers.md b/vendor/getbrevo/brevo-php/docs/Model/GetInvitedUsersListUsers.md new file mode 100644 index 0000000..a965bb2 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetInvitedUsersListUsers.md @@ -0,0 +1,13 @@ +# GetInvitedUsersListUsers + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **string** | Email address of the user. | +**isOwner** | **string** | Flag for indicating is user owner of the organization. | +**status** | **string** | Status of the invited user. | +**featureAccess** | [**\Brevo\Client\Model\GetInvitedUsersListFeatureAccess**](GetInvitedUsersListFeatureAccess.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetIp.md b/vendor/getbrevo/brevo-php/docs/Model/GetIp.md new file mode 100644 index 0000000..efc77a8 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetIp.md @@ -0,0 +1,13 @@ +# GetIp + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | ID of the dedicated IP | +**ip** | **string** | Dedicated IP | +**active** | **bool** | Status of the IP (true=active, false=inactive) | +**domain** | **string** | Domain associated to the IP | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetIpFromSender.md b/vendor/getbrevo/brevo-php/docs/Model/GetIpFromSender.md new file mode 100644 index 0000000..d9fc9cc --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetIpFromSender.md @@ -0,0 +1,13 @@ +# GetIpFromSender + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | ID of the dedicated IP | +**ip** | **string** | Dedicated IP | +**domain** | **string** | Domain associated to the IP | +**weight** | **int** | Weight of the IP | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetIps.md b/vendor/getbrevo/brevo-php/docs/Model/GetIps.md new file mode 100644 index 0000000..0dfd783 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetIps.md @@ -0,0 +1,10 @@ +# GetIps + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ips** | [**\Brevo\Client\Model\GetIp[]**](GetIp.md) | Dedicated IP(s) available on your account | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetIpsFromSender.md b/vendor/getbrevo/brevo-php/docs/Model/GetIpsFromSender.md new file mode 100644 index 0000000..4aa592f --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetIpsFromSender.md @@ -0,0 +1,10 @@ +# GetIpsFromSender + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ips** | [**\Brevo\Client\Model\GetIpFromSender[]**](GetIpFromSender.md) | Dedicated IP(s) linked to a sender | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetList.md b/vendor/getbrevo/brevo-php/docs/Model/GetList.md new file mode 100644 index 0000000..483db1f --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetList.md @@ -0,0 +1,14 @@ +# GetList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | ID of the list | +**name** | **string** | Name of the list | +**totalBlacklisted** | **int** | Number of blacklisted contacts in the list | +**totalSubscribers** | **int** | Number of contacts in the list | +**uniqueSubscribers** | **int** | Number of unique contacts in the list | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetLists.md b/vendor/getbrevo/brevo-php/docs/Model/GetLists.md new file mode 100644 index 0000000..c46253b --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetLists.md @@ -0,0 +1,11 @@ +# GetLists + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**lists** | **object[]** | Listing of all the lists available in your account | [optional] +**count** | **int** | Number of lists in your account | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetOrders.md b/vendor/getbrevo/brevo-php/docs/Model/GetOrders.md new file mode 100644 index 0000000..d84c1ea --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetOrders.md @@ -0,0 +1,11 @@ +# GetOrders + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**orders** | **object[]** | | [optional] +**count** | **int** | Number of orders | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetProcess.md b/vendor/getbrevo/brevo-php/docs/Model/GetProcess.md new file mode 100644 index 0000000..860892a --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetProcess.md @@ -0,0 +1,13 @@ +# GetProcess + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Id of the process | +**status** | **string** | Status of the process | +**name** | **string** | Process name | +**exportUrl** | **string** | URL on which send export the of contacts once the process is completed | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetProcesses.md b/vendor/getbrevo/brevo-php/docs/Model/GetProcesses.md new file mode 100644 index 0000000..af62f02 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetProcesses.md @@ -0,0 +1,11 @@ +# GetProcesses + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**processes** | [**\Brevo\Client\Model\GetProcess[]**](GetProcess.md) | List of processes available on your account | [optional] +**count** | **int** | Number of processes available on your account | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetProductDetails.md b/vendor/getbrevo/brevo-php/docs/Model/GetProductDetails.md new file mode 100644 index 0000000..16e5654 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetProductDetails.md @@ -0,0 +1,24 @@ +# GetProductDetails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Product ID for which you requested the details | +**name** | **string** | Name of the product for which you requested the details | +**createdAt** | **string** | Creation UTC date-time of the product (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**modifiedAt** | **string** | Last modification UTC date-time of the product (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**url** | **string** | URL to the product | [optional] +**imageUrl** | **string** | Absolute URL to the cover image of the product | [optional] +**sku** | **string** | Product identifier from the shop | [optional] +**price** | **float** | Price of the product | [optional] +**categories** | **string[]** | Category ID-s of the product | [optional] +**parentId** | **string** | Parent product id of the product | [optional] +**s3Original** | **string** | S3 url of original image | [optional] +**s3ThumbAnalytics** | **string** | S3 thumbnail url of original image in 120x120 dimension for analytics section | +**metaInfo** | **object** | Meta data of product such as description, vendor, producer, stock level, etc. | [optional] +**s3ThumbEditor** | **string** | S3 thumbnail url of original image in 600x400 dimension for editor section | +**isDeleted** | **bool** | product deleted from the shop's database | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetProducts.md b/vendor/getbrevo/brevo-php/docs/Model/GetProducts.md new file mode 100644 index 0000000..48512f0 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetProducts.md @@ -0,0 +1,11 @@ +# GetProducts + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**products** | **object[]** | | +**count** | **int** | Number of products | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetReports.md b/vendor/getbrevo/brevo-php/docs/Model/GetReports.md new file mode 100644 index 0000000..9e44db8 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetReports.md @@ -0,0 +1,10 @@ +# GetReports + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reports** | [**\Brevo\Client\Model\GetReportsReports[]**](GetReportsReports.md) | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetReportsReports.md b/vendor/getbrevo/brevo-php/docs/Model/GetReportsReports.md new file mode 100644 index 0000000..015ddca --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetReportsReports.md @@ -0,0 +1,22 @@ +# GetReportsReports + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**date** | [**\DateTime**] | Date of the statistics | +**requests** | **int** | Number of requests for the date | +**delivered** | **int** | Number of delivered emails for the date | +**hardBounces** | **int** | Number of hardbounces for the date | +**softBounces** | **int** | Number of softbounces for the date | +**clicks** | **int** | Number of clicks for the date | +**uniqueClicks** | **int** | Number of unique clicks for the date | +**opens** | **int** | Number of openings for the date | +**uniqueOpens** | **int** | Number of unique openings for the date | +**spamReports** | **int** | Number of complaints (spam reports) for the date | +**blocked** | **int** | Number of blocked emails for the date | +**invalid** | **int** | Number of invalid emails for the date | +**unsubscribed** | **int** | Number of unsubscribed emails for the date | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetScheduledEmailByBatchId.md b/vendor/getbrevo/brevo-php/docs/Model/GetScheduledEmailByBatchId.md new file mode 100644 index 0000000..72bc67a --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetScheduledEmailByBatchId.md @@ -0,0 +1,10 @@ +# GetScheduledEmailByBatchId + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**count** | **int** | Total number of batches | [optional] +**batches** | [**\Brevo\Client\Model\GetScheduledEmailByBatchIdBatches[]**](GetScheduledEmailByBatchIdBatches.md) | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetScheduledEmailByBatchIdBatches.md b/vendor/getbrevo/brevo-php/docs/Model/GetScheduledEmailByBatchIdBatches.md new file mode 100644 index 0000000..2859003 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetScheduledEmailByBatchIdBatches.md @@ -0,0 +1,11 @@ +# GetScheduledEmailByBatchIdBatches + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scheduledAt** | [**\DateTime**] | Datetime for which the batch was scheduled | +**createdAt** | [**\DateTime**] | Datetime on which the batch was scheduled | +**status** | **string** | Current status of the scheduled batch | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetScheduledEmailByMessageId.md b/vendor/getbrevo/brevo-php/docs/Model/GetScheduledEmailByMessageId.md new file mode 100644 index 0000000..c81749c --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetScheduledEmailByMessageId.md @@ -0,0 +1,11 @@ +# GetScheduledEmailByMessageId + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scheduledAt** | [**\DateTime**] | Datetime for which the email was scheduled | +**createdAt** | [**\DateTime**] | Datetime on which the email was scheduled | +**status** | **string** | Current status of the scheduled email | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetSegments.md b/vendor/getbrevo/brevo-php/docs/Model/GetSegments.md new file mode 100644 index 0000000..4292fd5 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetSegments.md @@ -0,0 +1,11 @@ +# GetSegments + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**segments** | [**\Brevo\Client\Model\GetSegmentsSegments**](GetSegmentsSegments.md) | | [optional] +**count** | **int** | Number of Segments available in your account | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetSegmentsSegments.md b/vendor/getbrevo/brevo-php/docs/Model/GetSegmentsSegments.md new file mode 100644 index 0000000..97bea65 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetSegmentsSegments.md @@ -0,0 +1,13 @@ +# GetSegmentsSegments + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | ID of the list | [optional] +**segmentName** | **string** | Name of the Segment | [optional] +**categoryName** | **string** | Name of the Segment Category | [optional] +**updatedAt** | **string** | Updation UTC date-time of the segment (YYYY-MM-DDTHH:mm:ss.SSSZ) | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetSendersList.md b/vendor/getbrevo/brevo-php/docs/Model/GetSendersList.md new file mode 100644 index 0000000..497cb2c --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetSendersList.md @@ -0,0 +1,10 @@ +# GetSendersList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**senders** | [**\Brevo\Client\Model\GetSendersListSenders[]**](GetSendersListSenders.md) | List of the senders available in your account | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetSendersListIps.md b/vendor/getbrevo/brevo-php/docs/Model/GetSendersListIps.md new file mode 100644 index 0000000..54b586d --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetSendersListIps.md @@ -0,0 +1,12 @@ +# GetSendersListIps + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ip** | **string** | Dedicated IP available in your account | +**domain** | **string** | Domain of the IP | +**weight** | **int** | Weight of the IP for this sender | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetSendersListSenders.md b/vendor/getbrevo/brevo-php/docs/Model/GetSendersListSenders.md new file mode 100644 index 0000000..87c7bc1 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetSendersListSenders.md @@ -0,0 +1,14 @@ +# GetSendersListSenders + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Id of the sender | +**name** | **string** | From Name associated to the sender | +**email** | **string** | From Email associated to the sender | +**active** | **bool** | Status of sender (true=activated, false=deactivated) | +**ips** | [**\Brevo\Client\Model\GetSendersListIps[]**](GetSendersListIps.md) | List of dedicated IP(s) available in the account. This data is displayed only for dedicated IPs | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetSharedTemplateUrl.md b/vendor/getbrevo/brevo-php/docs/Model/GetSharedTemplateUrl.md new file mode 100644 index 0000000..5c2fba7 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetSharedTemplateUrl.md @@ -0,0 +1,10 @@ +# GetSharedTemplateUrl + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sharedUrl** | **string** | A unique URL for the email campaign or transactional template. This URL can be shared with other Brevo users. | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetSmsCampaign.md b/vendor/getbrevo/brevo-php/docs/Model/GetSmsCampaign.md new file mode 100644 index 0000000..0564562 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetSmsCampaign.md @@ -0,0 +1,17 @@ +# GetSmsCampaign + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | ID of the SMS Campaign | +**name** | **string** | Name of the SMS Campaign | +**status** | **string** | Status of the SMS Campaign | +**content** | **string** | Content of the SMS Campaign | +**scheduledAt** | **string** | UTC date-time on which SMS campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format | [optional] +**sender** | **string** | Sender of the SMS Campaign | +**createdAt** | **string** | Creation UTC date-time of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**modifiedAt** | **string** | UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**recipients** | **object** | | +**statistics** | **object** | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetSmsCampaignOverview.md b/vendor/getbrevo/brevo-php/docs/Model/GetSmsCampaignOverview.md new file mode 100644 index 0000000..7ad98cd --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetSmsCampaignOverview.md @@ -0,0 +1,17 @@ +# GetSmsCampaignOverview + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | ID of the SMS Campaign | +**name** | **string** | Name of the SMS Campaign | +**status** | **string** | Status of the SMS Campaign | +**content** | **string** | Content of the SMS Campaign | +**scheduledAt** | **string** | UTC date-time on which SMS campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format | [optional] +**sender** | **string** | Sender of the SMS Campaign | +**createdAt** | **string** | Creation UTC date-time of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**modifiedAt** | **string** | UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetSmsCampaignRecipients.md b/vendor/getbrevo/brevo-php/docs/Model/GetSmsCampaignRecipients.md new file mode 100644 index 0000000..e7b5984 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetSmsCampaignRecipients.md @@ -0,0 +1,9 @@ +# GetSmsCampaignRecipients + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetSmsCampaignStats.md b/vendor/getbrevo/brevo-php/docs/Model/GetSmsCampaignStats.md new file mode 100644 index 0000000..9eac775 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetSmsCampaignStats.md @@ -0,0 +1,16 @@ +# GetSmsCampaignStats + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**delivered** | **int** | Number of delivered SMS | +**sent** | **int** | Number of sent SMS | +**processing** | **int** | Number of processing SMS | +**softBounces** | **int** | Number of softbounced SMS | +**hardBounces** | **int** | Number of hardbounced SMS | +**unsubscriptions** | **int** | Number of unsubscription SMS | +**answered** | **int** | Number of replies to the SMS | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetSmsCampaigns.md b/vendor/getbrevo/brevo-php/docs/Model/GetSmsCampaigns.md new file mode 100644 index 0000000..4c7fe83 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetSmsCampaigns.md @@ -0,0 +1,11 @@ +# GetSmsCampaigns + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**campaigns** | **object[]** | | [optional] +**count** | **int** | Number of SMS campaigns retrieved | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetSmsEventReport.md b/vendor/getbrevo/brevo-php/docs/Model/GetSmsEventReport.md new file mode 100644 index 0000000..22ed510 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetSmsEventReport.md @@ -0,0 +1,10 @@ +# GetSmsEventReport + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**events** | [**\Brevo\Client\Model\GetSmsEventReportEvents[]**](GetSmsEventReportEvents.md) | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetSmsEventReportEvents.md b/vendor/getbrevo/brevo-php/docs/Model/GetSmsEventReportEvents.md new file mode 100644 index 0000000..7f39afe --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetSmsEventReportEvents.md @@ -0,0 +1,16 @@ +# GetSmsEventReportEvents + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**phoneNumber** | **string** | Phone number which has generated the event | [optional] +**date** | **string** | UTC date-time on which the event has been generated | [optional] +**messageId** | **string** | Message ID which generated the event | [optional] +**event** | **string** | Event which occurred | [optional] +**reason** | **string** | Reason of bounce (only available if the event is hardbounce or softbounce) | [optional] +**reply** | **string** | | [optional] +**tag** | **string** | Tag of the SMS which generated the event | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetSmtpTemplateOverview.md b/vendor/getbrevo/brevo-php/docs/Model/GetSmtpTemplateOverview.md new file mode 100644 index 0000000..c36df71 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetSmtpTemplateOverview.md @@ -0,0 +1,22 @@ +# GetSmtpTemplateOverview + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | ID of the template | +**name** | **string** | Name of the template | +**subject** | **string** | Subject of the template | +**isActive** | **bool** | Status of template (true=active, false=inactive) | +**testSent** | **bool** | Status of test sending for the template (true=test email has been sent, false=test email has not been sent) | +**sender** | [**\Brevo\Client\Model\GetSmtpTemplateOverviewSender**](GetSmtpTemplateOverviewSender.md) | | +**replyTo** | **string** | Email defined as the \"Reply to\" for the template | +**toField** | **string** | Customisation of the \"to\" field for the template | +**tag** | **string** | Tag of the template | +**htmlContent** | **string** | HTML content of the template | +**createdAt** | **string** | Creation UTC date-time of the template (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**modifiedAt** | **string** | Last modification UTC date-time of the template (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**doiTemplate** | **bool** | It is true if template is a valid Double opt-in (DOI) template, otherwise it is false. This field will be available only in case of single template detail call. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetSmtpTemplateOverviewSender.md b/vendor/getbrevo/brevo-php/docs/Model/GetSmtpTemplateOverviewSender.md new file mode 100644 index 0000000..0697d2d --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetSmtpTemplateOverviewSender.md @@ -0,0 +1,12 @@ +# GetSmtpTemplateOverviewSender + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | From email for the template | [optional] +**email** | **string** | From email for the template | [optional] +**id** | **string** | Sender id of the template | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetSmtpTemplates.md b/vendor/getbrevo/brevo-php/docs/Model/GetSmtpTemplates.md new file mode 100644 index 0000000..2e0768f --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetSmtpTemplates.md @@ -0,0 +1,11 @@ +# GetSmtpTemplates + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**count** | **int** | Count of transactional email templates | [optional] +**templates** | [**\Brevo\Client\Model\GetSmtpTemplateOverview[]**](GetSmtpTemplateOverview.md) | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetSsoToken.md b/vendor/getbrevo/brevo-php/docs/Model/GetSsoToken.md new file mode 100644 index 0000000..fba745a --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetSsoToken.md @@ -0,0 +1,10 @@ +# GetSsoToken + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token** | **string** | Session token, it will remain valid for 15 days. | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetStatsByBrowser.md b/vendor/getbrevo/brevo-php/docs/Model/GetStatsByBrowser.md new file mode 100644 index 0000000..0a34adc --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetStatsByBrowser.md @@ -0,0 +1,9 @@ +# GetStatsByBrowser + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetStatsByDevice.md b/vendor/getbrevo/brevo-php/docs/Model/GetStatsByDevice.md new file mode 100644 index 0000000..d773be8 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetStatsByDevice.md @@ -0,0 +1,13 @@ +# GetStatsByDevice + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**desktop** | [**map[string,\Brevo\Client\Model\GetDeviceBrowserStats]**](GetDeviceBrowserStats.md) | Statistics of the campaign on the basis of desktop devices | [optional] +**mobile** | [**map[string,\Brevo\Client\Model\GetDeviceBrowserStats]**](GetDeviceBrowserStats.md) | Statistics of the campaign on the basis of mobile devices | [optional] +**tablet** | [**map[string,\Brevo\Client\Model\GetDeviceBrowserStats]**](GetDeviceBrowserStats.md) | Statistics of the campaign on the basis of tablet devices | [optional] +**unknown** | [**map[string,\Brevo\Client\Model\GetDeviceBrowserStats]**](GetDeviceBrowserStats.md) | Statistics of the campaign on the basis of unknown devices | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetStatsByDomain.md b/vendor/getbrevo/brevo-php/docs/Model/GetStatsByDomain.md new file mode 100644 index 0000000..e43475a --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetStatsByDomain.md @@ -0,0 +1,9 @@ +# GetStatsByDomain + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetTransacAggregatedSmsReport.md b/vendor/getbrevo/brevo-php/docs/Model/GetTransacAggregatedSmsReport.md new file mode 100644 index 0000000..6340c97 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetTransacAggregatedSmsReport.md @@ -0,0 +1,19 @@ +# GetTransacAggregatedSmsReport + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**range** | **string** | Time frame of the report | [optional] +**requests** | **int** | Number of requests for the timeframe | [optional] +**delivered** | **int** | Number of delivered SMS for the timeframe | [optional] +**hardBounces** | **int** | Number of hardbounces for the timeframe | [optional] +**softBounces** | **int** | Number of softbounces for the timeframe | [optional] +**blocked** | **int** | Number of blocked contact for the timeframe | [optional] +**unsubscribed** | **int** | Number of unsubscription for the timeframe | [optional] +**replied** | **int** | Number of answered SMS for the timeframe | [optional] +**accepted** | **int** | Number of accepted for the timeframe | [optional] +**rejected** | **int** | Number of rejected for the timeframe | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetTransacBlockedContacts.md b/vendor/getbrevo/brevo-php/docs/Model/GetTransacBlockedContacts.md new file mode 100644 index 0000000..6992b2e --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetTransacBlockedContacts.md @@ -0,0 +1,11 @@ +# GetTransacBlockedContacts + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**count** | **int** | Count of blocked or unsubscribed contact | [optional] +**contacts** | [**\Brevo\Client\Model\GetTransacBlockedContactsContacts[]**](GetTransacBlockedContactsContacts.md) | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetTransacBlockedContactsContacts.md b/vendor/getbrevo/brevo-php/docs/Model/GetTransacBlockedContactsContacts.md new file mode 100644 index 0000000..7973ffd --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetTransacBlockedContactsContacts.md @@ -0,0 +1,13 @@ +# GetTransacBlockedContactsContacts + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **string** | Email address of the blocked or unsubscribed contact | +**senderEmail** | **string** | Sender email address of the blocked or unsubscribed contact | +**reason** | [**\Brevo\Client\Model\GetTransacBlockedContactsReason**](GetTransacBlockedContactsReason.md) | | +**blockedAt** | **string** | Date when the contact was blocked or unsubscribed on | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetTransacBlockedContactsReason.md b/vendor/getbrevo/brevo-php/docs/Model/GetTransacBlockedContactsReason.md new file mode 100644 index 0000000..c525de4 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetTransacBlockedContactsReason.md @@ -0,0 +1,11 @@ +# GetTransacBlockedContactsReason + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **string** | Reason code for blocking / unsubscribing (This code is safe for comparison) | [optional] +**message** | **string** | Reason for blocking / unsubscribing (This string is not safe for comparison) | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetTransacEmailContent.md b/vendor/getbrevo/brevo-php/docs/Model/GetTransacEmailContent.md new file mode 100644 index 0000000..1a8e032 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetTransacEmailContent.md @@ -0,0 +1,16 @@ +# GetTransacEmailContent + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **string** | Email address to which transactional email has been sent | +**subject** | **string** | Subject of the sent email | +**templateId** | **int** | Id of the template | [optional] +**date** | **string** | Date on which transactional email was sent | +**events** | [**\Brevo\Client\Model\GetTransacEmailContentEvents[]**](GetTransacEmailContentEvents.md) | Series of events which occurred on the transactional email | +**body** | **string** | Actual content of the transactional email that has been sent | +**attachmentCount** | **int** | Count of the attachments that were sent in the email | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetTransacEmailContentEvents.md b/vendor/getbrevo/brevo-php/docs/Model/GetTransacEmailContentEvents.md new file mode 100644 index 0000000..482ee09 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetTransacEmailContentEvents.md @@ -0,0 +1,11 @@ +# GetTransacEmailContentEvents + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Name of the event that occurred on the sent email | +**time** | **string** | Time at which the event occurred | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetTransacEmailsList.md b/vendor/getbrevo/brevo-php/docs/Model/GetTransacEmailsList.md new file mode 100644 index 0000000..d84f4c5 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetTransacEmailsList.md @@ -0,0 +1,11 @@ +# GetTransacEmailsList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**count** | **int** | Total number of transactional emails available on your account according to the passed filter | [optional] +**transactionalEmails** | [**\Brevo\Client\Model\GetTransacEmailsListTransactionalEmails[]**](GetTransacEmailsListTransactionalEmails.md) | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetTransacEmailsListTransactionalEmails.md b/vendor/getbrevo/brevo-php/docs/Model/GetTransacEmailsListTransactionalEmails.md new file mode 100644 index 0000000..e6c736a --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetTransacEmailsListTransactionalEmails.md @@ -0,0 +1,17 @@ +# GetTransacEmailsListTransactionalEmails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **string** | Email address to which transactional email has been sent | +**subject** | **string** | Subject of the sent email | +**templateId** | **int** | Id of the template | [optional] +**messageId** | **string** | Message Id of the sent email | +**uuid** | **string** | Unique id of the email sent to a particular contact | +**date** | **string** | Date on which transactional email was sent | +**from** | **string** | Email address of the sender from which the email was sent | [optional] +**tags** | **string[]** | Tags used for your email | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetTransacSmsReport.md b/vendor/getbrevo/brevo-php/docs/Model/GetTransacSmsReport.md new file mode 100644 index 0000000..4d183ef --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetTransacSmsReport.md @@ -0,0 +1,10 @@ +# GetTransacSmsReport + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reports** | [**\Brevo\Client\Model\GetTransacSmsReportReports[]**](GetTransacSmsReportReports.md) | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetTransacSmsReportReports.md b/vendor/getbrevo/brevo-php/docs/Model/GetTransacSmsReportReports.md new file mode 100644 index 0000000..2dc03a5 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetTransacSmsReportReports.md @@ -0,0 +1,19 @@ +# GetTransacSmsReportReports + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**date** | [**\DateTime**] | Date for which statistics are retrieved | [optional] +**requests** | **int** | Number of requests for the date | [optional] +**delivered** | **int** | Number of delivered SMS for the date | [optional] +**hardBounces** | **int** | Number of hardbounces for the date | [optional] +**softBounces** | **int** | Number of softbounces for the date | [optional] +**blocked** | **int** | Number of blocked contact for the date | [optional] +**unsubscribed** | **int** | Number of unsubscription for the date | [optional] +**replied** | **int** | Number of answered SMS for the date | [optional] +**accepted** | **int** | Number of accepted for the date | [optional] +**rejected** | **int** | Number of rejected for the date | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetUserPermission.md b/vendor/getbrevo/brevo-php/docs/Model/GetUserPermission.md new file mode 100644 index 0000000..1c12c00 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetUserPermission.md @@ -0,0 +1,12 @@ +# GetUserPermission + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **string** | Email address of the user. | +**status** | **string** | Status of the invited user. | +**privileges** | [**\Brevo\Client\Model\GetUserPermissionPrivileges[]**](GetUserPermissionPrivileges.md) | Granular feature permissions given to the user. | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetUserPermissionPrivileges.md b/vendor/getbrevo/brevo-php/docs/Model/GetUserPermissionPrivileges.md new file mode 100644 index 0000000..fec8fa9 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetUserPermissionPrivileges.md @@ -0,0 +1,11 @@ +# GetUserPermissionPrivileges + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feature** | **string** | | +**permissions** | **string[]** | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetWATemplates.md b/vendor/getbrevo/brevo-php/docs/Model/GetWATemplates.md new file mode 100644 index 0000000..4bca939 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetWATemplates.md @@ -0,0 +1,11 @@ +# GetWATemplates + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**templates** | [**\Brevo\Client\Model\GetWATemplatesTemplates[]**](GetWATemplatesTemplates.md) | | +**count** | **int** | Number of whatsApp templates retrived | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetWATemplatesTemplates.md b/vendor/getbrevo/brevo-php/docs/Model/GetWATemplatesTemplates.md new file mode 100644 index 0000000..c088064 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetWATemplatesTemplates.md @@ -0,0 +1,17 @@ +# GetWATemplatesTemplates + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | id of the template | +**name** | **string** | Name of the WhatsApp template | +**status** | **string** | Status of the WhatsApp template | +**language** | **string** | Language in which template exists | +**category** | **string** | category of the template | +**errorReason** | **string** | Error reason in the template creation | [optional] +**createdAt** | **string** | Creation UTC date-time of the whatsApp template (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**modifiedAt** | **string** | UTC date-time of last modification of the whatsApp template (YYYY-MM-DDTHH:mm:ss.SSSZ) | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetWebhook.md b/vendor/getbrevo/brevo-php/docs/Model/GetWebhook.md new file mode 100644 index 0000000..883bc89 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetWebhook.md @@ -0,0 +1,19 @@ +# GetWebhook + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **string** | URL of the webhook | +**id** | **int** | ID of the webhook | +**description** | **string** | Description of the webhook | +**events** | **string[]** | | +**type** | **string** | Type of webhook (marketing or transactional) | +**createdAt** | **string** | Creation UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**modifiedAt** | **string** | Last modification UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**batched** | **bool** | To send batched webhooks | [optional] +**auth** | [**\Brevo\Client\Model\GetWebhookAuth**](GetWebhookAuth.md) | | [optional] +**headers** | [**\Brevo\Client\Model\GetWebhookHeaders[]**](GetWebhookHeaders.md) | Custom headers to be send with webhooks | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetWebhookAuth.md b/vendor/getbrevo/brevo-php/docs/Model/GetWebhookAuth.md new file mode 100644 index 0000000..e7d208e --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetWebhookAuth.md @@ -0,0 +1,11 @@ +# GetWebhookAuth + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | Type of authentication | [optional] +**token** | **string** | Webhook authentication token | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetWebhookHeaders.md b/vendor/getbrevo/brevo-php/docs/Model/GetWebhookHeaders.md new file mode 100644 index 0000000..29a524c --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetWebhookHeaders.md @@ -0,0 +1,11 @@ +# GetWebhookHeaders + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**key** | **string** | Header key name | [optional] +**value** | **string** | Header value | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetWebhooks.md b/vendor/getbrevo/brevo-php/docs/Model/GetWebhooks.md new file mode 100644 index 0000000..e5d8eb5 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetWebhooks.md @@ -0,0 +1,10 @@ +# GetWebhooks + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**webhooks** | **object[]** | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetWhatsAppConfig.md b/vendor/getbrevo/brevo-php/docs/Model/GetWhatsAppConfig.md new file mode 100644 index 0000000..af90628 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetWhatsAppConfig.md @@ -0,0 +1,15 @@ +# GetWhatsAppConfig + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**whatsappBusinessAccountId** | **string** | Id of the WhatsApp business account | [optional] +**sendingLimit** | **string** | Sending limit Information of the WhatsApp API account | [optional] +**phoneNumberQuality** | **string** | Quality status of phone number associated with WhatsApp account. There are three quality ratings. example - **High (GREEN) , Medium (YELLOW) and Low(RED)** | [optional] +**whatsappBusinessAccountStatus** | **string** | Status information related to WhatsApp Api account | [optional] +**businessStatus** | **string** | Verification status information of the Business account | [optional] +**phoneNumberNameStatus** | **string** | Status of the name associated with WhatsApp Phone number | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetWhatsappCampaignOverview.md b/vendor/getbrevo/brevo-php/docs/Model/GetWhatsappCampaignOverview.md new file mode 100644 index 0000000..9251b7d --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetWhatsappCampaignOverview.md @@ -0,0 +1,18 @@ +# GetWhatsappCampaignOverview + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | ID of the WhatsApp Campaign | +**campaignName** | **string** | Name of the WhatsApp Campaign | +**campaignStatus** | **string** | Status of the WhatsApp Campaign | +**scheduledAt** | **string** | UTC date-time on which WhatsApp campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format | [optional] +**senderNumber** | **string** | Sender of the WhatsApp Campaign | +**stats** | [**\Brevo\Client\Model\WhatsappCampStats**](WhatsappCampStats.md) | | [optional] +**template** | [**\Brevo\Client\Model\WhatsappCampTemplate**](WhatsappCampTemplate.md) | | +**createdAt** | **string** | Creation UTC date-time of the WhatsApp campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**modifiedAt** | **string** | UTC date-time of last modification of the WhatsApp campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetWhatsappCampaigns.md b/vendor/getbrevo/brevo-php/docs/Model/GetWhatsappCampaigns.md new file mode 100644 index 0000000..b9cf310 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetWhatsappCampaigns.md @@ -0,0 +1,11 @@ +# GetWhatsappCampaigns + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**campaigns** | [**\Brevo\Client\Model\GetWhatsappCampaignsCampaigns[]**](GetWhatsappCampaignsCampaigns.md) | | [optional] +**count** | **int** | Number of WhatsApp campaigns retrived | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetWhatsappCampaignsCampaigns.md b/vendor/getbrevo/brevo-php/docs/Model/GetWhatsappCampaignsCampaigns.md new file mode 100644 index 0000000..c1a7421 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetWhatsappCampaignsCampaigns.md @@ -0,0 +1,20 @@ +# GetWhatsappCampaignsCampaigns + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | ID of the WhatsApp Campaign | +**campaignName** | **string** | Name of the WhatsApp Campaign | +**templateId** | **string** | Id of the WhatsApp template | +**campaignStatus** | **string** | Status of the WhatsApp Campaign | +**scheduledAt** | **string** | UTC date-time on which WhatsApp campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format | +**errorReason** | **string** | Error reason in the campaign creation | [optional] +**invalidatedContacts** | **int** | Count of invalidated contacts | [optional] +**readPercentage** | **float** | Read percentage of the the WhatsApp campaign created | [optional] +**stats** | [**\Brevo\Client\Model\WhatsappCampStats**](WhatsappCampStats.md) | | [optional] +**createdAt** | **string** | Creation UTC date-time of the WhatsApp campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**modifiedAt** | **string** | UTC date-time of last modification of the whatsapp template (YYYY-MM-DDTHH:mm:ss.SSSZ) | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetWhatsappEventReport.md b/vendor/getbrevo/brevo-php/docs/Model/GetWhatsappEventReport.md new file mode 100644 index 0000000..f99423c --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetWhatsappEventReport.md @@ -0,0 +1,10 @@ +# GetWhatsappEventReport + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**events** | [**\Brevo\Client\Model\GetWhatsappEventReportEvents[]**](GetWhatsappEventReportEvents.md) | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/GetWhatsappEventReportEvents.md b/vendor/getbrevo/brevo-php/docs/Model/GetWhatsappEventReportEvents.md new file mode 100644 index 0000000..5474772 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/GetWhatsappEventReportEvents.md @@ -0,0 +1,17 @@ +# GetWhatsappEventReportEvents + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**contactNumber** | **string** | WhatsApp Number with country code. Example, 85264318721 | +**date** | **string** | UTC date-time on which the event has been generated | +**messageId** | **string** | Message ID which generated the event | +**event** | **string** | Event which occurred | +**reason** | **string** | Reason for the event (will be there in case of `error` and `soft-bounce` events) | [optional] +**body** | **string** | Text of the reply (will be there only in case of `reply` event with text) | [optional] +**mediaUrl** | **string** | Url of the media reply (will be there only in case of `reply` event with media) | [optional] +**senderNumber** | **string** | WhatsApp Number with country code. Example, 85264318721 | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/InlineResponse200.md b/vendor/getbrevo/brevo-php/docs/Model/InlineResponse200.md new file mode 100644 index 0000000..5990843 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/InlineResponse200.md @@ -0,0 +1,11 @@ +# InlineResponse200 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique id of the group | [optional] +**groupName** | **string** | The name of the group of sub-accounts | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/InlineResponse2001.md b/vendor/getbrevo/brevo-php/docs/Model/InlineResponse2001.md new file mode 100644 index 0000000..47f3681 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/InlineResponse2001.md @@ -0,0 +1,10 @@ +# InlineResponse2001 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique company id | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/InlineResponse2002.md b/vendor/getbrevo/brevo-php/docs/Model/InlineResponse2002.md new file mode 100644 index 0000000..c9b0393 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/InlineResponse2002.md @@ -0,0 +1,12 @@ +# InlineResponse2002 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | The id of the collection | +**name** | **string** | The name of the collection | +**defaultCoupon** | **string** | The default coupon of the collection | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/InlineResponse201.md b/vendor/getbrevo/brevo-php/docs/Model/InlineResponse201.md new file mode 100644 index 0000000..f9e19de --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/InlineResponse201.md @@ -0,0 +1,10 @@ +# InlineResponse201 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/InlineResponse2011.md b/vendor/getbrevo/brevo-php/docs/Model/InlineResponse2011.md new file mode 100644 index 0000000..b3ac15c --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/InlineResponse2011.md @@ -0,0 +1,10 @@ +# InlineResponse2011 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique deal id | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/InlineResponse2012.md b/vendor/getbrevo/brevo-php/docs/Model/InlineResponse2012.md new file mode 100644 index 0000000..d62c7f5 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/InlineResponse2012.md @@ -0,0 +1,10 @@ +# InlineResponse2012 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique task id | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/InlineResponse2013.md b/vendor/getbrevo/brevo-php/docs/Model/InlineResponse2013.md new file mode 100644 index 0000000..699a3d9 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/InlineResponse2013.md @@ -0,0 +1,10 @@ +# InlineResponse2013 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | The id of the created collection | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/InlineResponse2014.md b/vendor/getbrevo/brevo-php/docs/Model/InlineResponse2014.md new file mode 100644 index 0000000..173807b --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/InlineResponse2014.md @@ -0,0 +1,10 @@ +# InlineResponse2014 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**messageId** | **string** | messageId of sent message | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/InlineResponse2015.md b/vendor/getbrevo/brevo-php/docs/Model/InlineResponse2015.md new file mode 100644 index 0000000..4cdec9f --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/InlineResponse2015.md @@ -0,0 +1,10 @@ +# InlineResponse2015 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | ID of the object created | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/InviteAdminUser.md b/vendor/getbrevo/brevo-php/docs/Model/InviteAdminUser.md new file mode 100644 index 0000000..cbcf531 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/InviteAdminUser.md @@ -0,0 +1,13 @@ +# InviteAdminUser + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **string** | Email address for the organization | +**allFeaturesAccess** | **bool** | All access to the features | +**groupIds** | **string[]** | Ids of Group | [optional] +**privileges** | [**\Brevo\Client\Model\InviteAdminUserPrivileges[]**](InviteAdminUserPrivileges.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/InviteAdminUserPrivileges.md b/vendor/getbrevo/brevo-php/docs/Model/InviteAdminUserPrivileges.md new file mode 100644 index 0000000..9d87b19 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/InviteAdminUserPrivileges.md @@ -0,0 +1,11 @@ +# InviteAdminUserPrivileges + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feature** | **string** | Feature name | [optional] +**permissions** | **string[]** | Permissions for a given feature | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/Inviteuser.md b/vendor/getbrevo/brevo-php/docs/Model/Inviteuser.md new file mode 100644 index 0000000..4589434 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/Inviteuser.md @@ -0,0 +1,12 @@ +# Inviteuser + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **string** | Email address for the organization | +**allFeaturesAccess** | **bool** | All access to the features | +**privileges** | [**\Brevo\Client\Model\InviteuserPrivileges[]**](InviteuserPrivileges.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/InviteuserPrivileges.md b/vendor/getbrevo/brevo-php/docs/Model/InviteuserPrivileges.md new file mode 100644 index 0000000..5d3a38a --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/InviteuserPrivileges.md @@ -0,0 +1,11 @@ +# InviteuserPrivileges + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feature** | **string** | Feature name | [optional] +**permissions** | **string[]** | Permissions for a given feature | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/ManageIp.md b/vendor/getbrevo/brevo-php/docs/Model/ManageIp.md new file mode 100644 index 0000000..797f01c --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/ManageIp.md @@ -0,0 +1,10 @@ +# ManageIp + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ip** | **string** | Dedicated ID | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/MasterDetailsResponse.md b/vendor/getbrevo/brevo-php/docs/Model/MasterDetailsResponse.md new file mode 100644 index 0000000..69f0cdf --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/MasterDetailsResponse.md @@ -0,0 +1,16 @@ +# MasterDetailsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **string** | Email id of master account | [optional] +**companyName** | **string** | Company name of master account organization | [optional] +**id** | **int** | Unique identifier of the master account organization | [optional] +**currencyCode** | **string** | Currency code of the master account organization | [optional] +**timezone** | **string** | Timezone of the master account organization | [optional] +**billingInfo** | [**\Brevo\Client\Model\MasterDetailsResponseBillingInfo**](MasterDetailsResponseBillingInfo.md) | | [optional] +**planInfo** | [**\Brevo\Client\Model\MasterDetailsResponsePlanInfo**](MasterDetailsResponsePlanInfo.md) | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/MasterDetailsResponseBillingInfo.md b/vendor/getbrevo/brevo-php/docs/Model/MasterDetailsResponseBillingInfo.md new file mode 100644 index 0000000..a131c7a --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/MasterDetailsResponseBillingInfo.md @@ -0,0 +1,13 @@ +# MasterDetailsResponseBillingInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **string** | Billing email id of master account | [optional] +**companyName** | **string** | Company name of master account | [optional] +**name** | [**\Brevo\Client\Model\MasterDetailsResponseBillingInfoName**](MasterDetailsResponseBillingInfoName.md) | | [optional] +**address** | [**\Brevo\Client\Model\MasterDetailsResponseBillingInfoAddress**](MasterDetailsResponseBillingInfoAddress.md) | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/MasterDetailsResponseBillingInfoAddress.md b/vendor/getbrevo/brevo-php/docs/Model/MasterDetailsResponseBillingInfoAddress.md new file mode 100644 index 0000000..3c8cc31 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/MasterDetailsResponseBillingInfoAddress.md @@ -0,0 +1,14 @@ +# MasterDetailsResponseBillingInfoAddress + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**streetAddress** | **string** | Street address | [optional] +**locality** | **string** | Locality | [optional] +**postalCode** | **string** | Postal code | [optional] +**stateCode** | **string** | State code | [optional] +**countryCode** | **string** | Country code | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/MasterDetailsResponseBillingInfoName.md b/vendor/getbrevo/brevo-php/docs/Model/MasterDetailsResponseBillingInfoName.md new file mode 100644 index 0000000..0e038fc --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/MasterDetailsResponseBillingInfoName.md @@ -0,0 +1,11 @@ +# MasterDetailsResponseBillingInfoName + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**givenName** | **string** | First name for billing | [optional] +**familyName** | **string** | Last name for billing | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/MasterDetailsResponsePlanInfo.md b/vendor/getbrevo/brevo-php/docs/Model/MasterDetailsResponsePlanInfo.md new file mode 100644 index 0000000..3131ad9 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/MasterDetailsResponsePlanInfo.md @@ -0,0 +1,15 @@ +# MasterDetailsResponsePlanInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currencyCode** | **string** | Plan currency | [optional] +**nextBillingAt** | **int** | Timestamp of next billing date | [optional] +**price** | **float** | Plan amount | [optional] +**planPeriod** | **string** | Plan period type | [optional] +**subAccounts** | **int** | Number of sub-accounts | [optional] +**features** | [**\Brevo\Client\Model\MasterDetailsResponsePlanInfoFeatures[]**](MasterDetailsResponsePlanInfoFeatures.md) | List of provided features in the plan | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/MasterDetailsResponsePlanInfoFeatures.md b/vendor/getbrevo/brevo-php/docs/Model/MasterDetailsResponsePlanInfoFeatures.md new file mode 100644 index 0000000..c39d52b --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/MasterDetailsResponsePlanInfoFeatures.md @@ -0,0 +1,16 @@ +# MasterDetailsResponsePlanInfoFeatures + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Name of the feature | [optional] +**unitValue** | **string** | Unit value of the feature | [optional] +**quantity** | **int** | Quantity provided in the plan | [optional] +**quantityWithOverages** | **int** | Quantity with overages provided in the plan (only applicable on ENTv2) | [optional] +**used** | **int** | Quantity consumed by master | [optional] +**usedOverages** | **int** | Quantity consumed by sub-organizations over the admin plan limit (only applicable on ENTv2) | [optional] +**remaining** | **int** | Quantity remaining in the plan | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/Note.md b/vendor/getbrevo/brevo-php/docs/Model/Note.md new file mode 100644 index 0000000..1269471 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/Note.md @@ -0,0 +1,16 @@ +# Note + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique note Id | [optional] +**text** | **string** | Text content of a note | +**contactIds** | **int[]** | Contact ids linked to a note | [optional] +**dealIds** | **string[]** | Deal ids linked to a note | [optional] +**authorId** | **object** | Account details of user which created the note | [optional] +**createdAt** | [**\DateTime**] | Note created date/time | [optional] +**updatedAt** | [**\DateTime**] | Note updated date/time | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/NoteData.md b/vendor/getbrevo/brevo-php/docs/Model/NoteData.md new file mode 100644 index 0000000..e70cbc7 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/NoteData.md @@ -0,0 +1,13 @@ +# NoteData + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**text** | **string** | Text content of a note | +**contactIds** | **int[]** | Contact Ids linked to a note | [optional] +**dealIds** | **string[]** | Deal Ids linked to a note | [optional] +**companyIds** | **string[]** | Company Ids linked to a note | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/NoteId.md b/vendor/getbrevo/brevo-php/docs/Model/NoteId.md new file mode 100644 index 0000000..84ee593 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/NoteId.md @@ -0,0 +1,10 @@ +# NoteId + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique note Id | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/NoteList.md b/vendor/getbrevo/brevo-php/docs/Model/NoteList.md new file mode 100644 index 0000000..81fc0fa --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/NoteList.md @@ -0,0 +1,9 @@ +# NoteList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/Order.md b/vendor/getbrevo/brevo-php/docs/Model/Order.md new file mode 100644 index 0000000..fb444ce --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/Order.md @@ -0,0 +1,18 @@ +# Order + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique ID of the order. | +**createdAt** | **string** | Event occurrence UTC date-time (YYYY-MM-DDTHH:mm:ssZ), when order is actually created. | +**updatedAt** | **string** | Event updated UTC date-time (YYYY-MM-DDTHH:mm:ssZ), when the status of the order is actually changed/updated. | +**status** | **string** | State of the order. | +**amount** | **float** | Total amount of the order, including all shipping expenses, tax and the price of items. | +**products** | [**\Brevo\Client\Model\OrderProducts[]**](OrderProducts.md) | | +**email** | **string** | Email of the contact, Mandatory if \"phone\" field is not passed in \"billing\" parameter. | [optional] +**billing** | [**\Brevo\Client\Model\OrderBilling**](OrderBilling.md) | | [optional] +**coupons** | **string[]** | Coupons applied to the order. Stored case insensitive. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/OrderBatch.md b/vendor/getbrevo/brevo-php/docs/Model/OrderBatch.md new file mode 100644 index 0000000..e2fe2d1 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/OrderBatch.md @@ -0,0 +1,12 @@ +# OrderBatch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**orders** | [**\Brevo\Client\Model\Order[]**](Order.md) | array of order objects | +**notifyUrl** | **string** | Notify Url provided by client to get the status of batch request | [optional] +**historical** | **bool** | Defines wether you want your orders to be considered as live data or as historical data (import of past data, synchronising data). True: orders will not trigger any automation workflows. False: orders will trigger workflows as usual. | [optional] [default to true] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/OrderBilling.md b/vendor/getbrevo/brevo-php/docs/Model/OrderBilling.md new file mode 100644 index 0000000..0abf39e --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/OrderBilling.md @@ -0,0 +1,16 @@ +# OrderBilling + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**address** | **string** | Full billing address. | [optional] +**city** | **string** | Exact city of the address. | [optional] +**countryCode** | **string** | Billing country 2-letter ISO code. | [optional] +**phone** | **string** | Phone number to contact for further details about the order, Mandatory if \"email\" field is not passed. | [optional] +**postCode** | **string** | Postcode for delivery and billing. | [optional] +**paymentMethod** | **string** | How the visitor will pay for the item(s), e.g. paypal, check, etc. | [optional] +**region** | **string** | Exact region (state/province) for delivery and billing. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/OrderProducts.md b/vendor/getbrevo/brevo-php/docs/Model/OrderProducts.md new file mode 100644 index 0000000..9e1b2f0 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/OrderProducts.md @@ -0,0 +1,13 @@ +# OrderProducts + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**productId** | **string** | ID of the product. | +**quantity** | **float** | How many pieces of the product the visitor has added to the cart. | +**variantId** | **string** | Product ID of the red color shirts. | [optional] +**price** | **float** | The price of a unit of product | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/Otp.md b/vendor/getbrevo/brevo-php/docs/Model/Otp.md new file mode 100644 index 0000000..d1e6191 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/Otp.md @@ -0,0 +1,10 @@ +# Otp + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **int** | 6 digit OTP received on email | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/Pipeline.md b/vendor/getbrevo/brevo-php/docs/Model/Pipeline.md new file mode 100644 index 0000000..b7d428b --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/Pipeline.md @@ -0,0 +1,12 @@ +# Pipeline + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pipeline** | **string** | Pipeline id | [optional] +**pipelineName** | **string** | Pipeline Name | [optional] +**stages** | [**\Brevo\Client\Model\PipelineStage[]**](PipelineStage.md) | List of stages | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/PipelineStage.md b/vendor/getbrevo/brevo-php/docs/Model/PipelineStage.md new file mode 100644 index 0000000..84645f8 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/PipelineStage.md @@ -0,0 +1,11 @@ +# PipelineStage + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Stage id | [optional] +**name** | **string** | Stage name | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/Pipelines.md b/vendor/getbrevo/brevo-php/docs/Model/Pipelines.md new file mode 100644 index 0000000..948d3d9 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/Pipelines.md @@ -0,0 +1,9 @@ +# Pipelines + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/PostContactInfo.md b/vendor/getbrevo/brevo-php/docs/Model/PostContactInfo.md new file mode 100644 index 0000000..351fa34 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/PostContactInfo.md @@ -0,0 +1,10 @@ +# PostContactInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**contacts** | [**\Brevo\Client\Model\PostContactInfoContacts**](PostContactInfoContacts.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/PostContactInfoContacts.md b/vendor/getbrevo/brevo-php/docs/Model/PostContactInfoContacts.md new file mode 100644 index 0000000..3c28eff --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/PostContactInfoContacts.md @@ -0,0 +1,13 @@ +# PostContactInfoContacts + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **string[]** | | [optional] +**failure** | **string[]** | | [optional] +**total** | **int** | Displays the count of total number of contacts removed from list when user opts for \"all\" option. | [optional] +**processId** | **int** | Id of the process created to remove contacts from list when user opts for \"all\" option. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/PostSendFailed.md b/vendor/getbrevo/brevo-php/docs/Model/PostSendFailed.md new file mode 100644 index 0000000..a7d6069 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/PostSendFailed.md @@ -0,0 +1,14 @@ +# PostSendFailed + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Response code | +**message** | **string** | Response message | +**unexistingEmails** | **string[]** | | [optional] +**withoutListEmails** | **string[]** | | [optional] +**blackListedEmails** | **string[]** | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/PostSendSmsTestFailed.md b/vendor/getbrevo/brevo-php/docs/Model/PostSendSmsTestFailed.md new file mode 100644 index 0000000..8d414d6 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/PostSendSmsTestFailed.md @@ -0,0 +1,13 @@ +# PostSendSmsTestFailed + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Response code | +**message** | **string** | Response message | +**unexistingSms** | **string[]** | | [optional] +**withoutListSms** | **string[]** | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/PutRevokeUserPermission.md b/vendor/getbrevo/brevo-php/docs/Model/PutRevokeUserPermission.md new file mode 100644 index 0000000..43b7b81 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/PutRevokeUserPermission.md @@ -0,0 +1,10 @@ +# PutRevokeUserPermission + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **string** | Email address of the user. | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/Putresendcancelinvitation.md b/vendor/getbrevo/brevo-php/docs/Model/Putresendcancelinvitation.md new file mode 100644 index 0000000..a35bfff --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/Putresendcancelinvitation.md @@ -0,0 +1,10 @@ +# Putresendcancelinvitation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **string** | Email address of the user. | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/RemainingCreditModel.md b/vendor/getbrevo/brevo-php/docs/Model/RemainingCreditModel.md new file mode 100644 index 0000000..c97c2b8 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/RemainingCreditModel.md @@ -0,0 +1,11 @@ +# RemainingCreditModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**child** | [**\Brevo\Client\Model\RemainingCreditModelChild**](RemainingCreditModelChild.md) | | +**reseller** | [**\Brevo\Client\Model\RemainingCreditModelReseller**](RemainingCreditModelReseller.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/RemainingCreditModelChild.md b/vendor/getbrevo/brevo-php/docs/Model/RemainingCreditModelChild.md new file mode 100644 index 0000000..b3c6140 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/RemainingCreditModelChild.md @@ -0,0 +1,11 @@ +# RemainingCreditModelChild + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sms** | **double** | SMS Credits remaining for child account | +**email** | **double** | Email Credits remaining for child account | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/RemainingCreditModelReseller.md b/vendor/getbrevo/brevo-php/docs/Model/RemainingCreditModelReseller.md new file mode 100644 index 0000000..e447a82 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/RemainingCreditModelReseller.md @@ -0,0 +1,11 @@ +# RemainingCreditModelReseller + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sms** | **double** | SMS Credits remaining for reseller account | +**email** | **double** | Email Credits remaining for reseller account | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/RemoveContactFromList.md b/vendor/getbrevo/brevo-php/docs/Model/RemoveContactFromList.md new file mode 100644 index 0000000..9677d35 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/RemoveContactFromList.md @@ -0,0 +1,12 @@ +# RemoveContactFromList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**emails** | **string[]** | Required if 'all' is false. Emails to remove from a list. You can pass a maximum of 150 emails for removal in one request. | [optional] +**ids** | **int[]** | Mandatory if Emails are not passed, ignored otherwise. Emails to add to a list. You can pass a maximum of 150 emails for addition in one request. If you need to add the emails in bulk, please prefer /contacts/import api. | [optional] +**all** | **bool** | Required if none of 'emails' or 'ids' are passed. Remove all existing contacts from a list. A process will be created in this scenario. You can fetch the process details to know about the progress | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/RemoveCredits.md b/vendor/getbrevo/brevo-php/docs/Model/RemoveCredits.md new file mode 100644 index 0000000..3cbac52 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/RemoveCredits.md @@ -0,0 +1,11 @@ +# RemoveCredits + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sms** | **int** | Required if email credits are empty. SMS credits to be removed from the child account | [optional] +**email** | **int** | Required if sms credits are empty. Email credits to be removed from the child account | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/RequestContactExport.md b/vendor/getbrevo/brevo-php/docs/Model/RequestContactExport.md new file mode 100644 index 0000000..ac02086 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/RequestContactExport.md @@ -0,0 +1,12 @@ +# RequestContactExport + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**exportAttributes** | **string[]** | List of all the attributes that you want to export. These attributes must be present in your contact database. For example, ['fname', 'lname', 'email']. | [optional] +**customContactFilter** | [**\Brevo\Client\Model\RequestContactExportCustomContactFilter**](RequestContactExportCustomContactFilter.md) | | +**notifyUrl** | **string** | Webhook that will be called once the export process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479 | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/RequestContactExportCustomContactFilter.md b/vendor/getbrevo/brevo-php/docs/Model/RequestContactExportCustomContactFilter.md new file mode 100644 index 0000000..66079ef --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/RequestContactExportCustomContactFilter.md @@ -0,0 +1,15 @@ +# RequestContactExportCustomContactFilter + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**actionForContacts** | **string** | Mandatory if neither actionForEmailCampaigns nor actionForSmsCampaigns is passed. This will export the contacts on the basis of provided action applied on contacts as per the list id. * allContacts - Fetch the list of all contacts for a particular list. * subscribed & unsubscribed - Fetch the list of subscribed / unsubscribed (blacklisted via any means) contacts for a particular list. * unsubscribedPerList - Fetch the list of contacts that are unsubscribed from a particular list only. | [optional] +**actionForEmailCampaigns** | **string** | Mandatory if neither actionForContacts nor actionForSmsCampaigns is passed. This will export the contacts on the basis of provided action applied on email campaigns. * openers & nonOpeners - emailCampaignId is mandatory. Fetch the list of readers / non-readers for a particular email campaign. * clickers & nonClickers - emailCampaignId is mandatory. Fetch the list of clickers / non-clickers for a particular email campaign. * unsubscribed - emailCampaignId is mandatory. Fetch the list of all unsubscribed (blacklisted via any means) contacts for a particular email campaign. * hardBounces & softBounces - emailCampaignId is optional. Fetch the list of hard bounces / soft bounces for a particular / all email campaign(s). | [optional] +**actionForSmsCampaigns** | **string** | Mandatory if neither actionForContacts nor actionForEmailCampaigns is passed. This will export the contacts on the basis of provided action applied on sms campaigns. * unsubscribed - Fetch the list of all unsubscribed (blacklisted via any means) contacts for all / particular sms campaigns. * hardBounces & softBounces - Fetch the list of hard bounces / soft bounces for all / particular sms campaigns. | [optional] +**listId** | **int** | Mandatory if actionForContacts is passed, ignored otherwise. Id of the list for which the corresponding action shall be applied in the filter. | [optional] +**emailCampaignId** | **int** | Considered only if actionForEmailCampaigns is passed, ignored otherwise. Mandatory if action is one of the following - openers, nonOpeners, clickers, nonClickers, unsubscribed. The id of the email campaign for which the corresponding action shall be applied in the filter. | [optional] +**smsCampaignId** | **int** | Considered only if actionForSmsCampaigns is passed, ignored otherwise. The id of sms campaign for which the corresponding action shall be applied in the filter. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/RequestContactImport.md b/vendor/getbrevo/brevo-php/docs/Model/RequestContactImport.md new file mode 100644 index 0000000..d145d9b --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/RequestContactImport.md @@ -0,0 +1,20 @@ +# RequestContactImport + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fileUrl** | **string** | Mandatory if fileBody or jsonBody is not defined. URL of the file to be imported (no local file). Possible file formats: .txt, .csv, .json | [optional] +**fileBody** | **string** | Mandatory if fileUrl and jsonBody is not defined. CSV content to be imported. Use semicolon to separate multiple attributes. Maximum allowed file body size is 10MB . However we recommend a safe limit of around 8 MB to avoid the issues caused due to increase of file body size while parsing. Please use fileUrl instead to import bigger files. | [optional] +**jsonBody** | [**\Brevo\Client\Model\RequestContactImportJsonBody[]**](RequestContactImportJsonBody.md) | **Mandatory if fileUrl and fileBody is not defined.** JSON content to be imported. **Maximum allowed json body size is 10MB** . However we recommend a safe limit of around 8 MB to avoid the issues caused due to increase of json body size while parsing. Please use fileUrl instead to import bigger files. | [optional] +**listIds** | **int[]** | Mandatory if newList is not defined. Ids of the lists in which the contacts shall be imported. For example, [2, 4, 7]. | [optional] +**notifyUrl** | **string** | URL that will be called once the import process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479 | [optional] +**newList** | [**\Brevo\Client\Model\RequestContactImportNewList**](RequestContactImportNewList.md) | | [optional] +**emailBlacklist** | **bool** | To blacklist all the contacts for email | [optional] [default to false] +**disableNotification** | **bool** | To disable email notification | [optional] [default to false] +**smsBlacklist** | **bool** | To blacklist all the contacts for sms | [optional] [default to false] +**updateExistingContacts** | **bool** | To facilitate the choice to update the existing contacts | [optional] [default to true] +**emptyContactsAttributes** | **bool** | To facilitate the choice to erase any attribute of the existing contacts with empty value. emptyContactsAttributes = true means the empty fields in your import will erase any attribute that currently contain data in Brevo, & emptyContactsAttributes = false means the empty fields will not affect your existing data ( only available if `updateExistingContacts` set to true ) | [optional] [default to false] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/RequestContactImportJsonBody.md b/vendor/getbrevo/brevo-php/docs/Model/RequestContactImportJsonBody.md new file mode 100644 index 0000000..4dcb144 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/RequestContactImportJsonBody.md @@ -0,0 +1,11 @@ +# RequestContactImportJsonBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **string** | | [optional] +**attributes** | **object** | List of attributes to be imported | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/RequestContactImportNewList.md b/vendor/getbrevo/brevo-php/docs/Model/RequestContactImportNewList.md new file mode 100644 index 0000000..049ee8f --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/RequestContactImportNewList.md @@ -0,0 +1,11 @@ +# RequestContactImportNewList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**listName** | **string** | List with listName will be created first and users will be imported in it (Mandatory if listIds is empty). | [optional] +**folderId** | **int** | Id of the folder where this new list shall be created (Mandatory if listName is not empty). | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/RequestSmsRecipientExport.md b/vendor/getbrevo/brevo-php/docs/Model/RequestSmsRecipientExport.md new file mode 100644 index 0000000..5d7d7d2 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/RequestSmsRecipientExport.md @@ -0,0 +1,11 @@ +# RequestSmsRecipientExport + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**notifyURL** | **string** | URL that will be called once the export process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479 | [optional] +**recipientsType** | **string** | Filter the recipients based on how they interacted with the campaign | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/ScheduleSmtpEmail.md b/vendor/getbrevo/brevo-php/docs/Model/ScheduleSmtpEmail.md new file mode 100644 index 0000000..a707441 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/ScheduleSmtpEmail.md @@ -0,0 +1,12 @@ +# ScheduleSmtpEmail + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**messageId** | **string** | Message ID of the transactional email scheduled | [optional] +**messageIds** | **string[]** | | [optional] +**batchId** | **string** | Batch ID of the batch transactional email scheduled | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/SendReport.md b/vendor/getbrevo/brevo-php/docs/Model/SendReport.md new file mode 100644 index 0000000..c16702a --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/SendReport.md @@ -0,0 +1,11 @@ +# SendReport + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**language** | **string** | Language of email content for campaign report sending. | [optional] [default to 'fr'] +**email** | [**\Brevo\Client\Model\SendReportEmail**](SendReportEmail.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/SendReportEmail.md b/vendor/getbrevo/brevo-php/docs/Model/SendReportEmail.md new file mode 100644 index 0000000..0485128 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/SendReportEmail.md @@ -0,0 +1,11 @@ +# SendReportEmail + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**to** | **string[]** | Email addresses of the recipients | +**body** | **string** | Custom text message to be presented in the report email. | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/SendSms.md b/vendor/getbrevo/brevo-php/docs/Model/SendSms.md new file mode 100644 index 0000000..dc51cd6 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/SendSms.md @@ -0,0 +1,14 @@ +# SendSms + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reference** | **string** | | +**messageId** | **int** | | +**smsCount** | **int** | Count of SMS's to send multiple text messages | [optional] +**usedCredits** | **float** | SMS credits used per text message | [optional] +**remainingCredits** | **float** | Remaining SMS credits of the user | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/SendSmtpEmail.md b/vendor/getbrevo/brevo-php/docs/Model/SendSmtpEmail.md new file mode 100644 index 0000000..8c6d539 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/SendSmtpEmail.md @@ -0,0 +1,25 @@ +# SendSmtpEmail + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sender** | [**\Brevo\Client\Model\SendSmtpEmailSender**](SendSmtpEmailSender.md) | | [optional] +**to** | [**\Brevo\Client\Model\SendSmtpEmailTo[]**](SendSmtpEmailTo.md) | Mandatory if messageVersions are not passed, ignored if messageVersions are passed. List of email addresses and names (optional) of the recipients. For example, [{\"name\":\"Jimmy\", \"email\":\"jimmy98@example.com\"}, {\"name\":\"Joe\", \"email\":\"joe@example.com\"}] | [optional] +**bcc** | [**\Brevo\Client\Model\SendSmtpEmailBcc[]**](SendSmtpEmailBcc.md) | List of email addresses and names (optional) of the recipients in bcc | [optional] +**cc** | [**\Brevo\Client\Model\SendSmtpEmailCc[]**](SendSmtpEmailCc.md) | List of email addresses and names (optional) of the recipients in cc | [optional] +**htmlContent** | **string** | HTML body of the message ( Mandatory if 'templateId' is not passed, ignored if 'templateId' is passed ) | [optional] +**textContent** | **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] +**replyTo** | [**\Brevo\Client\Model\SendSmtpEmailReplyTo**](SendSmtpEmailReplyTo.md) | | [optional] +**attachment** | [**\Brevo\Client\Model\SendSmtpEmailAttachment[]**](SendSmtpEmailAttachment.md) | Pass the absolute URL (no local file) or the base64 content of the attachment along with the attachment name (Mandatory if attachment content is passed). For example, `[{\"url\":\"https://attachment.domain.com/myAttachmentFromUrl.jpg\", \"name\":\"myAttachmentFromUrl.jpg\"}, {\"content\":\"base64 example content\", \"name\":\"myAttachmentFromBase64.jpg\"}]`. Allowed extensions for attachment file: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub, eps, odt, mp3, m4a, m4v, wma, ogg, flac, wav, aif, aifc, aiff, mp4, mov, avi, mkv, mpeg, mpg, wmv, pkpass and xlsm ( If 'templateId' is passed and is in New Template Language format then both attachment url and content are accepted. If template is in Old template Language format, then 'attachment' is ignored ) | [optional] +**headers** | **object** | Pass the set of custom headers (not the standard headers) that shall be sent along the mail headers in the original email. 'sender.ip' header can be set (only for dedicated ip users) to mention the IP to be used for sending transactional emails. Headers are allowed in `This-Case-Only` (i.e. words separated by hyphen with first letter of each word in capital letter), they will be converted to such case styling if not in this format in the request payload. For example, `{\"sender.ip\":\"1.2.3.4\", \"X-Mailin-custom\":\"some_custom_header\",\"idempotencyKey\":\"abc-123\"}`. | [optional] +**templateId** | **int** | Id of the template. | [optional] +**params** | **object** | Pass the set of attributes to customize the template. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. It's considered only if template is in New Template Language format. | [optional] +**messageVersions** | [**\Brevo\Client\Model\SendSmtpEmailMessageVersions[]**](SendSmtpEmailMessageVersions.md) | You can customize and send out multiple versions of a mail. templateId can be customized only if global parameter contains templateId. htmlContent and textContent can be customized only if any of the two, htmlContent or textContent, is present in global parameters. Some global parameters such as **to(mandatory), bcc, cc, replyTo, subject** can also be customized specific to each version. Total number of recipients in one API request must not exceed 2000. However, you can still pass upto 99 recipients maximum in one message version. The size of individual params in all the messageVersions shall not exceed 100 KB limit and that of cumulative params shall not exceed 1000 KB. You can follow this **step-by-step guide** on how to use **messageVersions** to batch send emails - https://developers.brevo.com/docs/batch-send-transactional-emails | [optional] +**tags** | **string[]** | Tag your emails to find them more easily | [optional] +**scheduledAt** | [**\DateTime**] | UTC date-time on which the email has to schedule (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for scheduling. There can be an expected delay of +5 minutes in scheduled email delivery. **Please note this feature is currently a public beta**. | [optional] +**batchId** | **string** | Valid UUIDv4 batch id to identify the scheduled batches transactional email. If not passed we will create a valid UUIDv4 batch id at our end. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/SendSmtpEmailAttachment.md b/vendor/getbrevo/brevo-php/docs/Model/SendSmtpEmailAttachment.md new file mode 100644 index 0000000..713d2cf --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/SendSmtpEmailAttachment.md @@ -0,0 +1,12 @@ +# SendSmtpEmailAttachment + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **string** | Absolute url of the attachment (no local file). | [optional] +**content** | **string** | Base64 encoded chunk data of the attachment generated on the fly | [optional] +**name** | **string** | Required if content is passed. Name of the attachment | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/SendSmtpEmailBcc.md b/vendor/getbrevo/brevo-php/docs/Model/SendSmtpEmailBcc.md new file mode 100644 index 0000000..3804644 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/SendSmtpEmailBcc.md @@ -0,0 +1,11 @@ +# SendSmtpEmailBcc + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **string** | Email address of the recipient in bcc | +**name** | **string** | Name of the recipient in bcc. Maximum allowed characters are 70. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/SendSmtpEmailCc.md b/vendor/getbrevo/brevo-php/docs/Model/SendSmtpEmailCc.md new file mode 100644 index 0000000..a36ff0d --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/SendSmtpEmailCc.md @@ -0,0 +1,11 @@ +# SendSmtpEmailCc + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **string** | Email address of the recipient in cc | +**name** | **string** | Name of the recipient in cc. Maximum allowed characters are 70. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/SendSmtpEmailMessageVersions.md b/vendor/getbrevo/brevo-php/docs/Model/SendSmtpEmailMessageVersions.md new file mode 100644 index 0000000..7f024e8 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/SendSmtpEmailMessageVersions.md @@ -0,0 +1,15 @@ +# SendSmtpEmailMessageVersions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**to** | [**\Brevo\Client\Model\SendSmtpEmailTo1[]**](SendSmtpEmailTo1.md) | List of email addresses and names (_optional_) of the recipients. For example, [{\"name\":\"Jimmy\", \"email\":\"jimmy98@example.com\"}, {\"name\":\"Joe\", \"email\":\"joe@example.com\"}] | +**params** | **map[string,object]** | Pass the set of attributes to customize the template. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. It's considered only if template is in New Template Language format. | [optional] +**bcc** | [**\Brevo\Client\Model\SendSmtpEmailBcc[]**](SendSmtpEmailBcc.md) | List of email addresses and names (optional) of the recipients in bcc | [optional] +**cc** | [**\Brevo\Client\Model\SendSmtpEmailCc[]**](SendSmtpEmailCc.md) | List of email addresses and names (optional) of the recipients in cc | [optional] +**replyTo** | [**\Brevo\Client\Model\SendSmtpEmailReplyTo1**](SendSmtpEmailReplyTo1.md) | | [optional] +**subject** | **string** | Custom subject specific to message version | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/SendSmtpEmailReplyTo.md b/vendor/getbrevo/brevo-php/docs/Model/SendSmtpEmailReplyTo.md new file mode 100644 index 0000000..1dc896b --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/SendSmtpEmailReplyTo.md @@ -0,0 +1,11 @@ +# SendSmtpEmailReplyTo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **string** | Email address in reply to | +**name** | **string** | Name in reply to. Maximum allowed characters are 70. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/SendSmtpEmailReplyTo1.md b/vendor/getbrevo/brevo-php/docs/Model/SendSmtpEmailReplyTo1.md new file mode 100644 index 0000000..f00cae6 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/SendSmtpEmailReplyTo1.md @@ -0,0 +1,11 @@ +# SendSmtpEmailReplyTo1 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **string** | Email address in reply to | +**name** | **string** | Name in reply to. Maximum allowed characters are 70. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/SendSmtpEmailSender.md b/vendor/getbrevo/brevo-php/docs/Model/SendSmtpEmailSender.md new file mode 100644 index 0000000..e719f84 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/SendSmtpEmailSender.md @@ -0,0 +1,12 @@ +# SendSmtpEmailSender + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Name of the sender from which the emails will be sent. Maximum allowed characters are 70. Applicable only when email is passed. | [optional] +**email** | **string** | Email of the sender from which the emails will be sent. Mandatory if sender id is not passed. | [optional] +**id** | **int** | Id of the sender from which the emails will be sent. In order to select a sender with specific pool of IP’s, dedicated ip users shall pass id (instead of email). Mandatory if email is not passed. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/SendSmtpEmailTo.md b/vendor/getbrevo/brevo-php/docs/Model/SendSmtpEmailTo.md new file mode 100644 index 0000000..bbba303 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/SendSmtpEmailTo.md @@ -0,0 +1,11 @@ +# SendSmtpEmailTo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **string** | Email address of the recipient | +**name** | **string** | Name of the recipient. Maximum allowed characters are 70. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/SendSmtpEmailTo1.md b/vendor/getbrevo/brevo-php/docs/Model/SendSmtpEmailTo1.md new file mode 100644 index 0000000..0a90e7d --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/SendSmtpEmailTo1.md @@ -0,0 +1,11 @@ +# SendSmtpEmailTo1 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **string** | Email address of the recipient | +**name** | **string** | Name of the recipient. **Maximum allowed characters are 70**. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/SendTestEmail.md b/vendor/getbrevo/brevo-php/docs/Model/SendTestEmail.md new file mode 100644 index 0000000..ed3e02b --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/SendTestEmail.md @@ -0,0 +1,10 @@ +# SendTestEmail + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**emailTo** | **string[]** | List of the email addresses of the recipients whom you wish to send the test mail. If left empty, the test mail will be sent to your entire test list. You can not send more than 50 test emails per day. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/SendTestSms.md b/vendor/getbrevo/brevo-php/docs/Model/SendTestSms.md new file mode 100644 index 0000000..0cd00d7 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/SendTestSms.md @@ -0,0 +1,10 @@ +# SendTestSms + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**phoneNumber** | **string** | Mobile number of the recipient with the country code. This number must belong to one of your contacts in Brevo account and must not be blacklisted | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/SendTransacSms.md b/vendor/getbrevo/brevo-php/docs/Model/SendTransacSms.md new file mode 100644 index 0000000..f1bddc2 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/SendTransacSms.md @@ -0,0 +1,17 @@ +# SendTransacSms + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sender** | **string** | Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters** | +**recipient** | **string** | Mobile number to send SMS with the country code | +**content** | **string** | Content of the message. If more than 160 characters long, will be sent as multiple text messages | +**type** | **string** | Type of the SMS. Marketing SMS messages are those sent typically with marketing content. Transactional SMS messages are sent to individuals and are triggered in response to some action, such as a sign-up, purchase, etc. | [optional] [default to 'transactional'] +**tag** | **string** | Tag of the message | [optional] +**webUrl** | **string** | Webhook to call for each event triggered by the message (delivered etc.) | [optional] +**unicodeEnabled** | **bool** | Format of the message. It indicates whether the content should be treated as unicode or not. | [optional] [default to false] +**organisationPrefix** | **string** | A recognizable prefix will ensure your audience knows who you are. Recommended by U.S. carriers. This will be added as your Brand Name before the message content. **Prefer verifying maximum length of 160 characters including this prefix in message content to avoid multiple sending of same sms.** | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/SendWhatsappMessage.md b/vendor/getbrevo/brevo-php/docs/Model/SendWhatsappMessage.md new file mode 100644 index 0000000..3d27a53 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/SendWhatsappMessage.md @@ -0,0 +1,14 @@ +# SendWhatsappMessage + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**templateId** | **int** | ID of the template to send | [optional] +**text** | **string** | Text to be sent as message body (will be overridden if templateId is passed in the same request) | [optional] +**senderNumber** | **string** | WhatsApp Number with country code. Example, 85264318721 | +**params** | **object** | Pass the set of attributes to customize the template. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. | [optional] +**contactNumbers** | **string[]** | List of phone numbers of the contacts | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/SsoTokenRequest.md b/vendor/getbrevo/brevo-php/docs/Model/SsoTokenRequest.md new file mode 100644 index 0000000..b13114b --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/SsoTokenRequest.md @@ -0,0 +1,13 @@ +# SsoTokenRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Id of the sub-account organization | +**email** | **string** | User email of sub-account organization | [optional] +**target** | **string** | Set target after login success * automation - Redirect to Automation after login * email_campaign - Redirect to Email Campaign after login * contacts - Redirect to Contacts after login * landing_pages - Redirect to Landing Pages after login * email_transactional - Redirect to Email Transactional after login * senders - Redirect to Contacts after login * sms_campaign - Redirect to Sms Campaign after login * sms_transactional - Redirect to Sms Transactional after login | [optional] +**url** | **string** | Set the full target URL after login success. The user will land directly on this target URL after login | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/SubAccountAppsToggleRequest.md b/vendor/getbrevo/brevo-php/docs/Model/SubAccountAppsToggleRequest.md new file mode 100644 index 0000000..edff60b --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/SubAccountAppsToggleRequest.md @@ -0,0 +1,22 @@ +# SubAccountAppsToggleRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**inbox** | **bool** | Set this field to enable or disable Inbox on the sub-account / Not applicable on ENTv2 | [optional] +**whatsapp** | **bool** | Set this field to enable or disable Whatsapp campaigns on the sub-account | [optional] +**automation** | **bool** | Set this field to enable or disable Automation on the sub-account | [optional] +**emailCampaigns** | **bool** | Set this field to enable or disable Email Campaigns on the sub-account | [optional] +**smsCampaigns** | **bool** | Set this field to enable or disable SMS Marketing on the sub-account | [optional] +**landingPages** | **bool** | Set this field to enable or disable Landing pages on the sub-account | [optional] +**transactionalEmails** | **bool** | Set this field to enable or disable Transactional Email on the sub-account | [optional] +**transactionalSms** | **bool** | Set this field to enable or disable Transactional SMS on the sub-account | [optional] +**facebookAds** | **bool** | Set this field to enable or disable Facebook ads on the sub-account | [optional] +**webPush** | **bool** | Set this field to enable or disable Web Push on the sub-account | [optional] +**meetings** | **bool** | Set this field to enable or disable Meetings on the sub-account | [optional] +**conversations** | **bool** | Set this field to enable or disable Conversations on the sub-account | [optional] +**crm** | **bool** | Set this field to enable or disable Sales CRM on the sub-account | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/SubAccountDetailsResponse.md b/vendor/getbrevo/brevo-php/docs/Model/SubAccountDetailsResponse.md new file mode 100644 index 0000000..8f4a48b --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/SubAccountDetailsResponse.md @@ -0,0 +1,13 @@ +# SubAccountDetailsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Name of the sub-account user | [optional] +**email** | **string** | Email id of the sub-account organization | [optional] +**companyName** | **string** | Sub-account company name | [optional] +**planInfo** | [**\Brevo\Client\Model\SubAccountDetailsResponsePlanInfo**](SubAccountDetailsResponsePlanInfo.md) | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/SubAccountDetailsResponsePlanInfo.md b/vendor/getbrevo/brevo-php/docs/Model/SubAccountDetailsResponsePlanInfo.md new file mode 100644 index 0000000..b869352 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/SubAccountDetailsResponsePlanInfo.md @@ -0,0 +1,12 @@ +# SubAccountDetailsResponsePlanInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**credits** | [**\Brevo\Client\Model\SubAccountDetailsResponsePlanInfoCredits**](SubAccountDetailsResponsePlanInfoCredits.md) | | [optional] +**features** | [**\Brevo\Client\Model\SubAccountDetailsResponsePlanInfoFeatures**](SubAccountDetailsResponsePlanInfoFeatures.md) | | [optional] +**planType** | **string** | type of the plan | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/SubAccountDetailsResponsePlanInfoCredits.md b/vendor/getbrevo/brevo-php/docs/Model/SubAccountDetailsResponsePlanInfoCredits.md new file mode 100644 index 0000000..6104939 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/SubAccountDetailsResponsePlanInfoCredits.md @@ -0,0 +1,11 @@ +# SubAccountDetailsResponsePlanInfoCredits + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sms** | **int** | SMS credits remaining on the sub-account | [optional] +**emails** | [**\Brevo\Client\Model\SubAccountDetailsResponsePlanInfoCreditsEmails**](SubAccountDetailsResponsePlanInfoCreditsEmails.md) | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/SubAccountDetailsResponsePlanInfoCreditsEmails.md b/vendor/getbrevo/brevo-php/docs/Model/SubAccountDetailsResponsePlanInfoCreditsEmails.md new file mode 100644 index 0000000..2ce9e82 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/SubAccountDetailsResponsePlanInfoCreditsEmails.md @@ -0,0 +1,11 @@ +# SubAccountDetailsResponsePlanInfoCreditsEmails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**quantity** | **int** | Quantity of email messaging limits provided | [optional] +**remaining** | **int** | Available email messaging limits for use | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/SubAccountDetailsResponsePlanInfoFeatures.md b/vendor/getbrevo/brevo-php/docs/Model/SubAccountDetailsResponsePlanInfoFeatures.md new file mode 100644 index 0000000..1fa47e8 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/SubAccountDetailsResponsePlanInfoFeatures.md @@ -0,0 +1,12 @@ +# SubAccountDetailsResponsePlanInfoFeatures + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**inbox** | [**\Brevo\Client\Model\SubAccountDetailsResponsePlanInfoFeaturesInbox**](SubAccountDetailsResponsePlanInfoFeaturesInbox.md) | | [optional] +**landingPage** | [**\Brevo\Client\Model\SubAccountDetailsResponsePlanInfoFeaturesLandingPage**](SubAccountDetailsResponsePlanInfoFeaturesLandingPage.md) | | [optional] +**users** | [**\Brevo\Client\Model\SubAccountDetailsResponsePlanInfoFeaturesUsers**](SubAccountDetailsResponsePlanInfoFeaturesUsers.md) | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/SubAccountDetailsResponsePlanInfoFeaturesInbox.md b/vendor/getbrevo/brevo-php/docs/Model/SubAccountDetailsResponsePlanInfoFeaturesInbox.md new file mode 100644 index 0000000..be780d5 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/SubAccountDetailsResponsePlanInfoFeaturesInbox.md @@ -0,0 +1,11 @@ +# SubAccountDetailsResponsePlanInfoFeaturesInbox + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**quantity** | **int** | Quantity of inbox provided | [optional] +**remaining** | **int** | Available inboxes for use | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/SubAccountDetailsResponsePlanInfoFeaturesLandingPage.md b/vendor/getbrevo/brevo-php/docs/Model/SubAccountDetailsResponsePlanInfoFeaturesLandingPage.md new file mode 100644 index 0000000..1a3cf32 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/SubAccountDetailsResponsePlanInfoFeaturesLandingPage.md @@ -0,0 +1,11 @@ +# SubAccountDetailsResponsePlanInfoFeaturesLandingPage + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**quantity** | **int** | Quantity of landing pages provided | [optional] +**remaining** | **int** | Available landing pages for use | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/SubAccountDetailsResponsePlanInfoFeaturesUsers.md b/vendor/getbrevo/brevo-php/docs/Model/SubAccountDetailsResponsePlanInfoFeaturesUsers.md new file mode 100644 index 0000000..d10857f --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/SubAccountDetailsResponsePlanInfoFeaturesUsers.md @@ -0,0 +1,11 @@ +# SubAccountDetailsResponsePlanInfoFeaturesUsers + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**quantity** | **int** | Quantity of multi-account's provided | [optional] +**remaining** | **int** | Available multi-accounts for use | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/SubAccountUpdatePlanRequest.md b/vendor/getbrevo/brevo-php/docs/Model/SubAccountUpdatePlanRequest.md new file mode 100644 index 0000000..4c31118 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/SubAccountUpdatePlanRequest.md @@ -0,0 +1,11 @@ +# SubAccountUpdatePlanRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**credits** | [**\Brevo\Client\Model\SubAccountUpdatePlanRequestCredits**](SubAccountUpdatePlanRequestCredits.md) | | [optional] +**features** | [**\Brevo\Client\Model\SubAccountUpdatePlanRequestFeatures**](SubAccountUpdatePlanRequestFeatures.md) | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/SubAccountUpdatePlanRequestCredits.md b/vendor/getbrevo/brevo-php/docs/Model/SubAccountUpdatePlanRequestCredits.md new file mode 100644 index 0000000..24423c2 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/SubAccountUpdatePlanRequestCredits.md @@ -0,0 +1,10 @@ +# SubAccountUpdatePlanRequestCredits + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **int** | Number of email credits | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/SubAccountUpdatePlanRequestFeatures.md b/vendor/getbrevo/brevo-php/docs/Model/SubAccountUpdatePlanRequestFeatures.md new file mode 100644 index 0000000..41eb9f3 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/SubAccountUpdatePlanRequestFeatures.md @@ -0,0 +1,12 @@ +# SubAccountUpdatePlanRequestFeatures + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**users** | **int** | Number of multi-users | [optional] +**landingPage** | **int** | Number of landing pages / Not required on ENTv2 | [optional] +**inbox** | **int** | Number of inboxes / Not required on ENTv2 | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/SubAccountsResponse.md b/vendor/getbrevo/brevo-php/docs/Model/SubAccountsResponse.md new file mode 100644 index 0000000..81487f8 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/SubAccountsResponse.md @@ -0,0 +1,11 @@ +# SubAccountsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**count** | **int** | Total number of subaccounts | [optional] +**subAccounts** | [**\Brevo\Client\Model\SubAccountsResponseSubAccounts[]**](SubAccountsResponseSubAccounts.md) | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/SubAccountsResponseSubAccounts.md b/vendor/getbrevo/brevo-php/docs/Model/SubAccountsResponseSubAccounts.md new file mode 100644 index 0000000..a801490 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/SubAccountsResponseSubAccounts.md @@ -0,0 +1,13 @@ +# SubAccountsResponseSubAccounts + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | id of the sub-account | +**companyName** | **string** | Name of the sub-account company | +**active** | **bool** | Whether the sub-account is active or not | +**createdAt** | **int** | Timestamp when the sub-account was created | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/Task.md b/vendor/getbrevo/brevo-php/docs/Model/Task.md new file mode 100644 index 0000000..5ad779e --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/Task.md @@ -0,0 +1,15 @@ +# Task + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique task id | [optional] +**taskTypeId** | **string** | Id for type of task e.g Call / Email / Meeting etc. | +**name** | **string** | Name of task | +**contactsIds** | **int[]** | Contact ids for contacts linked to this task | [optional] +**dealsIds** | **string[]** | Deal ids for deals a task is linked to | [optional] +**companiesIds** | **string[]** | Companies ids for companies a task is linked to | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/TaskList.md b/vendor/getbrevo/brevo-php/docs/Model/TaskList.md new file mode 100644 index 0000000..1f94acc --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/TaskList.md @@ -0,0 +1,10 @@ +# TaskList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**items** | [**\Brevo\Client\Model\Task[]**](Task.md) | List of tasks | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/TaskReminder.md b/vendor/getbrevo/brevo-php/docs/Model/TaskReminder.md new file mode 100644 index 0000000..f451c08 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/TaskReminder.md @@ -0,0 +1,12 @@ +# TaskReminder + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **int** | Value of time unit before reminder is to be sent | +**unit** | **string** | Unit of time before reminder is to be sent | +**types** | **string[]** | Type of task reminder e.g email, push | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/TaskTypes.md b/vendor/getbrevo/brevo-php/docs/Model/TaskTypes.md new file mode 100644 index 0000000..2ef046d --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/TaskTypes.md @@ -0,0 +1,11 @@ +# TaskTypes + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Id of task type | [optional] +**title** | **string** | Title of task type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/UpdateAttribute.md b/vendor/getbrevo/brevo-php/docs/Model/UpdateAttribute.md new file mode 100644 index 0000000..d6b270d --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/UpdateAttribute.md @@ -0,0 +1,11 @@ +# UpdateAttribute + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **string** | Value of the attribute to update. Use only if the attribute's category is 'calculated' or 'global' | [optional] +**enumeration** | [**\Brevo\Client\Model\UpdateAttributeEnumeration[]**](UpdateAttributeEnumeration.md) | List of the values and labels that the attribute can take. Use only if the attribute's category is \"category\". For example, `[{\"value\":1, \"label\":\"male\"}, {\"value\":2, \"label\":\"female\"}]` | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/UpdateAttributeEnumeration.md b/vendor/getbrevo/brevo-php/docs/Model/UpdateAttributeEnumeration.md new file mode 100644 index 0000000..e5d734d --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/UpdateAttributeEnumeration.md @@ -0,0 +1,11 @@ +# UpdateAttributeEnumeration + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **int** | Id of the value | +**label** | **string** | Label of the value | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/UpdateBatchContacts.md b/vendor/getbrevo/brevo-php/docs/Model/UpdateBatchContacts.md new file mode 100644 index 0000000..68cac97 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/UpdateBatchContacts.md @@ -0,0 +1,10 @@ +# UpdateBatchContacts + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**contacts** | [**\Brevo\Client\Model\UpdateBatchContactsContacts[]**](UpdateBatchContactsContacts.md) | List of contacts to be updated | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/UpdateBatchContactsContacts.md b/vendor/getbrevo/brevo-php/docs/Model/UpdateBatchContactsContacts.md new file mode 100644 index 0000000..303cf09 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/UpdateBatchContactsContacts.md @@ -0,0 +1,19 @@ +# UpdateBatchContactsContacts + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **string** | Email address of the user to be updated (For each operation only pass one of the supported contact identifiers. Email, id or sms) | [optional] +**id** | **int** | id of the user to be updated (For each operation only pass one of the supported contact identifiers. Email, id or sms) | [optional] +**sms** | **string** | SMS of the user to be updated (For each operation only pass one of the supported contact identifiers. Email, id or sms) | [optional] +**extId** | **string** | Pass your own Id to update ext_id of a contact. | [optional] +**attributes** | **map[string,object]** | Pass the set of attributes to be updated. **These attributes must be present in your account**. To update existing email address of a contact with the new one please pass EMAIL in attribtes. For example, **{ \"EMAIL\":\"newemail@domain.com\", \"FNAME\":\"Ellie\", \"LNAME\":\"Roger\"}**. Keep in mind transactional attributes can be updated the same way as normal attributes. Mobile Number in **SMS** field should be passed with proper country code. For example: **{\"SMS\":\"+91xxxxxxxxxx\"} or {\"SMS\":\"0091xxxxxxxxxx\"}** | [optional] +**emailBlacklisted** | **bool** | Set/unset this field to blacklist/allow the contact for emails (emailBlacklisted = true) | [optional] +**smsBlacklisted** | **bool** | Set/unset this field to blacklist/allow the contact for SMS (smsBlacklisted = true) | [optional] +**listIds** | **int[]** | Ids of the lists to add the contact to | [optional] +**unlinkListIds** | **int[]** | Ids of the lists to remove the contact from | [optional] +**smtpBlacklistSender** | **string[]** | transactional email forbidden sender for contact. Use only for email Contact | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/UpdateBatchContactsModel.md b/vendor/getbrevo/brevo-php/docs/Model/UpdateBatchContactsModel.md new file mode 100644 index 0000000..08c30c1 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/UpdateBatchContactsModel.md @@ -0,0 +1,11 @@ +# UpdateBatchContactsModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**successIds** | **int[]** | | [optional] +**failureIds** | **int[]** | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/UpdateCampaignStatus.md b/vendor/getbrevo/brevo-php/docs/Model/UpdateCampaignStatus.md new file mode 100644 index 0000000..a571f47 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/UpdateCampaignStatus.md @@ -0,0 +1,10 @@ +# UpdateCampaignStatus + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **string** | Note:- replicateTemplate status will be available only for template type campaigns. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/UpdateChild.md b/vendor/getbrevo/brevo-php/docs/Model/UpdateChild.md new file mode 100644 index 0000000..ef478b5 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/UpdateChild.md @@ -0,0 +1,14 @@ +# UpdateChild + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **string** | New Email address to update the child account | [optional] +**firstName** | **string** | New First name to use to update the child account | [optional] +**lastName** | **string** | New Last name to use to update the child account | [optional] +**companyName** | **string** | New Company name to use to update the child account | [optional] +**password** | **string** | New password for the child account to login | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/UpdateChildAccountStatus.md b/vendor/getbrevo/brevo-php/docs/Model/UpdateChildAccountStatus.md new file mode 100644 index 0000000..76b3156 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/UpdateChildAccountStatus.md @@ -0,0 +1,13 @@ +# UpdateChildAccountStatus + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**transactionalEmail** | **bool** | Status of Transactional Email Platform activation for your account (true=enabled, false=disabled) | [optional] +**transactionalSms** | **bool** | Status of Transactional SMS Platform activation for your account (true=enabled, false=disabled) | [optional] +**marketingAutomation** | **bool** | Status of Marketing Automation Platform activation for your account (true=enabled, false=disabled) | [optional] +**smsCampaign** | **bool** | Status of SMS Campaign Platform activation for your account (true=enabled, false=disabled) | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/UpdateChildDomain.md b/vendor/getbrevo/brevo-php/docs/Model/UpdateChildDomain.md new file mode 100644 index 0000000..a22b5d2 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/UpdateChildDomain.md @@ -0,0 +1,10 @@ +# UpdateChildDomain + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain** | **string** | Value for the sender domain that will replace the existing domain | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/UpdateContact.md b/vendor/getbrevo/brevo-php/docs/Model/UpdateContact.md new file mode 100644 index 0000000..6bdbe30 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/UpdateContact.md @@ -0,0 +1,16 @@ +# UpdateContact + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attributes** | **object** | Pass the set of attributes to be updated. These attributes must be present in your account. Values that don't match the attribute type (e.g. text or string in a date attribute) will be ignored.To update existing email address of a contact with the new one please pass EMAIL in attributes. For example, `{ \"EMAIL\":\"newemail@domain.com\", \"FNAME\":\"Ellie\", \"LNAME\":\"Roger\"}`. The attribute's parameter should be passed in capital letter while updating a contact. Keep in mind transactional attributes can be updated the same way as normal attributes. Mobile Number in \"SMS\" field should be passed with proper country code. For example {\"SMS\":\"+91xxxxxxxxxx\"} or {\"SMS\":\"0091xxxxxxxxxx\"} | [optional] +**extId** | **string** | Pass your own Id to update ext_id of a contact. | [optional] +**emailBlacklisted** | **bool** | Set/unset this field to blacklist/allow the contact for emails (emailBlacklisted = true) | [optional] +**smsBlacklisted** | **bool** | Set/unset this field to blacklist/allow the contact for SMS (smsBlacklisted = true) | [optional] +**listIds** | **int[]** | Ids of the lists to add the contact to | [optional] +**unlinkListIds** | **int[]** | Ids of the lists to remove the contact from | [optional] +**smtpBlacklistSender** | **string[]** | transactional email forbidden sender for contact. Use only for email Contact | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/UpdateCouponCollection.md b/vendor/getbrevo/brevo-php/docs/Model/UpdateCouponCollection.md new file mode 100644 index 0000000..9d99045 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/UpdateCouponCollection.md @@ -0,0 +1,10 @@ +# UpdateCouponCollection + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**defaultCoupon** | **string** | A default coupon to be used in case there are no coupons left | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/UpdateEmailCampaign.md b/vendor/getbrevo/brevo-php/docs/Model/UpdateEmailCampaign.md new file mode 100644 index 0000000..a7e49ea --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/UpdateEmailCampaign.md @@ -0,0 +1,40 @@ +# UpdateEmailCampaign + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tag** | **string** | Tag of the campaign | [optional] +**sender** | [**\Brevo\Client\Model\UpdateEmailCampaignSender**](UpdateEmailCampaignSender.md) | | [optional] +**name** | **string** | Name of the campaign | [optional] +**htmlContent** | **string** | Body of the message (HTML version). If the campaign is designed using Drag & Drop editor via HTML content, then the design page will not have Drag & Drop editor access for that campaign. REQUIRED if htmlUrl is empty | [optional] +**htmlUrl** | **string** | Url which contents the body of the email message. REQUIRED if htmlContent is empty | [optional] +**scheduledAt** | **string** | UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. If sendAtBestTime is set to true, your campaign will be sent according to the date passed (ignoring the time part). | [optional] +**subject** | **string** | Subject of the campaign | [optional] +**previewText** | **string** | Preview text or preheader of the email campaign | [optional] +**replyTo** | **string** | Email on which campaign recipients will be able to reply to | [optional] +**toField** | **string** | To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your Brevo account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization | [optional] +**recipients** | [**\Brevo\Client\Model\UpdateEmailCampaignRecipients**](UpdateEmailCampaignRecipients.md) | | [optional] +**attachmentUrl** | **string** | Absolute url of the attachment (no local file). 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] +**inlineImageActivation** | **bool** | Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. You cannot send a campaign of more than 4MB with images embedded in the email. Campaigns with the images embedded in the email must be sent to less than 5000 contacts. | [optional] [default to false] +**mirrorActive** | **bool** | 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** | **bool** | 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] [default to false] +**footer** | **string** | Footer of the email campaign | [optional] +**header** | **string** | Header of the email campaign | [optional] +**utmCampaign** | **string** | Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed | [optional] +**params** | **object** | Pass the set of attributes to customize the type 'classic' campaign. For example, `{\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}`. The 'params' field will get updated, only if the campaign is in New Template Language, else ignored. The New Template Language is dependent on the values of 'subject', 'htmlContent/htmlUrl', 'sender.name' & 'toField' | [optional] +**sendAtBestTime** | **bool** | Set this to true if you want to send your campaign at best time. Note:- if true, warmup ip will be disabled. | [optional] +**abTesting** | **bool** | Status of A/B Test. abTesting = false means it is disabled, & abTesting = true means it is enabled. 'subjectA', 'subjectB', 'splitRule', 'winnerCriteria' & 'winnerDelay' will be considered if abTesting is set to true. 'subject' if passed is ignored. Can be set to true only if 'sendAtBestTime' is 'false'. You will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B | [optional] [default to false] +**subjectA** | **string** | Subject A of the campaign. Considered if abTesting = true. subjectA & subjectB should have unique value | [optional] +**subjectB** | **string** | Subject B of the campaign. Considered if abTesting = true. subjectA & subjectB should have unique value | [optional] +**splitRule** | **int** | Add the size of your test groups. Considered if abTesting = true. We'll send version A and B to a random sample of recipients, and then the winning version to everyone else | [optional] +**winnerCriteria** | **string** | Choose the metrics that will determinate the winning version. Considered if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerCriteria' is ignored if passed or alreday exist in record | [optional] +**winnerDelay** | **int** | Choose the duration of the test in hours. Maximum is 7 days, pass 24*7 = 168 hours. The winning version will be sent at the end of the test. Considered if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerDelay' is ignored if passed or alreday exist in record | [optional] +**ipWarmupEnable** | **bool** | Available for dedicated ip clients. Set this to true if you wish to warm up your ip. | [optional] [default to false] +**initialQuota** | **int** | Set an initial quota greater than 1 for warming up your ip. We recommend you set a value of 3000. | [optional] +**increaseRate** | **int** | Set a percentage increase rate for warming up your ip. We recommend you set the increase rate to 30% per day. If you want to send the same number of emails every day, set the daily increase value to 0%. | [optional] +**unsubscriptionPageId** | **string** | Enter an unsubscription page id. The page id is a 24 digit alphanumeric id that can be found in the URL when editing the page. | [optional] +**updateFormId** | **string** | Mandatory if templateId is used containing the {{ update_profile }} tag. Enter an update profile form id. The form id is a 24 digit alphanumeric id that can be found in the URL when editing the form. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/UpdateEmailCampaignRecipients.md b/vendor/getbrevo/brevo-php/docs/Model/UpdateEmailCampaignRecipients.md new file mode 100644 index 0000000..6ed00b1 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/UpdateEmailCampaignRecipients.md @@ -0,0 +1,12 @@ +# UpdateEmailCampaignRecipients + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**exclusionListIds** | **int[]** | List ids which have to be excluded from a campaign | [optional] +**listIds** | **int[]** | Lists Ids to send the campaign to. Campaign should only be updated with listIds if listIds were used to create it. REQUIRED if already not present in campaign and scheduledAt is not empty | [optional] +**segmentIds** | **int[]** | Mandatory if listIds are not used. Campaign should only be updated with segmentIds if segmentIds were used to create it. Segment ids to send the campaign to. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/UpdateEmailCampaignSender.md b/vendor/getbrevo/brevo-php/docs/Model/UpdateEmailCampaignSender.md new file mode 100644 index 0000000..4ebcd4e --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/UpdateEmailCampaignSender.md @@ -0,0 +1,12 @@ +# UpdateEmailCampaignSender + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Sender Name from which the campaign emails are sent | [optional] +**email** | **string** | Sender email from which the campaign emails are sent | [optional] +**id** | **int** | Select the sender for the campaign on the basis of sender id. In order to select a sender with specific pool of IP’s, dedicated ip users shall pass id (instead of email). | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/UpdateExternalFeed.md b/vendor/getbrevo/brevo-php/docs/Model/UpdateExternalFeed.md new file mode 100644 index 0000000..c8ff876 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/UpdateExternalFeed.md @@ -0,0 +1,18 @@ +# UpdateExternalFeed + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Name of the feed | [optional] +**url** | **string** | URL of the feed | [optional] +**authType** | **string** | Auth type of the feed: * `basic` * `token` * `noAuth` | [optional] +**username** | **string** | Username for authType `basic` | [optional] +**password** | **string** | Password for authType `basic` | [optional] +**token** | **string** | Token for authType `token` | [optional] +**headers** | [**\Brevo\Client\Model\GetExternalFeedByUUIDHeaders[]**](GetExternalFeedByUUIDHeaders.md) | Custom headers for the feed | [optional] +**maxRetries** | **int** | Maximum number of retries on the feed url | [optional] +**cache** | **bool** | Toggle caching of feed url response | [optional] [default to false] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/UpdateList.md b/vendor/getbrevo/brevo-php/docs/Model/UpdateList.md new file mode 100644 index 0000000..de3f2c8 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/UpdateList.md @@ -0,0 +1,11 @@ +# UpdateList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Name of the list. Either of the two parameters (name, folderId) can be updated at a time. | [optional] +**folderId** | **int** | Id of the folder in which the list is to be moved. Either of the two parameters (name, folderId) can be updated at a time. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/UpdateSender.md b/vendor/getbrevo/brevo-php/docs/Model/UpdateSender.md new file mode 100644 index 0000000..8ce034b --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/UpdateSender.md @@ -0,0 +1,12 @@ +# UpdateSender + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | From Name to update the sender | [optional] +**email** | **string** | From Email to update the sender | [optional] +**ips** | [**\Brevo\Client\Model\CreateSenderIps[]**](CreateSenderIps.md) | Only in case of dedicated IP, IPs to associate to the sender. If passed, will replace all the existing IPs. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/UpdateSmsCampaign.md b/vendor/getbrevo/brevo-php/docs/Model/UpdateSmsCampaign.md new file mode 100644 index 0000000..7d97c27 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/UpdateSmsCampaign.md @@ -0,0 +1,17 @@ +# UpdateSmsCampaign + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Name of the campaign | [optional] +**sender** | **string** | Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters** | [optional] +**content** | **string** | Content of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS | [optional] +**recipients** | [**\Brevo\Client\Model\CreateSmsCampaignRecipients**](CreateSmsCampaignRecipients.md) | | [optional] +**scheduledAt** | **string** | UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. | [optional] +**unicodeEnabled** | **bool** | Format of the message. It indicates whether the content should be treated as unicode or not. | [optional] [default to false] +**organisationPrefix** | **string** | A recognizable prefix will ensure your audience knows who you are. Recommended by U.S. carriers. This will be added as your Brand Name before the message content. **Prefer verifying maximum length of 160 characters including this prefix in message content to avoid multiple sending of same sms.** | [optional] +**unsubscribeInstruction** | **string** | Instructions to unsubscribe from future communications. Recommended by U.S. carriers. Must include **STOP** keyword. This will be added as instructions after the end of message content. **Prefer verifying maximum length of 160 characters including this instructions in message content to avoid multiple sending of same sms.** | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/UpdateSmtpTemplate.md b/vendor/getbrevo/brevo-php/docs/Model/UpdateSmtpTemplate.md new file mode 100644 index 0000000..a605151 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/UpdateSmtpTemplate.md @@ -0,0 +1,19 @@ +# UpdateSmtpTemplate + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tag** | **string** | Tag of the template | [optional] +**sender** | [**\Brevo\Client\Model\UpdateSmtpTemplateSender**](UpdateSmtpTemplateSender.md) | | [optional] +**templateName** | **string** | Name of the template | [optional] +**htmlContent** | **string** | Required if htmlUrl is empty. If the template is designed using Drag & Drop editor via HTML content, then the design page will not have Drag & Drop editor access for that template. Body of the message (HTML must have more than 10 characters) | [optional] +**htmlUrl** | **string** | Required if htmlContent is empty. URL to the body of the email (HTML) | [optional] +**subject** | **string** | Subject of the email | [optional] +**replyTo** | **string** | Email on which campaign recipients will be able to reply to | [optional] +**toField** | **string** | To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your Brevo account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization | [optional] +**attachmentUrl** | **string** | Absolute url of the attachment (no local file). 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] +**isActive** | **bool** | Status of the template. isActive = false means template is inactive, isActive = true means template is active | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/UpdateSmtpTemplateSender.md b/vendor/getbrevo/brevo-php/docs/Model/UpdateSmtpTemplateSender.md new file mode 100644 index 0000000..267f6f7 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/UpdateSmtpTemplateSender.md @@ -0,0 +1,12 @@ +# UpdateSmtpTemplateSender + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Name of the sender | [optional] +**email** | **string** | Email of the sender | [optional] +**id** | **int** | Select the sender for the template on the basis of sender id. In order to select a sender with specific pool of IP’s, dedicated ip users shall pass id (instead of email). | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/UpdateWebhook.md b/vendor/getbrevo/brevo-php/docs/Model/UpdateWebhook.md new file mode 100644 index 0000000..ed4ccf6 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/UpdateWebhook.md @@ -0,0 +1,16 @@ +# UpdateWebhook + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **string** | URL of the webhook | [optional] +**description** | **string** | Description of the webhook | [optional] +**events** | **string[]** | - Events triggering the webhook. Possible values for **Transactional** type webhook: #### `sent` OR `request`, `delivered`, `hardBounce`, `softBounce`, `blocked`, `spam`, `invalid`, `deferred`, `click`, `opened`, `uniqueOpened` and `unsubscribed` - Possible values for **Marketing** type webhook: #### `spam`, `opened`, `click`, `hardBounce`, `softBounce`, `unsubscribed`, `listAddition` & `delivered` - Possible values for **Inbound** type webhook: #### `inboundEmailProcessed` | [optional] +**domain** | **string** | Inbound domain of webhook, used in case of event type `inbound` | [optional] +**batched** | **bool** | To send batched webhooks | [optional] +**auth** | [**\Brevo\Client\Model\GetWebhookAuth**](GetWebhookAuth.md) | | [optional] +**headers** | [**\Brevo\Client\Model\GetWebhookHeaders[]**](GetWebhookHeaders.md) | Custom headers to be send with webhooks | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/UpdateWhatsAppCampaign.md b/vendor/getbrevo/brevo-php/docs/Model/UpdateWhatsAppCampaign.md new file mode 100644 index 0000000..3685191 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/UpdateWhatsAppCampaign.md @@ -0,0 +1,13 @@ +# UpdateWhatsAppCampaign + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**campaignName** | **string** | Name of the campaign | [optional] +**campaignStatus** | **string** | Status of the campaign | [optional] [default to 'scheduled'] +**rescheduleFor** | **string** | Reschedule the sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of campaign. **Prefer to pass your timezone in date-time format for accurate result.For example: **2017-06-01T12:30:00+02:00** Use this field to update the scheduledAt of any existing draft or scheduled WhatsApp campaign. | [optional] +**recipients** | [**\Brevo\Client\Model\CreateWhatsAppCampaignRecipients**](CreateWhatsAppCampaignRecipients.md) | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/UploadImageModel.md b/vendor/getbrevo/brevo-php/docs/Model/UploadImageModel.md new file mode 100644 index 0000000..4973300 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/UploadImageModel.md @@ -0,0 +1,10 @@ +# UploadImageModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **string** | URL of the image uploaded | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/UploadImageToGallery.md b/vendor/getbrevo/brevo-php/docs/Model/UploadImageToGallery.md new file mode 100644 index 0000000..50b5f2a --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/UploadImageToGallery.md @@ -0,0 +1,11 @@ +# UploadImageToGallery + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**imageUrl** | **string** | The absolute url of the image (no local file). Maximum allowed size for image is 2MB. Allowed extensions for images are - jpeg, jpg, png, bmp, gif. | +**name** | **string** | Name of the image. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/VariablesItems.md b/vendor/getbrevo/brevo-php/docs/Model/VariablesItems.md new file mode 100644 index 0000000..1eca6db --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/VariablesItems.md @@ -0,0 +1,12 @@ +# VariablesItems + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | | [optional] +**default** | **string** | | [optional] +**datatype** | **string** | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/WhatsappCampStats.md b/vendor/getbrevo/brevo-php/docs/Model/WhatsappCampStats.md new file mode 100644 index 0000000..b764ed2 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/WhatsappCampStats.md @@ -0,0 +1,14 @@ +# WhatsappCampStats + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sent** | **int** | | +**delivered** | **int** | | +**read** | **int** | | +**unsubscribe** | **int** | | +**notSent** | **int** | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/docs/Model/WhatsappCampTemplate.md b/vendor/getbrevo/brevo-php/docs/Model/WhatsappCampTemplate.md new file mode 100644 index 0000000..3e929a1 --- /dev/null +++ b/vendor/getbrevo/brevo-php/docs/Model/WhatsappCampTemplate.md @@ -0,0 +1,20 @@ +# WhatsappCampTemplate + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | name of the template | [optional] +**category** | **string** | description of the template | [optional] +**language** | **string** | language of the template | [optional] +**containsButton** | **bool** | | [optional] +**displayHeader** | **bool** | | [optional] +**headerType** | **string** | type of header | [optional] +**components** | [**\Brevo\Client\Model\ComponentItems[]**](ComponentItems.md) | array of component item objects | [optional] +**headerVariables** | [**\Brevo\Client\Model\VariablesItems[]**](VariablesItems.md) | array of variables item object | [optional] +**bodyVariables** | [**\Brevo\Client\Model\VariablesItems[]**](VariablesItems.md) | array of variables item variables | [optional] +**buttonType** | **string** | | [optional] +**hideFooter** | **bool** | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/vendor/getbrevo/brevo-php/lib/Api/AccountApi.php b/vendor/getbrevo/brevo-php/lib/Api/AccountApi.php new file mode 100644 index 0000000..920e3fe --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Api/AccountApi.php @@ -0,0 +1,679 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation getAccount + * + * Get your account information, plan and credits details + * + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetAccount + */ + public function getAccount() + { + list($response) = $this->getAccountWithHttpInfo(); + return $response; + } + + /** + * Operation getAccountWithHttpInfo + * + * Get your account information, plan and credits details + * + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetAccount, HTTP status code, HTTP response headers (array of strings) + */ + public function getAccountWithHttpInfo() + { + $returnType = '\Brevo\Client\Model\GetAccount'; + $request = $this->getAccountRequest(); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetAccount', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getAccountAsync + * + * Get your account information, plan and credits details + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getAccountAsync() + { + return $this->getAccountAsyncWithHttpInfo() + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getAccountAsyncWithHttpInfo + * + * Get your account information, plan and credits details + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getAccountAsyncWithHttpInfo() + { + $returnType = '\Brevo\Client\Model\GetAccount'; + $request = $this->getAccountRequest(); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getAccount' + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getAccountRequest() + { + + $resourcePath = '/account'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getAccountActivity + * + * Get user activity logs + * + * @param string $startDate Mandatory if endDate is used. Enter start date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. Additionally, you can retrieve activity logs from the past 12 months from the date of your search. (optional) + * @param string $endDate Mandatory if startDate is used. Enter end date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. (optional) + * @param int $limit Number of documents per page (optional, default to 10) + * @param int $offset Index of the first document in the page. (optional, default to 0) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetAccountActivity + */ + public function getAccountActivity($startDate = null, $endDate = null, $limit = '10', $offset = '0') + { + list($response) = $this->getAccountActivityWithHttpInfo($startDate, $endDate, $limit, $offset); + return $response; + } + + /** + * Operation getAccountActivityWithHttpInfo + * + * Get user activity logs + * + * @param string $startDate Mandatory if endDate is used. Enter start date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. Additionally, you can retrieve activity logs from the past 12 months from the date of your search. (optional) + * @param string $endDate Mandatory if startDate is used. Enter end date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. (optional) + * @param int $limit Number of documents per page (optional, default to 10) + * @param int $offset Index of the first document in the page. (optional, default to 0) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetAccountActivity, HTTP status code, HTTP response headers (array of strings) + */ + public function getAccountActivityWithHttpInfo($startDate = null, $endDate = null, $limit = '10', $offset = '0') + { + $returnType = '\Brevo\Client\Model\GetAccountActivity'; + $request = $this->getAccountActivityRequest($startDate, $endDate, $limit, $offset); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetAccountActivity', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getAccountActivityAsync + * + * Get user activity logs + * + * @param string $startDate Mandatory if endDate is used. Enter start date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. Additionally, you can retrieve activity logs from the past 12 months from the date of your search. (optional) + * @param string $endDate Mandatory if startDate is used. Enter end date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. (optional) + * @param int $limit Number of documents per page (optional, default to 10) + * @param int $offset Index of the first document in the page. (optional, default to 0) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getAccountActivityAsync($startDate = null, $endDate = null, $limit = '10', $offset = '0') + { + return $this->getAccountActivityAsyncWithHttpInfo($startDate, $endDate, $limit, $offset) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getAccountActivityAsyncWithHttpInfo + * + * Get user activity logs + * + * @param string $startDate Mandatory if endDate is used. Enter start date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. Additionally, you can retrieve activity logs from the past 12 months from the date of your search. (optional) + * @param string $endDate Mandatory if startDate is used. Enter end date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. (optional) + * @param int $limit Number of documents per page (optional, default to 10) + * @param int $offset Index of the first document in the page. (optional, default to 0) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getAccountActivityAsyncWithHttpInfo($startDate = null, $endDate = null, $limit = '10', $offset = '0') + { + $returnType = '\Brevo\Client\Model\GetAccountActivity'; + $request = $this->getAccountActivityRequest($startDate, $endDate, $limit, $offset); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getAccountActivity' + * + * @param string $startDate Mandatory if endDate is used. Enter start date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. Additionally, you can retrieve activity logs from the past 12 months from the date of your search. (optional) + * @param string $endDate Mandatory if startDate is used. Enter end date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. (optional) + * @param int $limit Number of documents per page (optional, default to 10) + * @param int $offset Index of the first document in the page. (optional, default to 0) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getAccountActivityRequest($startDate = null, $endDate = null, $limit = '10', $offset = '0') + { + if ($limit !== null && $limit > 100) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling AccountApi.getAccountActivity, must be smaller than or equal to 100.'); + } + if ($limit !== null && $limit < 1) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling AccountApi.getAccountActivity, must be bigger than or equal to 1.'); + } + + + $resourcePath = '/organization/activities'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($startDate !== null) { + $queryParams['startDate'] = ObjectSerializer::toQueryValue($startDate); + } + // query params + if ($endDate !== null) { + $queryParams['endDate'] = ObjectSerializer::toQueryValue($endDate); + } + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/vendor/getbrevo/brevo-php/lib/Api/AttributesApi.php b/vendor/getbrevo/brevo-php/lib/Api/AttributesApi.php new file mode 100644 index 0000000..add93cd --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Api/AttributesApi.php @@ -0,0 +1,1219 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation createAttribute + * + * Create contact attribute + * + * @param string $attributeCategory Category of the attribute (required) + * @param string $attributeName Name of the attribute (required) + * @param \Brevo\Client\Model\CreateAttribute $createAttribute Values to create an attribute (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function createAttribute($attributeCategory, $attributeName, $createAttribute) + { + $this->createAttributeWithHttpInfo($attributeCategory, $attributeName, $createAttribute); + } + + /** + * Operation createAttributeWithHttpInfo + * + * Create contact attribute + * + * @param string $attributeCategory Category of the attribute (required) + * @param string $attributeName Name of the attribute (required) + * @param \Brevo\Client\Model\CreateAttribute $createAttribute Values to create an attribute (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function createAttributeWithHttpInfo($attributeCategory, $attributeName, $createAttribute) + { + $returnType = ''; + $request = $this->createAttributeRequest($attributeCategory, $attributeName, $createAttribute); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation createAttributeAsync + * + * Create contact attribute + * + * @param string $attributeCategory Category of the attribute (required) + * @param string $attributeName Name of the attribute (required) + * @param \Brevo\Client\Model\CreateAttribute $createAttribute Values to create an attribute (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createAttributeAsync($attributeCategory, $attributeName, $createAttribute) + { + return $this->createAttributeAsyncWithHttpInfo($attributeCategory, $attributeName, $createAttribute) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createAttributeAsyncWithHttpInfo + * + * Create contact attribute + * + * @param string $attributeCategory Category of the attribute (required) + * @param string $attributeName Name of the attribute (required) + * @param \Brevo\Client\Model\CreateAttribute $createAttribute Values to create an attribute (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createAttributeAsyncWithHttpInfo($attributeCategory, $attributeName, $createAttribute) + { + $returnType = ''; + $request = $this->createAttributeRequest($attributeCategory, $attributeName, $createAttribute); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createAttribute' + * + * @param string $attributeCategory Category of the attribute (required) + * @param string $attributeName Name of the attribute (required) + * @param \Brevo\Client\Model\CreateAttribute $createAttribute Values to create an attribute (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function createAttributeRequest($attributeCategory, $attributeName, $createAttribute) + { + // verify the required parameter 'attributeCategory' is set + if ($attributeCategory === null || (is_array($attributeCategory) && count($attributeCategory) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $attributeCategory when calling createAttribute' + ); + } + // verify the required parameter 'attributeName' is set + if ($attributeName === null || (is_array($attributeName) && count($attributeName) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $attributeName when calling createAttribute' + ); + } + // verify the required parameter 'createAttribute' is set + if ($createAttribute === null || (is_array($createAttribute) && count($createAttribute) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $createAttribute when calling createAttribute' + ); + } + + $resourcePath = '/contacts/attributes/{attributeCategory}/{attributeName}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($attributeCategory !== null) { + $resourcePath = str_replace( + '{' . 'attributeCategory' . '}', + ObjectSerializer::toPathValue($attributeCategory), + $resourcePath + ); + } + // path params + if ($attributeName !== null) { + $resourcePath = str_replace( + '{' . 'attributeName' . '}', + ObjectSerializer::toPathValue($attributeName), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($createAttribute)) { + $_tempBody = $createAttribute; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation deleteAttribute + * + * Delete an attribute + * + * @param string $attributeCategory Category of the attribute (required) + * @param string $attributeName Name of the existing attribute (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function deleteAttribute($attributeCategory, $attributeName) + { + $this->deleteAttributeWithHttpInfo($attributeCategory, $attributeName); + } + + /** + * Operation deleteAttributeWithHttpInfo + * + * Delete an attribute + * + * @param string $attributeCategory Category of the attribute (required) + * @param string $attributeName Name of the existing attribute (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteAttributeWithHttpInfo($attributeCategory, $attributeName) + { + $returnType = ''; + $request = $this->deleteAttributeRequest($attributeCategory, $attributeName); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation deleteAttributeAsync + * + * Delete an attribute + * + * @param string $attributeCategory Category of the attribute (required) + * @param string $attributeName Name of the existing attribute (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteAttributeAsync($attributeCategory, $attributeName) + { + return $this->deleteAttributeAsyncWithHttpInfo($attributeCategory, $attributeName) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteAttributeAsyncWithHttpInfo + * + * Delete an attribute + * + * @param string $attributeCategory Category of the attribute (required) + * @param string $attributeName Name of the existing attribute (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteAttributeAsyncWithHttpInfo($attributeCategory, $attributeName) + { + $returnType = ''; + $request = $this->deleteAttributeRequest($attributeCategory, $attributeName); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'deleteAttribute' + * + * @param string $attributeCategory Category of the attribute (required) + * @param string $attributeName Name of the existing attribute (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function deleteAttributeRequest($attributeCategory, $attributeName) + { + // verify the required parameter 'attributeCategory' is set + if ($attributeCategory === null || (is_array($attributeCategory) && count($attributeCategory) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $attributeCategory when calling deleteAttribute' + ); + } + // verify the required parameter 'attributeName' is set + if ($attributeName === null || (is_array($attributeName) && count($attributeName) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $attributeName when calling deleteAttribute' + ); + } + + $resourcePath = '/contacts/attributes/{attributeCategory}/{attributeName}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($attributeCategory !== null) { + $resourcePath = str_replace( + '{' . 'attributeCategory' . '}', + ObjectSerializer::toPathValue($attributeCategory), + $resourcePath + ); + } + // path params + if ($attributeName !== null) { + $resourcePath = str_replace( + '{' . 'attributeName' . '}', + ObjectSerializer::toPathValue($attributeName), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getAttributes + * + * List all attributes + * + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetAttributes + */ + public function getAttributes() + { + list($response) = $this->getAttributesWithHttpInfo(); + return $response; + } + + /** + * Operation getAttributesWithHttpInfo + * + * List all attributes + * + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetAttributes, HTTP status code, HTTP response headers (array of strings) + */ + public function getAttributesWithHttpInfo() + { + $returnType = '\Brevo\Client\Model\GetAttributes'; + $request = $this->getAttributesRequest(); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetAttributes', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getAttributesAsync + * + * List all attributes + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getAttributesAsync() + { + return $this->getAttributesAsyncWithHttpInfo() + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getAttributesAsyncWithHttpInfo + * + * List all attributes + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getAttributesAsyncWithHttpInfo() + { + $returnType = '\Brevo\Client\Model\GetAttributes'; + $request = $this->getAttributesRequest(); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getAttributes' + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getAttributesRequest() + { + + $resourcePath = '/contacts/attributes'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation updateAttribute + * + * Update contact attribute + * + * @param string $attributeCategory Category of the attribute (required) + * @param string $attributeName Name of the existing attribute (required) + * @param \Brevo\Client\Model\UpdateAttribute $updateAttribute Values to update an attribute (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function updateAttribute($attributeCategory, $attributeName, $updateAttribute) + { + $this->updateAttributeWithHttpInfo($attributeCategory, $attributeName, $updateAttribute); + } + + /** + * Operation updateAttributeWithHttpInfo + * + * Update contact attribute + * + * @param string $attributeCategory Category of the attribute (required) + * @param string $attributeName Name of the existing attribute (required) + * @param \Brevo\Client\Model\UpdateAttribute $updateAttribute Values to update an attribute (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function updateAttributeWithHttpInfo($attributeCategory, $attributeName, $updateAttribute) + { + $returnType = ''; + $request = $this->updateAttributeRequest($attributeCategory, $attributeName, $updateAttribute); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation updateAttributeAsync + * + * Update contact attribute + * + * @param string $attributeCategory Category of the attribute (required) + * @param string $attributeName Name of the existing attribute (required) + * @param \Brevo\Client\Model\UpdateAttribute $updateAttribute Values to update an attribute (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateAttributeAsync($attributeCategory, $attributeName, $updateAttribute) + { + return $this->updateAttributeAsyncWithHttpInfo($attributeCategory, $attributeName, $updateAttribute) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateAttributeAsyncWithHttpInfo + * + * Update contact attribute + * + * @param string $attributeCategory Category of the attribute (required) + * @param string $attributeName Name of the existing attribute (required) + * @param \Brevo\Client\Model\UpdateAttribute $updateAttribute Values to update an attribute (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateAttributeAsyncWithHttpInfo($attributeCategory, $attributeName, $updateAttribute) + { + $returnType = ''; + $request = $this->updateAttributeRequest($attributeCategory, $attributeName, $updateAttribute); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'updateAttribute' + * + * @param string $attributeCategory Category of the attribute (required) + * @param string $attributeName Name of the existing attribute (required) + * @param \Brevo\Client\Model\UpdateAttribute $updateAttribute Values to update an attribute (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function updateAttributeRequest($attributeCategory, $attributeName, $updateAttribute) + { + // verify the required parameter 'attributeCategory' is set + if ($attributeCategory === null || (is_array($attributeCategory) && count($attributeCategory) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $attributeCategory when calling updateAttribute' + ); + } + // verify the required parameter 'attributeName' is set + if ($attributeName === null || (is_array($attributeName) && count($attributeName) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $attributeName when calling updateAttribute' + ); + } + // verify the required parameter 'updateAttribute' is set + if ($updateAttribute === null || (is_array($updateAttribute) && count($updateAttribute) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $updateAttribute when calling updateAttribute' + ); + } + + $resourcePath = '/contacts/attributes/{attributeCategory}/{attributeName}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($attributeCategory !== null) { + $resourcePath = str_replace( + '{' . 'attributeCategory' . '}', + ObjectSerializer::toPathValue($attributeCategory), + $resourcePath + ); + } + // path params + if ($attributeName !== null) { + $resourcePath = str_replace( + '{' . 'attributeName' . '}', + ObjectSerializer::toPathValue($attributeName), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($updateAttribute)) { + $_tempBody = $updateAttribute; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/vendor/getbrevo/brevo-php/lib/Api/CRMApi.php b/vendor/getbrevo/brevo-php/lib/Api/CRMApi.php new file mode 100644 index 0000000..dd67b49 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Api/CRMApi.php @@ -0,0 +1,3306 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation crmNotesGet + * + * Get all notes + * + * @param string $entity Filter by note entity type (optional) + * @param string $entityIds Filter by note entity IDs (optional) + * @param int $dateFrom dateFrom to date range filter type (timestamp in milliseconds) (optional) + * @param int $dateTo dateTo to date range filter type (timestamp in milliseconds) (optional) + * @param int $offset Index of the first document of the page (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\NoteList + */ + public function crmNotesGet($entity = null, $entityIds = null, $dateFrom = null, $dateTo = null, $offset = null, $limit = '50', $sort = null) + { + list($response) = $this->crmNotesGetWithHttpInfo($entity, $entityIds, $dateFrom, $dateTo, $offset, $limit, $sort); + return $response; + } + + /** + * Operation crmNotesGetWithHttpInfo + * + * Get all notes + * + * @param string $entity Filter by note entity type (optional) + * @param string $entityIds Filter by note entity IDs (optional) + * @param int $dateFrom dateFrom to date range filter type (timestamp in milliseconds) (optional) + * @param int $dateTo dateTo to date range filter type (timestamp in milliseconds) (optional) + * @param int $offset Index of the first document of the page (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\NoteList, HTTP status code, HTTP response headers (array of strings) + */ + public function crmNotesGetWithHttpInfo($entity = null, $entityIds = null, $dateFrom = null, $dateTo = null, $offset = null, $limit = '50', $sort = null) + { + $returnType = '\Brevo\Client\Model\NoteList'; + $request = $this->crmNotesGetRequest($entity, $entityIds, $dateFrom, $dateTo, $offset, $limit, $sort); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\NoteList', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation crmNotesGetAsync + * + * Get all notes + * + * @param string $entity Filter by note entity type (optional) + * @param string $entityIds Filter by note entity IDs (optional) + * @param int $dateFrom dateFrom to date range filter type (timestamp in milliseconds) (optional) + * @param int $dateTo dateTo to date range filter type (timestamp in milliseconds) (optional) + * @param int $offset Index of the first document of the page (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmNotesGetAsync($entity = null, $entityIds = null, $dateFrom = null, $dateTo = null, $offset = null, $limit = '50', $sort = null) + { + return $this->crmNotesGetAsyncWithHttpInfo($entity, $entityIds, $dateFrom, $dateTo, $offset, $limit, $sort) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation crmNotesGetAsyncWithHttpInfo + * + * Get all notes + * + * @param string $entity Filter by note entity type (optional) + * @param string $entityIds Filter by note entity IDs (optional) + * @param int $dateFrom dateFrom to date range filter type (timestamp in milliseconds) (optional) + * @param int $dateTo dateTo to date range filter type (timestamp in milliseconds) (optional) + * @param int $offset Index of the first document of the page (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmNotesGetAsyncWithHttpInfo($entity = null, $entityIds = null, $dateFrom = null, $dateTo = null, $offset = null, $limit = '50', $sort = null) + { + $returnType = '\Brevo\Client\Model\NoteList'; + $request = $this->crmNotesGetRequest($entity, $entityIds, $dateFrom, $dateTo, $offset, $limit, $sort); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'crmNotesGet' + * + * @param string $entity Filter by note entity type (optional) + * @param string $entityIds Filter by note entity IDs (optional) + * @param int $dateFrom dateFrom to date range filter type (timestamp in milliseconds) (optional) + * @param int $dateTo dateTo to date range filter type (timestamp in milliseconds) (optional) + * @param int $offset Index of the first document of the page (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function crmNotesGetRequest($entity = null, $entityIds = null, $dateFrom = null, $dateTo = null, $offset = null, $limit = '50', $sort = null) + { + + $resourcePath = '/crm/notes'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($entity !== null) { + $queryParams['entity'] = ObjectSerializer::toQueryValue($entity); + } + // query params + if ($entityIds !== null) { + $queryParams['entityIds'] = ObjectSerializer::toQueryValue($entityIds); + } + // query params + if ($dateFrom !== null) { + $queryParams['dateFrom'] = ObjectSerializer::toQueryValue($dateFrom); + } + // query params + if ($dateTo !== null) { + $queryParams['dateTo'] = ObjectSerializer::toQueryValue($dateTo); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation crmNotesIdDelete + * + * Delete a note + * + * @param string $id Note ID to delete (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function crmNotesIdDelete($id) + { + $this->crmNotesIdDeleteWithHttpInfo($id); + } + + /** + * Operation crmNotesIdDeleteWithHttpInfo + * + * Delete a note + * + * @param string $id Note ID to delete (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function crmNotesIdDeleteWithHttpInfo($id) + { + $returnType = ''; + $request = $this->crmNotesIdDeleteRequest($id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation crmNotesIdDeleteAsync + * + * Delete a note + * + * @param string $id Note ID to delete (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmNotesIdDeleteAsync($id) + { + return $this->crmNotesIdDeleteAsyncWithHttpInfo($id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation crmNotesIdDeleteAsyncWithHttpInfo + * + * Delete a note + * + * @param string $id Note ID to delete (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmNotesIdDeleteAsyncWithHttpInfo($id) + { + $returnType = ''; + $request = $this->crmNotesIdDeleteRequest($id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'crmNotesIdDelete' + * + * @param string $id Note ID to delete (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function crmNotesIdDeleteRequest($id) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling crmNotesIdDelete' + ); + } + + $resourcePath = '/crm/notes/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation crmNotesIdGet + * + * Get a note + * + * @param string $id Note ID to get (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\Note + */ + public function crmNotesIdGet($id) + { + list($response) = $this->crmNotesIdGetWithHttpInfo($id); + return $response; + } + + /** + * Operation crmNotesIdGetWithHttpInfo + * + * Get a note + * + * @param string $id Note ID to get (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\Note, HTTP status code, HTTP response headers (array of strings) + */ + public function crmNotesIdGetWithHttpInfo($id) + { + $returnType = '\Brevo\Client\Model\Note'; + $request = $this->crmNotesIdGetRequest($id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\Note', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation crmNotesIdGetAsync + * + * Get a note + * + * @param string $id Note ID to get (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmNotesIdGetAsync($id) + { + return $this->crmNotesIdGetAsyncWithHttpInfo($id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation crmNotesIdGetAsyncWithHttpInfo + * + * Get a note + * + * @param string $id Note ID to get (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmNotesIdGetAsyncWithHttpInfo($id) + { + $returnType = '\Brevo\Client\Model\Note'; + $request = $this->crmNotesIdGetRequest($id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'crmNotesIdGet' + * + * @param string $id Note ID to get (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function crmNotesIdGetRequest($id) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling crmNotesIdGet' + ); + } + + $resourcePath = '/crm/notes/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation crmNotesIdPatch + * + * Update a note + * + * @param string $id Note ID to update (required) + * @param \Brevo\Client\Model\NoteData $body Note data to update a note (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function crmNotesIdPatch($id, $body) + { + $this->crmNotesIdPatchWithHttpInfo($id, $body); + } + + /** + * Operation crmNotesIdPatchWithHttpInfo + * + * Update a note + * + * @param string $id Note ID to update (required) + * @param \Brevo\Client\Model\NoteData $body Note data to update a note (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function crmNotesIdPatchWithHttpInfo($id, $body) + { + $returnType = ''; + $request = $this->crmNotesIdPatchRequest($id, $body); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation crmNotesIdPatchAsync + * + * Update a note + * + * @param string $id Note ID to update (required) + * @param \Brevo\Client\Model\NoteData $body Note data to update a note (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmNotesIdPatchAsync($id, $body) + { + return $this->crmNotesIdPatchAsyncWithHttpInfo($id, $body) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation crmNotesIdPatchAsyncWithHttpInfo + * + * Update a note + * + * @param string $id Note ID to update (required) + * @param \Brevo\Client\Model\NoteData $body Note data to update a note (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmNotesIdPatchAsyncWithHttpInfo($id, $body) + { + $returnType = ''; + $request = $this->crmNotesIdPatchRequest($id, $body); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'crmNotesIdPatch' + * + * @param string $id Note ID to update (required) + * @param \Brevo\Client\Model\NoteData $body Note data to update a note (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function crmNotesIdPatchRequest($id, $body) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling crmNotesIdPatch' + ); + } + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $body when calling crmNotesIdPatch' + ); + } + + $resourcePath = '/crm/notes/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PATCH', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation crmNotesPost + * + * Create a note + * + * @param \Brevo\Client\Model\NoteData $body Note data to create a note. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\NoteId + */ + public function crmNotesPost($body) + { + list($response) = $this->crmNotesPostWithHttpInfo($body); + return $response; + } + + /** + * Operation crmNotesPostWithHttpInfo + * + * Create a note + * + * @param \Brevo\Client\Model\NoteData $body Note data to create a note. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\NoteId, HTTP status code, HTTP response headers (array of strings) + */ + public function crmNotesPostWithHttpInfo($body) + { + $returnType = '\Brevo\Client\Model\NoteId'; + $request = $this->crmNotesPostRequest($body); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\NoteId', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation crmNotesPostAsync + * + * Create a note + * + * @param \Brevo\Client\Model\NoteData $body Note data to create a note. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmNotesPostAsync($body) + { + return $this->crmNotesPostAsyncWithHttpInfo($body) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation crmNotesPostAsyncWithHttpInfo + * + * Create a note + * + * @param \Brevo\Client\Model\NoteData $body Note data to create a note. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmNotesPostAsyncWithHttpInfo($body) + { + $returnType = '\Brevo\Client\Model\NoteId'; + $request = $this->crmNotesPostRequest($body); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'crmNotesPost' + * + * @param \Brevo\Client\Model\NoteData $body Note data to create a note. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function crmNotesPostRequest($body) + { + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $body when calling crmNotesPost' + ); + } + + $resourcePath = '/crm/notes'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation crmTasksGet + * + * Get all tasks + * + * @param string $filterType Filter by task type (ID) (optional) + * @param string $filterStatus Filter by task status (optional) + * @param string $filterDate Filter by date (optional) + * @param string $filterAssignTo Filter by assignTo id (optional) + * @param string $filterContacts Filter by contact ids (optional) + * @param string $filterDeals Filter by deals ids (optional) + * @param string $filterCompanies Filter by companies ids (optional) + * @param int $dateFrom dateFrom to date range filter type (timestamp in milliseconds) (optional) + * @param int $dateTo dateTo to date range filter type (timestamp in milliseconds) (optional) + * @param int $offset Index of the first document of the page (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) + * @param string $sortBy The field used to sort field names. (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\TaskList + */ + public function crmTasksGet($filterType = null, $filterStatus = null, $filterDate = null, $filterAssignTo = null, $filterContacts = null, $filterDeals = null, $filterCompanies = null, $dateFrom = null, $dateTo = null, $offset = null, $limit = '50', $sort = null, $sortBy = null) + { + list($response) = $this->crmTasksGetWithHttpInfo($filterType, $filterStatus, $filterDate, $filterAssignTo, $filterContacts, $filterDeals, $filterCompanies, $dateFrom, $dateTo, $offset, $limit, $sort, $sortBy); + return $response; + } + + /** + * Operation crmTasksGetWithHttpInfo + * + * Get all tasks + * + * @param string $filterType Filter by task type (ID) (optional) + * @param string $filterStatus Filter by task status (optional) + * @param string $filterDate Filter by date (optional) + * @param string $filterAssignTo Filter by assignTo id (optional) + * @param string $filterContacts Filter by contact ids (optional) + * @param string $filterDeals Filter by deals ids (optional) + * @param string $filterCompanies Filter by companies ids (optional) + * @param int $dateFrom dateFrom to date range filter type (timestamp in milliseconds) (optional) + * @param int $dateTo dateTo to date range filter type (timestamp in milliseconds) (optional) + * @param int $offset Index of the first document of the page (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) + * @param string $sortBy The field used to sort field names. (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\TaskList, HTTP status code, HTTP response headers (array of strings) + */ + public function crmTasksGetWithHttpInfo($filterType = null, $filterStatus = null, $filterDate = null, $filterAssignTo = null, $filterContacts = null, $filterDeals = null, $filterCompanies = null, $dateFrom = null, $dateTo = null, $offset = null, $limit = '50', $sort = null, $sortBy = null) + { + $returnType = '\Brevo\Client\Model\TaskList'; + $request = $this->crmTasksGetRequest($filterType, $filterStatus, $filterDate, $filterAssignTo, $filterContacts, $filterDeals, $filterCompanies, $dateFrom, $dateTo, $offset, $limit, $sort, $sortBy); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\TaskList', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation crmTasksGetAsync + * + * Get all tasks + * + * @param string $filterType Filter by task type (ID) (optional) + * @param string $filterStatus Filter by task status (optional) + * @param string $filterDate Filter by date (optional) + * @param string $filterAssignTo Filter by assignTo id (optional) + * @param string $filterContacts Filter by contact ids (optional) + * @param string $filterDeals Filter by deals ids (optional) + * @param string $filterCompanies Filter by companies ids (optional) + * @param int $dateFrom dateFrom to date range filter type (timestamp in milliseconds) (optional) + * @param int $dateTo dateTo to date range filter type (timestamp in milliseconds) (optional) + * @param int $offset Index of the first document of the page (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) + * @param string $sortBy The field used to sort field names. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmTasksGetAsync($filterType = null, $filterStatus = null, $filterDate = null, $filterAssignTo = null, $filterContacts = null, $filterDeals = null, $filterCompanies = null, $dateFrom = null, $dateTo = null, $offset = null, $limit = '50', $sort = null, $sortBy = null) + { + return $this->crmTasksGetAsyncWithHttpInfo($filterType, $filterStatus, $filterDate, $filterAssignTo, $filterContacts, $filterDeals, $filterCompanies, $dateFrom, $dateTo, $offset, $limit, $sort, $sortBy) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation crmTasksGetAsyncWithHttpInfo + * + * Get all tasks + * + * @param string $filterType Filter by task type (ID) (optional) + * @param string $filterStatus Filter by task status (optional) + * @param string $filterDate Filter by date (optional) + * @param string $filterAssignTo Filter by assignTo id (optional) + * @param string $filterContacts Filter by contact ids (optional) + * @param string $filterDeals Filter by deals ids (optional) + * @param string $filterCompanies Filter by companies ids (optional) + * @param int $dateFrom dateFrom to date range filter type (timestamp in milliseconds) (optional) + * @param int $dateTo dateTo to date range filter type (timestamp in milliseconds) (optional) + * @param int $offset Index of the first document of the page (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) + * @param string $sortBy The field used to sort field names. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmTasksGetAsyncWithHttpInfo($filterType = null, $filterStatus = null, $filterDate = null, $filterAssignTo = null, $filterContacts = null, $filterDeals = null, $filterCompanies = null, $dateFrom = null, $dateTo = null, $offset = null, $limit = '50', $sort = null, $sortBy = null) + { + $returnType = '\Brevo\Client\Model\TaskList'; + $request = $this->crmTasksGetRequest($filterType, $filterStatus, $filterDate, $filterAssignTo, $filterContacts, $filterDeals, $filterCompanies, $dateFrom, $dateTo, $offset, $limit, $sort, $sortBy); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'crmTasksGet' + * + * @param string $filterType Filter by task type (ID) (optional) + * @param string $filterStatus Filter by task status (optional) + * @param string $filterDate Filter by date (optional) + * @param string $filterAssignTo Filter by assignTo id (optional) + * @param string $filterContacts Filter by contact ids (optional) + * @param string $filterDeals Filter by deals ids (optional) + * @param string $filterCompanies Filter by companies ids (optional) + * @param int $dateFrom dateFrom to date range filter type (timestamp in milliseconds) (optional) + * @param int $dateTo dateTo to date range filter type (timestamp in milliseconds) (optional) + * @param int $offset Index of the first document of the page (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) + * @param string $sortBy The field used to sort field names. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function crmTasksGetRequest($filterType = null, $filterStatus = null, $filterDate = null, $filterAssignTo = null, $filterContacts = null, $filterDeals = null, $filterCompanies = null, $dateFrom = null, $dateTo = null, $offset = null, $limit = '50', $sort = null, $sortBy = null) + { + + $resourcePath = '/crm/tasks'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($filterType !== null) { + $queryParams['filter[type]'] = ObjectSerializer::toQueryValue($filterType); + } + // query params + if ($filterStatus !== null) { + $queryParams['filter[status]'] = ObjectSerializer::toQueryValue($filterStatus); + } + // query params + if ($filterDate !== null) { + $queryParams['filter[date]'] = ObjectSerializer::toQueryValue($filterDate); + } + // query params + if ($filterAssignTo !== null) { + $queryParams['filter[assignTo]'] = ObjectSerializer::toQueryValue($filterAssignTo); + } + // query params + if ($filterContacts !== null) { + $queryParams['filter[contacts]'] = ObjectSerializer::toQueryValue($filterContacts); + } + // query params + if ($filterDeals !== null) { + $queryParams['filter[deals]'] = ObjectSerializer::toQueryValue($filterDeals); + } + // query params + if ($filterCompanies !== null) { + $queryParams['filter[companies]'] = ObjectSerializer::toQueryValue($filterCompanies); + } + // query params + if ($dateFrom !== null) { + $queryParams['dateFrom'] = ObjectSerializer::toQueryValue($dateFrom); + } + // query params + if ($dateTo !== null) { + $queryParams['dateTo'] = ObjectSerializer::toQueryValue($dateTo); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); + } + // query params + if ($sortBy !== null) { + $queryParams['sortBy'] = ObjectSerializer::toQueryValue($sortBy); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation crmTasksIdDelete + * + * Delete a task + * + * @param string $id id (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function crmTasksIdDelete($id) + { + $this->crmTasksIdDeleteWithHttpInfo($id); + } + + /** + * Operation crmTasksIdDeleteWithHttpInfo + * + * Delete a task + * + * @param string $id (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function crmTasksIdDeleteWithHttpInfo($id) + { + $returnType = ''; + $request = $this->crmTasksIdDeleteRequest($id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation crmTasksIdDeleteAsync + * + * Delete a task + * + * @param string $id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmTasksIdDeleteAsync($id) + { + return $this->crmTasksIdDeleteAsyncWithHttpInfo($id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation crmTasksIdDeleteAsyncWithHttpInfo + * + * Delete a task + * + * @param string $id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmTasksIdDeleteAsyncWithHttpInfo($id) + { + $returnType = ''; + $request = $this->crmTasksIdDeleteRequest($id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'crmTasksIdDelete' + * + * @param string $id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function crmTasksIdDeleteRequest($id) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling crmTasksIdDelete' + ); + } + + $resourcePath = '/crm/tasks/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation crmTasksIdGet + * + * Get a task + * + * @param string $id id (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\Task + */ + public function crmTasksIdGet($id) + { + list($response) = $this->crmTasksIdGetWithHttpInfo($id); + return $response; + } + + /** + * Operation crmTasksIdGetWithHttpInfo + * + * Get a task + * + * @param string $id (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\Task, HTTP status code, HTTP response headers (array of strings) + */ + public function crmTasksIdGetWithHttpInfo($id) + { + $returnType = '\Brevo\Client\Model\Task'; + $request = $this->crmTasksIdGetRequest($id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\Task', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation crmTasksIdGetAsync + * + * Get a task + * + * @param string $id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmTasksIdGetAsync($id) + { + return $this->crmTasksIdGetAsyncWithHttpInfo($id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation crmTasksIdGetAsyncWithHttpInfo + * + * Get a task + * + * @param string $id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmTasksIdGetAsyncWithHttpInfo($id) + { + $returnType = '\Brevo\Client\Model\Task'; + $request = $this->crmTasksIdGetRequest($id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'crmTasksIdGet' + * + * @param string $id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function crmTasksIdGetRequest($id) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling crmTasksIdGet' + ); + } + + $resourcePath = '/crm/tasks/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation crmTasksIdPatch + * + * Update a task + * + * @param string $id id (required) + * @param \Brevo\Client\Model\Body1 $body Updated task details. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function crmTasksIdPatch($id, $body) + { + $this->crmTasksIdPatchWithHttpInfo($id, $body); + } + + /** + * Operation crmTasksIdPatchWithHttpInfo + * + * Update a task + * + * @param string $id (required) + * @param \Brevo\Client\Model\Body1 $body Updated task details. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function crmTasksIdPatchWithHttpInfo($id, $body) + { + $returnType = ''; + $request = $this->crmTasksIdPatchRequest($id, $body); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation crmTasksIdPatchAsync + * + * Update a task + * + * @param string $id (required) + * @param \Brevo\Client\Model\Body1 $body Updated task details. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmTasksIdPatchAsync($id, $body) + { + return $this->crmTasksIdPatchAsyncWithHttpInfo($id, $body) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation crmTasksIdPatchAsyncWithHttpInfo + * + * Update a task + * + * @param string $id (required) + * @param \Brevo\Client\Model\Body1 $body Updated task details. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmTasksIdPatchAsyncWithHttpInfo($id, $body) + { + $returnType = ''; + $request = $this->crmTasksIdPatchRequest($id, $body); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'crmTasksIdPatch' + * + * @param string $id (required) + * @param \Brevo\Client\Model\Body1 $body Updated task details. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function crmTasksIdPatchRequest($id, $body) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling crmTasksIdPatch' + ); + } + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $body when calling crmTasksIdPatch' + ); + } + + $resourcePath = '/crm/tasks/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PATCH', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation crmTasksPost + * + * Create a task + * + * @param \Brevo\Client\Model\Body $body Task name. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\InlineResponse201 + */ + public function crmTasksPost($body) + { + list($response) = $this->crmTasksPostWithHttpInfo($body); + return $response; + } + + /** + * Operation crmTasksPostWithHttpInfo + * + * Create a task + * + * @param \Brevo\Client\Model\Body $body Task name. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\InlineResponse201, HTTP status code, HTTP response headers (array of strings) + */ + public function crmTasksPostWithHttpInfo($body) + { + $returnType = '\Brevo\Client\Model\InlineResponse201'; + $request = $this->crmTasksPostRequest($body); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\InlineResponse201', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation crmTasksPostAsync + * + * Create a task + * + * @param \Brevo\Client\Model\Body $body Task name. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmTasksPostAsync($body) + { + return $this->crmTasksPostAsyncWithHttpInfo($body) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation crmTasksPostAsyncWithHttpInfo + * + * Create a task + * + * @param \Brevo\Client\Model\Body $body Task name. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmTasksPostAsyncWithHttpInfo($body) + { + $returnType = '\Brevo\Client\Model\InlineResponse201'; + $request = $this->crmTasksPostRequest($body); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'crmTasksPost' + * + * @param \Brevo\Client\Model\Body $body Task name. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function crmTasksPostRequest($body) + { + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $body when calling crmTasksPost' + ); + } + + $resourcePath = '/crm/tasks'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation crmTasktypesGet + * + * Get all task types + * + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\TaskTypes + */ + public function crmTasktypesGet() + { + list($response) = $this->crmTasktypesGetWithHttpInfo(); + return $response; + } + + /** + * Operation crmTasktypesGetWithHttpInfo + * + * Get all task types + * + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\TaskTypes, HTTP status code, HTTP response headers (array of strings) + */ + public function crmTasktypesGetWithHttpInfo() + { + $returnType = '\Brevo\Client\Model\TaskTypes'; + $request = $this->crmTasktypesGetRequest(); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\TaskTypes', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation crmTasktypesGetAsync + * + * Get all task types + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmTasktypesGetAsync() + { + return $this->crmTasktypesGetAsyncWithHttpInfo() + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation crmTasktypesGetAsyncWithHttpInfo + * + * Get all task types + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmTasktypesGetAsyncWithHttpInfo() + { + $returnType = '\Brevo\Client\Model\TaskTypes'; + $request = $this->crmTasktypesGetRequest(); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'crmTasktypesGet' + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function crmTasktypesGetRequest() + { + + $resourcePath = '/crm/tasktypes'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/vendor/getbrevo/brevo-php/lib/Api/CompaniesApi.php b/vendor/getbrevo/brevo-php/lib/Api/CompaniesApi.php new file mode 100644 index 0000000..e2216dd --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Api/CompaniesApi.php @@ -0,0 +1,2099 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation companiesAttributesGet + * + * Get company attributes + * + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\CompanyAttributes + */ + public function companiesAttributesGet() + { + list($response) = $this->companiesAttributesGetWithHttpInfo(); + return $response; + } + + /** + * Operation companiesAttributesGetWithHttpInfo + * + * Get company attributes + * + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\CompanyAttributes, HTTP status code, HTTP response headers (array of strings) + */ + public function companiesAttributesGetWithHttpInfo() + { + $returnType = '\Brevo\Client\Model\CompanyAttributes'; + $request = $this->companiesAttributesGetRequest(); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\CompanyAttributes', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation companiesAttributesGetAsync + * + * Get company attributes + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function companiesAttributesGetAsync() + { + return $this->companiesAttributesGetAsyncWithHttpInfo() + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation companiesAttributesGetAsyncWithHttpInfo + * + * Get company attributes + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function companiesAttributesGetAsyncWithHttpInfo() + { + $returnType = '\Brevo\Client\Model\CompanyAttributes'; + $request = $this->companiesAttributesGetRequest(); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'companiesAttributesGet' + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function companiesAttributesGetRequest() + { + + $resourcePath = '/companies/attributes'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation companiesGet + * + * Get all companies + * + * @param string $filters Filter by attrbutes. If you have filter for owner on your side please send it as {\"attributes.owner\":\"5b1a17d914b73d35a76ca0c7\"} (optional) + * @param int $linkedContactsIds Filter by linked contacts ids (optional) + * @param string $linkedDealsIds Filter by linked deals ids (optional) + * @param int $page Index of the first document of the page (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) + * @param string $sortBy The field used to sort field names. (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\CompaniesList + */ + public function companiesGet($filters = null, $linkedContactsIds = null, $linkedDealsIds = null, $page = null, $limit = '50', $sort = null, $sortBy = null) + { + list($response) = $this->companiesGetWithHttpInfo($filters, $linkedContactsIds, $linkedDealsIds, $page, $limit, $sort, $sortBy); + return $response; + } + + /** + * Operation companiesGetWithHttpInfo + * + * Get all companies + * + * @param string $filters Filter by attrbutes. If you have filter for owner on your side please send it as {\"attributes.owner\":\"5b1a17d914b73d35a76ca0c7\"} (optional) + * @param int $linkedContactsIds Filter by linked contacts ids (optional) + * @param string $linkedDealsIds Filter by linked deals ids (optional) + * @param int $page Index of the first document of the page (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) + * @param string $sortBy The field used to sort field names. (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\CompaniesList, HTTP status code, HTTP response headers (array of strings) + */ + public function companiesGetWithHttpInfo($filters = null, $linkedContactsIds = null, $linkedDealsIds = null, $page = null, $limit = '50', $sort = null, $sortBy = null) + { + $returnType = '\Brevo\Client\Model\CompaniesList'; + $request = $this->companiesGetRequest($filters, $linkedContactsIds, $linkedDealsIds, $page, $limit, $sort, $sortBy); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\CompaniesList', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation companiesGetAsync + * + * Get all companies + * + * @param string $filters Filter by attrbutes. If you have filter for owner on your side please send it as {\"attributes.owner\":\"5b1a17d914b73d35a76ca0c7\"} (optional) + * @param int $linkedContactsIds Filter by linked contacts ids (optional) + * @param string $linkedDealsIds Filter by linked deals ids (optional) + * @param int $page Index of the first document of the page (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) + * @param string $sortBy The field used to sort field names. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function companiesGetAsync($filters = null, $linkedContactsIds = null, $linkedDealsIds = null, $page = null, $limit = '50', $sort = null, $sortBy = null) + { + return $this->companiesGetAsyncWithHttpInfo($filters, $linkedContactsIds, $linkedDealsIds, $page, $limit, $sort, $sortBy) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation companiesGetAsyncWithHttpInfo + * + * Get all companies + * + * @param string $filters Filter by attrbutes. If you have filter for owner on your side please send it as {\"attributes.owner\":\"5b1a17d914b73d35a76ca0c7\"} (optional) + * @param int $linkedContactsIds Filter by linked contacts ids (optional) + * @param string $linkedDealsIds Filter by linked deals ids (optional) + * @param int $page Index of the first document of the page (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) + * @param string $sortBy The field used to sort field names. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function companiesGetAsyncWithHttpInfo($filters = null, $linkedContactsIds = null, $linkedDealsIds = null, $page = null, $limit = '50', $sort = null, $sortBy = null) + { + $returnType = '\Brevo\Client\Model\CompaniesList'; + $request = $this->companiesGetRequest($filters, $linkedContactsIds, $linkedDealsIds, $page, $limit, $sort, $sortBy); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'companiesGet' + * + * @param string $filters Filter by attrbutes. If you have filter for owner on your side please send it as {\"attributes.owner\":\"5b1a17d914b73d35a76ca0c7\"} (optional) + * @param int $linkedContactsIds Filter by linked contacts ids (optional) + * @param string $linkedDealsIds Filter by linked deals ids (optional) + * @param int $page Index of the first document of the page (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) + * @param string $sortBy The field used to sort field names. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function companiesGetRequest($filters = null, $linkedContactsIds = null, $linkedDealsIds = null, $page = null, $limit = '50', $sort = null, $sortBy = null) + { + + $resourcePath = '/companies'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($filters !== null) { + $queryParams['filters'] = ObjectSerializer::toQueryValue($filters); + } + // query params + if ($linkedContactsIds !== null) { + $queryParams['linkedContactsIds'] = ObjectSerializer::toQueryValue($linkedContactsIds); + } + // query params + if ($linkedDealsIds !== null) { + $queryParams['linkedDealsIds'] = ObjectSerializer::toQueryValue($linkedDealsIds); + } + // query params + if ($page !== null) { + $queryParams['page'] = ObjectSerializer::toQueryValue($page); + } + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); + } + // query params + if ($sortBy !== null) { + $queryParams['sortBy'] = ObjectSerializer::toQueryValue($sortBy); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation companiesIdDelete + * + * Delete a company + * + * @param string $id id (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function companiesIdDelete($id) + { + $this->companiesIdDeleteWithHttpInfo($id); + } + + /** + * Operation companiesIdDeleteWithHttpInfo + * + * Delete a company + * + * @param string $id (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function companiesIdDeleteWithHttpInfo($id) + { + $returnType = ''; + $request = $this->companiesIdDeleteRequest($id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation companiesIdDeleteAsync + * + * Delete a company + * + * @param string $id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function companiesIdDeleteAsync($id) + { + return $this->companiesIdDeleteAsyncWithHttpInfo($id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation companiesIdDeleteAsyncWithHttpInfo + * + * Delete a company + * + * @param string $id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function companiesIdDeleteAsyncWithHttpInfo($id) + { + $returnType = ''; + $request = $this->companiesIdDeleteRequest($id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'companiesIdDelete' + * + * @param string $id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function companiesIdDeleteRequest($id) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling companiesIdDelete' + ); + } + + $resourcePath = '/companies/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation companiesIdGet + * + * Get a company + * + * @param string $id id (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\Company + */ + public function companiesIdGet($id) + { + list($response) = $this->companiesIdGetWithHttpInfo($id); + return $response; + } + + /** + * Operation companiesIdGetWithHttpInfo + * + * Get a company + * + * @param string $id (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\Company, HTTP status code, HTTP response headers (array of strings) + */ + public function companiesIdGetWithHttpInfo($id) + { + $returnType = '\Brevo\Client\Model\Company'; + $request = $this->companiesIdGetRequest($id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\Company', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation companiesIdGetAsync + * + * Get a company + * + * @param string $id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function companiesIdGetAsync($id) + { + return $this->companiesIdGetAsyncWithHttpInfo($id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation companiesIdGetAsyncWithHttpInfo + * + * Get a company + * + * @param string $id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function companiesIdGetAsyncWithHttpInfo($id) + { + $returnType = '\Brevo\Client\Model\Company'; + $request = $this->companiesIdGetRequest($id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'companiesIdGet' + * + * @param string $id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function companiesIdGetRequest($id) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling companiesIdGet' + ); + } + + $resourcePath = '/companies/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation companiesIdPatch + * + * Update a company + * + * @param string $id id (required) + * @param \Brevo\Client\Model\Body3 $body Updated company details. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\Company + */ + public function companiesIdPatch($id, $body) + { + list($response) = $this->companiesIdPatchWithHttpInfo($id, $body); + return $response; + } + + /** + * Operation companiesIdPatchWithHttpInfo + * + * Update a company + * + * @param string $id (required) + * @param \Brevo\Client\Model\Body3 $body Updated company details. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\Company, HTTP status code, HTTP response headers (array of strings) + */ + public function companiesIdPatchWithHttpInfo($id, $body) + { + $returnType = '\Brevo\Client\Model\Company'; + $request = $this->companiesIdPatchRequest($id, $body); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\Company', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation companiesIdPatchAsync + * + * Update a company + * + * @param string $id (required) + * @param \Brevo\Client\Model\Body3 $body Updated company details. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function companiesIdPatchAsync($id, $body) + { + return $this->companiesIdPatchAsyncWithHttpInfo($id, $body) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation companiesIdPatchAsyncWithHttpInfo + * + * Update a company + * + * @param string $id (required) + * @param \Brevo\Client\Model\Body3 $body Updated company details. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function companiesIdPatchAsyncWithHttpInfo($id, $body) + { + $returnType = '\Brevo\Client\Model\Company'; + $request = $this->companiesIdPatchRequest($id, $body); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'companiesIdPatch' + * + * @param string $id (required) + * @param \Brevo\Client\Model\Body3 $body Updated company details. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function companiesIdPatchRequest($id, $body) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling companiesIdPatch' + ); + } + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $body when calling companiesIdPatch' + ); + } + + $resourcePath = '/companies/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PATCH', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation companiesLinkUnlinkIdPatch + * + * Link and Unlink company with contacts and deals + * + * @param string $id id (required) + * @param \Brevo\Client\Model\Body4 $body Linked / Unlinked contacts and deals ids. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function companiesLinkUnlinkIdPatch($id, $body) + { + $this->companiesLinkUnlinkIdPatchWithHttpInfo($id, $body); + } + + /** + * Operation companiesLinkUnlinkIdPatchWithHttpInfo + * + * Link and Unlink company with contacts and deals + * + * @param string $id (required) + * @param \Brevo\Client\Model\Body4 $body Linked / Unlinked contacts and deals ids. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function companiesLinkUnlinkIdPatchWithHttpInfo($id, $body) + { + $returnType = ''; + $request = $this->companiesLinkUnlinkIdPatchRequest($id, $body); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation companiesLinkUnlinkIdPatchAsync + * + * Link and Unlink company with contacts and deals + * + * @param string $id (required) + * @param \Brevo\Client\Model\Body4 $body Linked / Unlinked contacts and deals ids. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function companiesLinkUnlinkIdPatchAsync($id, $body) + { + return $this->companiesLinkUnlinkIdPatchAsyncWithHttpInfo($id, $body) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation companiesLinkUnlinkIdPatchAsyncWithHttpInfo + * + * Link and Unlink company with contacts and deals + * + * @param string $id (required) + * @param \Brevo\Client\Model\Body4 $body Linked / Unlinked contacts and deals ids. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function companiesLinkUnlinkIdPatchAsyncWithHttpInfo($id, $body) + { + $returnType = ''; + $request = $this->companiesLinkUnlinkIdPatchRequest($id, $body); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'companiesLinkUnlinkIdPatch' + * + * @param string $id (required) + * @param \Brevo\Client\Model\Body4 $body Linked / Unlinked contacts and deals ids. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function companiesLinkUnlinkIdPatchRequest($id, $body) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling companiesLinkUnlinkIdPatch' + ); + } + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $body when calling companiesLinkUnlinkIdPatch' + ); + } + + $resourcePath = '/companies/link-unlink/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PATCH', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation companiesPost + * + * Create a company + * + * @param \Brevo\Client\Model\Body2 $body Company create data. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\InlineResponse2001 + */ + public function companiesPost($body) + { + list($response) = $this->companiesPostWithHttpInfo($body); + return $response; + } + + /** + * Operation companiesPostWithHttpInfo + * + * Create a company + * + * @param \Brevo\Client\Model\Body2 $body Company create data. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\InlineResponse2001, HTTP status code, HTTP response headers (array of strings) + */ + public function companiesPostWithHttpInfo($body) + { + $returnType = '\Brevo\Client\Model\InlineResponse2001'; + $request = $this->companiesPostRequest($body); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\InlineResponse2001', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation companiesPostAsync + * + * Create a company + * + * @param \Brevo\Client\Model\Body2 $body Company create data. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function companiesPostAsync($body) + { + return $this->companiesPostAsyncWithHttpInfo($body) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation companiesPostAsyncWithHttpInfo + * + * Create a company + * + * @param \Brevo\Client\Model\Body2 $body Company create data. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function companiesPostAsyncWithHttpInfo($body) + { + $returnType = '\Brevo\Client\Model\InlineResponse2001'; + $request = $this->companiesPostRequest($body); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'companiesPost' + * + * @param \Brevo\Client\Model\Body2 $body Company create data. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function companiesPostRequest($body) + { + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $body when calling companiesPost' + ); + } + + $resourcePath = '/companies'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/vendor/getbrevo/brevo-php/lib/Api/ContactsApi.php b/vendor/getbrevo/brevo-php/lib/Api/ContactsApi.php new file mode 100644 index 0000000..927cfac --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Api/ContactsApi.php @@ -0,0 +1,8507 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation addContactToList + * + * Add existing contacts to a list + * + * @param int $listId Id of the list (required) + * @param \Brevo\Client\Model\AddContactToList $contactEmails Emails addresses OR IDs of the contacts (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\PostContactInfo + */ + public function addContactToList($listId, $contactEmails) + { + list($response) = $this->addContactToListWithHttpInfo($listId, $contactEmails); + return $response; + } + + /** + * Operation addContactToListWithHttpInfo + * + * Add existing contacts to a list + * + * @param int $listId Id of the list (required) + * @param \Brevo\Client\Model\AddContactToList $contactEmails Emails addresses OR IDs of the contacts (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\PostContactInfo, HTTP status code, HTTP response headers (array of strings) + */ + public function addContactToListWithHttpInfo($listId, $contactEmails) + { + $returnType = '\Brevo\Client\Model\PostContactInfo'; + $request = $this->addContactToListRequest($listId, $contactEmails); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\PostContactInfo', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation addContactToListAsync + * + * Add existing contacts to a list + * + * @param int $listId Id of the list (required) + * @param \Brevo\Client\Model\AddContactToList $contactEmails Emails addresses OR IDs of the contacts (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function addContactToListAsync($listId, $contactEmails) + { + return $this->addContactToListAsyncWithHttpInfo($listId, $contactEmails) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation addContactToListAsyncWithHttpInfo + * + * Add existing contacts to a list + * + * @param int $listId Id of the list (required) + * @param \Brevo\Client\Model\AddContactToList $contactEmails Emails addresses OR IDs of the contacts (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function addContactToListAsyncWithHttpInfo($listId, $contactEmails) + { + $returnType = '\Brevo\Client\Model\PostContactInfo'; + $request = $this->addContactToListRequest($listId, $contactEmails); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'addContactToList' + * + * @param int $listId Id of the list (required) + * @param \Brevo\Client\Model\AddContactToList $contactEmails Emails addresses OR IDs of the contacts (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function addContactToListRequest($listId, $contactEmails) + { + // verify the required parameter 'listId' is set + if ($listId === null || (is_array($listId) && count($listId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $listId when calling addContactToList' + ); + } + // verify the required parameter 'contactEmails' is set + if ($contactEmails === null || (is_array($contactEmails) && count($contactEmails) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $contactEmails when calling addContactToList' + ); + } + + $resourcePath = '/contacts/lists/{listId}/contacts/add'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($listId !== null) { + $resourcePath = str_replace( + '{' . 'listId' . '}', + ObjectSerializer::toPathValue($listId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($contactEmails)) { + $_tempBody = $contactEmails; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation createAttribute + * + * Create contact attribute + * + * @param string $attributeCategory Category of the attribute (required) + * @param string $attributeName Name of the attribute (required) + * @param \Brevo\Client\Model\CreateAttribute $createAttribute Values to create an attribute (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function createAttribute($attributeCategory, $attributeName, $createAttribute) + { + $this->createAttributeWithHttpInfo($attributeCategory, $attributeName, $createAttribute); + } + + /** + * Operation createAttributeWithHttpInfo + * + * Create contact attribute + * + * @param string $attributeCategory Category of the attribute (required) + * @param string $attributeName Name of the attribute (required) + * @param \Brevo\Client\Model\CreateAttribute $createAttribute Values to create an attribute (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function createAttributeWithHttpInfo($attributeCategory, $attributeName, $createAttribute) + { + $returnType = ''; + $request = $this->createAttributeRequest($attributeCategory, $attributeName, $createAttribute); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation createAttributeAsync + * + * Create contact attribute + * + * @param string $attributeCategory Category of the attribute (required) + * @param string $attributeName Name of the attribute (required) + * @param \Brevo\Client\Model\CreateAttribute $createAttribute Values to create an attribute (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createAttributeAsync($attributeCategory, $attributeName, $createAttribute) + { + return $this->createAttributeAsyncWithHttpInfo($attributeCategory, $attributeName, $createAttribute) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createAttributeAsyncWithHttpInfo + * + * Create contact attribute + * + * @param string $attributeCategory Category of the attribute (required) + * @param string $attributeName Name of the attribute (required) + * @param \Brevo\Client\Model\CreateAttribute $createAttribute Values to create an attribute (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createAttributeAsyncWithHttpInfo($attributeCategory, $attributeName, $createAttribute) + { + $returnType = ''; + $request = $this->createAttributeRequest($attributeCategory, $attributeName, $createAttribute); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createAttribute' + * + * @param string $attributeCategory Category of the attribute (required) + * @param string $attributeName Name of the attribute (required) + * @param \Brevo\Client\Model\CreateAttribute $createAttribute Values to create an attribute (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function createAttributeRequest($attributeCategory, $attributeName, $createAttribute) + { + // verify the required parameter 'attributeCategory' is set + if ($attributeCategory === null || (is_array($attributeCategory) && count($attributeCategory) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $attributeCategory when calling createAttribute' + ); + } + // verify the required parameter 'attributeName' is set + if ($attributeName === null || (is_array($attributeName) && count($attributeName) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $attributeName when calling createAttribute' + ); + } + // verify the required parameter 'createAttribute' is set + if ($createAttribute === null || (is_array($createAttribute) && count($createAttribute) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $createAttribute when calling createAttribute' + ); + } + + $resourcePath = '/contacts/attributes/{attributeCategory}/{attributeName}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($attributeCategory !== null) { + $resourcePath = str_replace( + '{' . 'attributeCategory' . '}', + ObjectSerializer::toPathValue($attributeCategory), + $resourcePath + ); + } + // path params + if ($attributeName !== null) { + $resourcePath = str_replace( + '{' . 'attributeName' . '}', + ObjectSerializer::toPathValue($attributeName), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($createAttribute)) { + $_tempBody = $createAttribute; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation createContact + * + * Create a contact + * + * @param \Brevo\Client\Model\CreateContact $createContact Values to create a contact (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\CreateUpdateContactModel + */ + public function createContact($createContact) + { + list($response) = $this->createContactWithHttpInfo($createContact); + return $response; + } + + /** + * Operation createContactWithHttpInfo + * + * Create a contact + * + * @param \Brevo\Client\Model\CreateContact $createContact Values to create a contact (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\CreateUpdateContactModel, HTTP status code, HTTP response headers (array of strings) + */ + public function createContactWithHttpInfo($createContact) + { + $returnType = '\Brevo\Client\Model\CreateUpdateContactModel'; + $request = $this->createContactRequest($createContact); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\CreateUpdateContactModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation createContactAsync + * + * Create a contact + * + * @param \Brevo\Client\Model\CreateContact $createContact Values to create a contact (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createContactAsync($createContact) + { + return $this->createContactAsyncWithHttpInfo($createContact) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createContactAsyncWithHttpInfo + * + * Create a contact + * + * @param \Brevo\Client\Model\CreateContact $createContact Values to create a contact (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createContactAsyncWithHttpInfo($createContact) + { + $returnType = '\Brevo\Client\Model\CreateUpdateContactModel'; + $request = $this->createContactRequest($createContact); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createContact' + * + * @param \Brevo\Client\Model\CreateContact $createContact Values to create a contact (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function createContactRequest($createContact) + { + // verify the required parameter 'createContact' is set + if ($createContact === null || (is_array($createContact) && count($createContact) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $createContact when calling createContact' + ); + } + + $resourcePath = '/contacts'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($createContact)) { + $_tempBody = $createContact; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation createDoiContact + * + * Create Contact via DOI (Double-Opt-In) Flow + * + * @param \Brevo\Client\Model\CreateDoiContact $createDoiContact Values to create the Double opt-in (DOI) contact (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function createDoiContact($createDoiContact) + { + $this->createDoiContactWithHttpInfo($createDoiContact); + } + + /** + * Operation createDoiContactWithHttpInfo + * + * Create Contact via DOI (Double-Opt-In) Flow + * + * @param \Brevo\Client\Model\CreateDoiContact $createDoiContact Values to create the Double opt-in (DOI) contact (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function createDoiContactWithHttpInfo($createDoiContact) + { + $returnType = ''; + $request = $this->createDoiContactRequest($createDoiContact); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation createDoiContactAsync + * + * Create Contact via DOI (Double-Opt-In) Flow + * + * @param \Brevo\Client\Model\CreateDoiContact $createDoiContact Values to create the Double opt-in (DOI) contact (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createDoiContactAsync($createDoiContact) + { + return $this->createDoiContactAsyncWithHttpInfo($createDoiContact) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createDoiContactAsyncWithHttpInfo + * + * Create Contact via DOI (Double-Opt-In) Flow + * + * @param \Brevo\Client\Model\CreateDoiContact $createDoiContact Values to create the Double opt-in (DOI) contact (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createDoiContactAsyncWithHttpInfo($createDoiContact) + { + $returnType = ''; + $request = $this->createDoiContactRequest($createDoiContact); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createDoiContact' + * + * @param \Brevo\Client\Model\CreateDoiContact $createDoiContact Values to create the Double opt-in (DOI) contact (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function createDoiContactRequest($createDoiContact) + { + // verify the required parameter 'createDoiContact' is set + if ($createDoiContact === null || (is_array($createDoiContact) && count($createDoiContact) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $createDoiContact when calling createDoiContact' + ); + } + + $resourcePath = '/contacts/doubleOptinConfirmation'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($createDoiContact)) { + $_tempBody = $createDoiContact; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation createFolder + * + * Create a folder + * + * @param \Brevo\Client\Model\CreateUpdateFolder $createFolder Name of the folder (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\CreateModel + */ + public function createFolder($createFolder) + { + list($response) = $this->createFolderWithHttpInfo($createFolder); + return $response; + } + + /** + * Operation createFolderWithHttpInfo + * + * Create a folder + * + * @param \Brevo\Client\Model\CreateUpdateFolder $createFolder Name of the folder (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\CreateModel, HTTP status code, HTTP response headers (array of strings) + */ + public function createFolderWithHttpInfo($createFolder) + { + $returnType = '\Brevo\Client\Model\CreateModel'; + $request = $this->createFolderRequest($createFolder); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\CreateModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation createFolderAsync + * + * Create a folder + * + * @param \Brevo\Client\Model\CreateUpdateFolder $createFolder Name of the folder (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createFolderAsync($createFolder) + { + return $this->createFolderAsyncWithHttpInfo($createFolder) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createFolderAsyncWithHttpInfo + * + * Create a folder + * + * @param \Brevo\Client\Model\CreateUpdateFolder $createFolder Name of the folder (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createFolderAsyncWithHttpInfo($createFolder) + { + $returnType = '\Brevo\Client\Model\CreateModel'; + $request = $this->createFolderRequest($createFolder); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createFolder' + * + * @param \Brevo\Client\Model\CreateUpdateFolder $createFolder Name of the folder (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function createFolderRequest($createFolder) + { + // verify the required parameter 'createFolder' is set + if ($createFolder === null || (is_array($createFolder) && count($createFolder) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $createFolder when calling createFolder' + ); + } + + $resourcePath = '/contacts/folders'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($createFolder)) { + $_tempBody = $createFolder; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation createList + * + * Create a list + * + * @param \Brevo\Client\Model\CreateList $createList Values to create a list (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\CreateModel + */ + public function createList($createList) + { + list($response) = $this->createListWithHttpInfo($createList); + return $response; + } + + /** + * Operation createListWithHttpInfo + * + * Create a list + * + * @param \Brevo\Client\Model\CreateList $createList Values to create a list (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\CreateModel, HTTP status code, HTTP response headers (array of strings) + */ + public function createListWithHttpInfo($createList) + { + $returnType = '\Brevo\Client\Model\CreateModel'; + $request = $this->createListRequest($createList); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\CreateModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation createListAsync + * + * Create a list + * + * @param \Brevo\Client\Model\CreateList $createList Values to create a list (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createListAsync($createList) + { + return $this->createListAsyncWithHttpInfo($createList) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createListAsyncWithHttpInfo + * + * Create a list + * + * @param \Brevo\Client\Model\CreateList $createList Values to create a list (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createListAsyncWithHttpInfo($createList) + { + $returnType = '\Brevo\Client\Model\CreateModel'; + $request = $this->createListRequest($createList); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createList' + * + * @param \Brevo\Client\Model\CreateList $createList Values to create a list (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function createListRequest($createList) + { + // verify the required parameter 'createList' is set + if ($createList === null || (is_array($createList) && count($createList) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $createList when calling createList' + ); + } + + $resourcePath = '/contacts/lists'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($createList)) { + $_tempBody = $createList; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation deleteAttribute + * + * Delete an attribute + * + * @param string $attributeCategory Category of the attribute (required) + * @param string $attributeName Name of the existing attribute (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function deleteAttribute($attributeCategory, $attributeName) + { + $this->deleteAttributeWithHttpInfo($attributeCategory, $attributeName); + } + + /** + * Operation deleteAttributeWithHttpInfo + * + * Delete an attribute + * + * @param string $attributeCategory Category of the attribute (required) + * @param string $attributeName Name of the existing attribute (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteAttributeWithHttpInfo($attributeCategory, $attributeName) + { + $returnType = ''; + $request = $this->deleteAttributeRequest($attributeCategory, $attributeName); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation deleteAttributeAsync + * + * Delete an attribute + * + * @param string $attributeCategory Category of the attribute (required) + * @param string $attributeName Name of the existing attribute (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteAttributeAsync($attributeCategory, $attributeName) + { + return $this->deleteAttributeAsyncWithHttpInfo($attributeCategory, $attributeName) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteAttributeAsyncWithHttpInfo + * + * Delete an attribute + * + * @param string $attributeCategory Category of the attribute (required) + * @param string $attributeName Name of the existing attribute (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteAttributeAsyncWithHttpInfo($attributeCategory, $attributeName) + { + $returnType = ''; + $request = $this->deleteAttributeRequest($attributeCategory, $attributeName); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'deleteAttribute' + * + * @param string $attributeCategory Category of the attribute (required) + * @param string $attributeName Name of the existing attribute (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function deleteAttributeRequest($attributeCategory, $attributeName) + { + // verify the required parameter 'attributeCategory' is set + if ($attributeCategory === null || (is_array($attributeCategory) && count($attributeCategory) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $attributeCategory when calling deleteAttribute' + ); + } + // verify the required parameter 'attributeName' is set + if ($attributeName === null || (is_array($attributeName) && count($attributeName) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $attributeName when calling deleteAttribute' + ); + } + + $resourcePath = '/contacts/attributes/{attributeCategory}/{attributeName}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($attributeCategory !== null) { + $resourcePath = str_replace( + '{' . 'attributeCategory' . '}', + ObjectSerializer::toPathValue($attributeCategory), + $resourcePath + ); + } + // path params + if ($attributeName !== null) { + $resourcePath = str_replace( + '{' . 'attributeName' . '}', + ObjectSerializer::toPathValue($attributeName), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation deleteContact + * + * Delete a contact + * + * @param string $identifier Email (urlencoded) OR ID of the contact (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function deleteContact($identifier) + { + $this->deleteContactWithHttpInfo($identifier); + } + + /** + * Operation deleteContactWithHttpInfo + * + * Delete a contact + * + * @param string $identifier Email (urlencoded) OR ID of the contact (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteContactWithHttpInfo($identifier) + { + $returnType = ''; + $request = $this->deleteContactRequest($identifier); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation deleteContactAsync + * + * Delete a contact + * + * @param string $identifier Email (urlencoded) OR ID of the contact (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteContactAsync($identifier) + { + return $this->deleteContactAsyncWithHttpInfo($identifier) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteContactAsyncWithHttpInfo + * + * Delete a contact + * + * @param string $identifier Email (urlencoded) OR ID of the contact (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteContactAsyncWithHttpInfo($identifier) + { + $returnType = ''; + $request = $this->deleteContactRequest($identifier); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'deleteContact' + * + * @param string $identifier Email (urlencoded) OR ID of the contact (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function deleteContactRequest($identifier) + { + // verify the required parameter 'identifier' is set + if ($identifier === null || (is_array($identifier) && count($identifier) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $identifier when calling deleteContact' + ); + } + + $resourcePath = '/contacts/{identifier}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($identifier !== null) { + $resourcePath = str_replace( + '{' . 'identifier' . '}', + ObjectSerializer::toPathValue($identifier), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation deleteFolder + * + * Delete a folder (and all its lists) + * + * @param int $folderId Id of the folder (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function deleteFolder($folderId) + { + $this->deleteFolderWithHttpInfo($folderId); + } + + /** + * Operation deleteFolderWithHttpInfo + * + * Delete a folder (and all its lists) + * + * @param int $folderId Id of the folder (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteFolderWithHttpInfo($folderId) + { + $returnType = ''; + $request = $this->deleteFolderRequest($folderId); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation deleteFolderAsync + * + * Delete a folder (and all its lists) + * + * @param int $folderId Id of the folder (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteFolderAsync($folderId) + { + return $this->deleteFolderAsyncWithHttpInfo($folderId) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteFolderAsyncWithHttpInfo + * + * Delete a folder (and all its lists) + * + * @param int $folderId Id of the folder (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteFolderAsyncWithHttpInfo($folderId) + { + $returnType = ''; + $request = $this->deleteFolderRequest($folderId); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'deleteFolder' + * + * @param int $folderId Id of the folder (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function deleteFolderRequest($folderId) + { + // verify the required parameter 'folderId' is set + if ($folderId === null || (is_array($folderId) && count($folderId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $folderId when calling deleteFolder' + ); + } + + $resourcePath = '/contacts/folders/{folderId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($folderId !== null) { + $resourcePath = str_replace( + '{' . 'folderId' . '}', + ObjectSerializer::toPathValue($folderId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation deleteList + * + * Delete a list + * + * @param int $listId Id of the list (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function deleteList($listId) + { + $this->deleteListWithHttpInfo($listId); + } + + /** + * Operation deleteListWithHttpInfo + * + * Delete a list + * + * @param int $listId Id of the list (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteListWithHttpInfo($listId) + { + $returnType = ''; + $request = $this->deleteListRequest($listId); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation deleteListAsync + * + * Delete a list + * + * @param int $listId Id of the list (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteListAsync($listId) + { + return $this->deleteListAsyncWithHttpInfo($listId) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteListAsyncWithHttpInfo + * + * Delete a list + * + * @param int $listId Id of the list (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteListAsyncWithHttpInfo($listId) + { + $returnType = ''; + $request = $this->deleteListRequest($listId); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'deleteList' + * + * @param int $listId Id of the list (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function deleteListRequest($listId) + { + // verify the required parameter 'listId' is set + if ($listId === null || (is_array($listId) && count($listId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $listId when calling deleteList' + ); + } + + $resourcePath = '/contacts/lists/{listId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($listId !== null) { + $resourcePath = str_replace( + '{' . 'listId' . '}', + ObjectSerializer::toPathValue($listId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getAttributes + * + * List all attributes + * + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetAttributes + */ + public function getAttributes() + { + list($response) = $this->getAttributesWithHttpInfo(); + return $response; + } + + /** + * Operation getAttributesWithHttpInfo + * + * List all attributes + * + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetAttributes, HTTP status code, HTTP response headers (array of strings) + */ + public function getAttributesWithHttpInfo() + { + $returnType = '\Brevo\Client\Model\GetAttributes'; + $request = $this->getAttributesRequest(); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetAttributes', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getAttributesAsync + * + * List all attributes + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getAttributesAsync() + { + return $this->getAttributesAsyncWithHttpInfo() + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getAttributesAsyncWithHttpInfo + * + * List all attributes + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getAttributesAsyncWithHttpInfo() + { + $returnType = '\Brevo\Client\Model\GetAttributes'; + $request = $this->getAttributesRequest(); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getAttributes' + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getAttributesRequest() + { + + $resourcePath = '/contacts/attributes'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getContactInfo + * + * Get a contact's details + * + * @param string $identifier Email (urlencoded) OR ID of the contact OR its SMS attribute value (required) + * @param string $startDate **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate (optional) + * @param string $endDate **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetExtendedContactDetails + */ + public function getContactInfo($identifier, $startDate = null, $endDate = null) + { + list($response) = $this->getContactInfoWithHttpInfo($identifier, $startDate, $endDate); + return $response; + } + + /** + * Operation getContactInfoWithHttpInfo + * + * Get a contact's details + * + * @param string $identifier Email (urlencoded) OR ID of the contact OR its SMS attribute value (required) + * @param string $startDate **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate (optional) + * @param string $endDate **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetExtendedContactDetails, HTTP status code, HTTP response headers (array of strings) + */ + public function getContactInfoWithHttpInfo($identifier, $startDate = null, $endDate = null) + { + $returnType = '\Brevo\Client\Model\GetExtendedContactDetails'; + $request = $this->getContactInfoRequest($identifier, $startDate, $endDate); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetExtendedContactDetails', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getContactInfoAsync + * + * Get a contact's details + * + * @param string $identifier Email (urlencoded) OR ID of the contact OR its SMS attribute value (required) + * @param string $startDate **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate (optional) + * @param string $endDate **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getContactInfoAsync($identifier, $startDate = null, $endDate = null) + { + return $this->getContactInfoAsyncWithHttpInfo($identifier, $startDate, $endDate) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getContactInfoAsyncWithHttpInfo + * + * Get a contact's details + * + * @param string $identifier Email (urlencoded) OR ID of the contact OR its SMS attribute value (required) + * @param string $startDate **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate (optional) + * @param string $endDate **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getContactInfoAsyncWithHttpInfo($identifier, $startDate = null, $endDate = null) + { + $returnType = '\Brevo\Client\Model\GetExtendedContactDetails'; + $request = $this->getContactInfoRequest($identifier, $startDate, $endDate); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getContactInfo' + * + * @param string $identifier Email (urlencoded) OR ID of the contact OR its SMS attribute value (required) + * @param string $startDate **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate (optional) + * @param string $endDate **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getContactInfoRequest($identifier, $startDate = null, $endDate = null) + { + // verify the required parameter 'identifier' is set + if ($identifier === null || (is_array($identifier) && count($identifier) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $identifier when calling getContactInfo' + ); + } + + $resourcePath = '/contacts/{identifier}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($startDate !== null) { + $queryParams['startDate'] = ObjectSerializer::toQueryValue($startDate); + } + // query params + if ($endDate !== null) { + $queryParams['endDate'] = ObjectSerializer::toQueryValue($endDate); + } + + // path params + if ($identifier !== null) { + $resourcePath = str_replace( + '{' . 'identifier' . '}', + ObjectSerializer::toPathValue($identifier), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getContactStats + * + * Get email campaigns' statistics for a contact + * + * @param string $identifier Email (urlencoded) OR ID of the contact (required) + * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate (optional) + * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Maximum difference between startDate and endDate should not be greater than 90 days (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetContactCampaignStats + */ + public function getContactStats($identifier, $startDate = null, $endDate = null) + { + list($response) = $this->getContactStatsWithHttpInfo($identifier, $startDate, $endDate); + return $response; + } + + /** + * Operation getContactStatsWithHttpInfo + * + * Get email campaigns' statistics for a contact + * + * @param string $identifier Email (urlencoded) OR ID of the contact (required) + * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate (optional) + * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Maximum difference between startDate and endDate should not be greater than 90 days (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetContactCampaignStats, HTTP status code, HTTP response headers (array of strings) + */ + public function getContactStatsWithHttpInfo($identifier, $startDate = null, $endDate = null) + { + $returnType = '\Brevo\Client\Model\GetContactCampaignStats'; + $request = $this->getContactStatsRequest($identifier, $startDate, $endDate); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetContactCampaignStats', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getContactStatsAsync + * + * Get email campaigns' statistics for a contact + * + * @param string $identifier Email (urlencoded) OR ID of the contact (required) + * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate (optional) + * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Maximum difference between startDate and endDate should not be greater than 90 days (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getContactStatsAsync($identifier, $startDate = null, $endDate = null) + { + return $this->getContactStatsAsyncWithHttpInfo($identifier, $startDate, $endDate) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getContactStatsAsyncWithHttpInfo + * + * Get email campaigns' statistics for a contact + * + * @param string $identifier Email (urlencoded) OR ID of the contact (required) + * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate (optional) + * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Maximum difference between startDate and endDate should not be greater than 90 days (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getContactStatsAsyncWithHttpInfo($identifier, $startDate = null, $endDate = null) + { + $returnType = '\Brevo\Client\Model\GetContactCampaignStats'; + $request = $this->getContactStatsRequest($identifier, $startDate, $endDate); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getContactStats' + * + * @param string $identifier Email (urlencoded) OR ID of the contact (required) + * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate (optional) + * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Maximum difference between startDate and endDate should not be greater than 90 days (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getContactStatsRequest($identifier, $startDate = null, $endDate = null) + { + // verify the required parameter 'identifier' is set + if ($identifier === null || (is_array($identifier) && count($identifier) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $identifier when calling getContactStats' + ); + } + + $resourcePath = '/contacts/{identifier}/campaignStats'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($startDate !== null) { + $queryParams['startDate'] = ObjectSerializer::toQueryValue($startDate); + } + // query params + if ($endDate !== null) { + $queryParams['endDate'] = ObjectSerializer::toQueryValue($endDate); + } + + // path params + if ($identifier !== null) { + $resourcePath = str_replace( + '{' . 'identifier' . '}', + ObjectSerializer::toPathValue($identifier), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getContacts + * + * Get all the contacts + * + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param string $modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param string $createdSince Filter (urlencoded) the contacts created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param int $segmentId Id of the segment. **Either listIds or segmentId can be passed.** (optional) + * @param int[] $listIds Ids of the list. **Either listIds or segmentId can be passed.** (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetContacts + */ + public function getContacts($limit = '50', $offset = '0', $modifiedSince = null, $createdSince = null, $sort = 'desc', $segmentId = null, $listIds = null) + { + list($response) = $this->getContactsWithHttpInfo($limit, $offset, $modifiedSince, $createdSince, $sort, $segmentId, $listIds); + return $response; + } + + /** + * Operation getContactsWithHttpInfo + * + * Get all the contacts + * + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param string $modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param string $createdSince Filter (urlencoded) the contacts created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param int $segmentId Id of the segment. **Either listIds or segmentId can be passed.** (optional) + * @param int[] $listIds Ids of the list. **Either listIds or segmentId can be passed.** (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetContacts, HTTP status code, HTTP response headers (array of strings) + */ + public function getContactsWithHttpInfo($limit = '50', $offset = '0', $modifiedSince = null, $createdSince = null, $sort = 'desc', $segmentId = null, $listIds = null) + { + $returnType = '\Brevo\Client\Model\GetContacts'; + $request = $this->getContactsRequest($limit, $offset, $modifiedSince, $createdSince, $sort, $segmentId, $listIds); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetContacts', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getContactsAsync + * + * Get all the contacts + * + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param string $modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param string $createdSince Filter (urlencoded) the contacts created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param int $segmentId Id of the segment. **Either listIds or segmentId can be passed.** (optional) + * @param int[] $listIds Ids of the list. **Either listIds or segmentId can be passed.** (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getContactsAsync($limit = '50', $offset = '0', $modifiedSince = null, $createdSince = null, $sort = 'desc', $segmentId = null, $listIds = null) + { + return $this->getContactsAsyncWithHttpInfo($limit, $offset, $modifiedSince, $createdSince, $sort, $segmentId, $listIds) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getContactsAsyncWithHttpInfo + * + * Get all the contacts + * + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param string $modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param string $createdSince Filter (urlencoded) the contacts created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param int $segmentId Id of the segment. **Either listIds or segmentId can be passed.** (optional) + * @param int[] $listIds Ids of the list. **Either listIds or segmentId can be passed.** (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getContactsAsyncWithHttpInfo($limit = '50', $offset = '0', $modifiedSince = null, $createdSince = null, $sort = 'desc', $segmentId = null, $listIds = null) + { + $returnType = '\Brevo\Client\Model\GetContacts'; + $request = $this->getContactsRequest($limit, $offset, $modifiedSince, $createdSince, $sort, $segmentId, $listIds); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getContacts' + * + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param string $modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param string $createdSince Filter (urlencoded) the contacts created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param int $segmentId Id of the segment. **Either listIds or segmentId can be passed.** (optional) + * @param int[] $listIds Ids of the list. **Either listIds or segmentId can be passed.** (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getContactsRequest($limit = '50', $offset = '0', $modifiedSince = null, $createdSince = null, $sort = 'desc', $segmentId = null, $listIds = null) + { + if ($limit !== null && $limit > 1000) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling ContactsApi.getContacts, must be smaller than or equal to 1000.'); + } + if ($limit !== null && $limit < 0) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling ContactsApi.getContacts, must be bigger than or equal to 0.'); + } + + + $resourcePath = '/contacts'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + // query params + if ($modifiedSince !== null) { + $queryParams['modifiedSince'] = ObjectSerializer::toQueryValue($modifiedSince); + } + // query params + if ($createdSince !== null) { + $queryParams['createdSince'] = ObjectSerializer::toQueryValue($createdSince); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); + } + // query params + if ($segmentId !== null) { + $queryParams['segmentId'] = ObjectSerializer::toQueryValue($segmentId); + } + // query params + if (is_array($listIds)) { + $queryParams['listIds'] = $listIds; + } else + if ($listIds !== null) { + $queryParams['listIds'] = ObjectSerializer::toQueryValue($listIds); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getContactsFromList + * + * Get contacts in a list + * + * @param int $listId Id of the list (required) + * @param string $modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetContacts + */ + public function getContactsFromList($listId, $modifiedSince = null, $limit = '50', $offset = '0', $sort = 'desc') + { + list($response) = $this->getContactsFromListWithHttpInfo($listId, $modifiedSince, $limit, $offset, $sort); + return $response; + } + + /** + * Operation getContactsFromListWithHttpInfo + * + * Get contacts in a list + * + * @param int $listId Id of the list (required) + * @param string $modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetContacts, HTTP status code, HTTP response headers (array of strings) + */ + public function getContactsFromListWithHttpInfo($listId, $modifiedSince = null, $limit = '50', $offset = '0', $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetContacts'; + $request = $this->getContactsFromListRequest($listId, $modifiedSince, $limit, $offset, $sort); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetContacts', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getContactsFromListAsync + * + * Get contacts in a list + * + * @param int $listId Id of the list (required) + * @param string $modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getContactsFromListAsync($listId, $modifiedSince = null, $limit = '50', $offset = '0', $sort = 'desc') + { + return $this->getContactsFromListAsyncWithHttpInfo($listId, $modifiedSince, $limit, $offset, $sort) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getContactsFromListAsyncWithHttpInfo + * + * Get contacts in a list + * + * @param int $listId Id of the list (required) + * @param string $modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getContactsFromListAsyncWithHttpInfo($listId, $modifiedSince = null, $limit = '50', $offset = '0', $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetContacts'; + $request = $this->getContactsFromListRequest($listId, $modifiedSince, $limit, $offset, $sort); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getContactsFromList' + * + * @param int $listId Id of the list (required) + * @param string $modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getContactsFromListRequest($listId, $modifiedSince = null, $limit = '50', $offset = '0', $sort = 'desc') + { + // verify the required parameter 'listId' is set + if ($listId === null || (is_array($listId) && count($listId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $listId when calling getContactsFromList' + ); + } + if ($limit !== null && $limit > 500) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling ContactsApi.getContactsFromList, must be smaller than or equal to 500.'); + } + if ($limit !== null && $limit < 0) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling ContactsApi.getContactsFromList, must be bigger than or equal to 0.'); + } + + + $resourcePath = '/contacts/lists/{listId}/contacts'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($modifiedSince !== null) { + $queryParams['modifiedSince'] = ObjectSerializer::toQueryValue($modifiedSince); + } + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); + } + + // path params + if ($listId !== null) { + $resourcePath = str_replace( + '{' . 'listId' . '}', + ObjectSerializer::toPathValue($listId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getFolder + * + * Returns a folder's details + * + * @param int $folderId id of the folder (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetFolder + */ + public function getFolder($folderId) + { + list($response) = $this->getFolderWithHttpInfo($folderId); + return $response; + } + + /** + * Operation getFolderWithHttpInfo + * + * Returns a folder's details + * + * @param int $folderId id of the folder (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetFolder, HTTP status code, HTTP response headers (array of strings) + */ + public function getFolderWithHttpInfo($folderId) + { + $returnType = '\Brevo\Client\Model\GetFolder'; + $request = $this->getFolderRequest($folderId); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetFolder', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getFolderAsync + * + * Returns a folder's details + * + * @param int $folderId id of the folder (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getFolderAsync($folderId) + { + return $this->getFolderAsyncWithHttpInfo($folderId) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getFolderAsyncWithHttpInfo + * + * Returns a folder's details + * + * @param int $folderId id of the folder (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getFolderAsyncWithHttpInfo($folderId) + { + $returnType = '\Brevo\Client\Model\GetFolder'; + $request = $this->getFolderRequest($folderId); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getFolder' + * + * @param int $folderId id of the folder (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getFolderRequest($folderId) + { + // verify the required parameter 'folderId' is set + if ($folderId === null || (is_array($folderId) && count($folderId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $folderId when calling getFolder' + ); + } + + $resourcePath = '/contacts/folders/{folderId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($folderId !== null) { + $resourcePath = str_replace( + '{' . 'folderId' . '}', + ObjectSerializer::toPathValue($folderId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getFolderLists + * + * Get lists in a folder + * + * @param int $folderId Id of the folder (required) + * @param int $limit Number of documents per page (optional, default to 10) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetFolderLists + */ + public function getFolderLists($folderId, $limit = '10', $offset = '0', $sort = 'desc') + { + list($response) = $this->getFolderListsWithHttpInfo($folderId, $limit, $offset, $sort); + return $response; + } + + /** + * Operation getFolderListsWithHttpInfo + * + * Get lists in a folder + * + * @param int $folderId Id of the folder (required) + * @param int $limit Number of documents per page (optional, default to 10) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetFolderLists, HTTP status code, HTTP response headers (array of strings) + */ + public function getFolderListsWithHttpInfo($folderId, $limit = '10', $offset = '0', $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetFolderLists'; + $request = $this->getFolderListsRequest($folderId, $limit, $offset, $sort); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetFolderLists', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getFolderListsAsync + * + * Get lists in a folder + * + * @param int $folderId Id of the folder (required) + * @param int $limit Number of documents per page (optional, default to 10) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getFolderListsAsync($folderId, $limit = '10', $offset = '0', $sort = 'desc') + { + return $this->getFolderListsAsyncWithHttpInfo($folderId, $limit, $offset, $sort) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getFolderListsAsyncWithHttpInfo + * + * Get lists in a folder + * + * @param int $folderId Id of the folder (required) + * @param int $limit Number of documents per page (optional, default to 10) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getFolderListsAsyncWithHttpInfo($folderId, $limit = '10', $offset = '0', $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetFolderLists'; + $request = $this->getFolderListsRequest($folderId, $limit, $offset, $sort); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getFolderLists' + * + * @param int $folderId Id of the folder (required) + * @param int $limit Number of documents per page (optional, default to 10) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getFolderListsRequest($folderId, $limit = '10', $offset = '0', $sort = 'desc') + { + // verify the required parameter 'folderId' is set + if ($folderId === null || (is_array($folderId) && count($folderId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $folderId when calling getFolderLists' + ); + } + if ($limit !== null && $limit > 50) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling ContactsApi.getFolderLists, must be smaller than or equal to 50.'); + } + if ($limit !== null && $limit < 0) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling ContactsApi.getFolderLists, must be bigger than or equal to 0.'); + } + + + $resourcePath = '/contacts/folders/{folderId}/lists'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); + } + + // path params + if ($folderId !== null) { + $resourcePath = str_replace( + '{' . 'folderId' . '}', + ObjectSerializer::toPathValue($folderId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getFolders + * + * Get all folders + * + * @param int $limit Number of documents per page (required) + * @param int $offset Index of the first document of the page (required) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetFolders + */ + public function getFolders($limit, $offset, $sort = 'desc') + { + list($response) = $this->getFoldersWithHttpInfo($limit, $offset, $sort); + return $response; + } + + /** + * Operation getFoldersWithHttpInfo + * + * Get all folders + * + * @param int $limit Number of documents per page (required) + * @param int $offset Index of the first document of the page (required) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetFolders, HTTP status code, HTTP response headers (array of strings) + */ + public function getFoldersWithHttpInfo($limit, $offset, $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetFolders'; + $request = $this->getFoldersRequest($limit, $offset, $sort); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetFolders', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getFoldersAsync + * + * Get all folders + * + * @param int $limit Number of documents per page (required) + * @param int $offset Index of the first document of the page (required) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getFoldersAsync($limit, $offset, $sort = 'desc') + { + return $this->getFoldersAsyncWithHttpInfo($limit, $offset, $sort) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getFoldersAsyncWithHttpInfo + * + * Get all folders + * + * @param int $limit Number of documents per page (required) + * @param int $offset Index of the first document of the page (required) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getFoldersAsyncWithHttpInfo($limit, $offset, $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetFolders'; + $request = $this->getFoldersRequest($limit, $offset, $sort); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getFolders' + * + * @param int $limit Number of documents per page (required) + * @param int $offset Index of the first document of the page (required) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getFoldersRequest($limit, $offset, $sort = 'desc') + { + // verify the required parameter 'limit' is set + if ($limit === null || (is_array($limit) && count($limit) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $limit when calling getFolders' + ); + } + if ($limit > 50) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling ContactsApi.getFolders, must be smaller than or equal to 50.'); + } + if ($limit < 0) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling ContactsApi.getFolders, must be bigger than or equal to 0.'); + } + + // verify the required parameter 'offset' is set + if ($offset === null || (is_array($offset) && count($offset) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $offset when calling getFolders' + ); + } + + $resourcePath = '/contacts/folders'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getList + * + * Get a list's details + * + * @param int $listId Id of the list (required) + * @param string $startDate Mandatory if endDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id.Prefer to pass your timezone in date-time format for accurate result (optional) + * @param string $endDate Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id.Prefer to pass your timezone in date-time format for accurate result (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetExtendedList + */ + public function getList($listId, $startDate = null, $endDate = null) + { + list($response) = $this->getListWithHttpInfo($listId, $startDate, $endDate); + return $response; + } + + /** + * Operation getListWithHttpInfo + * + * Get a list's details + * + * @param int $listId Id of the list (required) + * @param string $startDate Mandatory if endDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id.Prefer to pass your timezone in date-time format for accurate result (optional) + * @param string $endDate Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id.Prefer to pass your timezone in date-time format for accurate result (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetExtendedList, HTTP status code, HTTP response headers (array of strings) + */ + public function getListWithHttpInfo($listId, $startDate = null, $endDate = null) + { + $returnType = '\Brevo\Client\Model\GetExtendedList'; + $request = $this->getListRequest($listId, $startDate, $endDate); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetExtendedList', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getListAsync + * + * Get a list's details + * + * @param int $listId Id of the list (required) + * @param string $startDate Mandatory if endDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id.Prefer to pass your timezone in date-time format for accurate result (optional) + * @param string $endDate Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id.Prefer to pass your timezone in date-time format for accurate result (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getListAsync($listId, $startDate = null, $endDate = null) + { + return $this->getListAsyncWithHttpInfo($listId, $startDate, $endDate) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getListAsyncWithHttpInfo + * + * Get a list's details + * + * @param int $listId Id of the list (required) + * @param string $startDate Mandatory if endDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id.Prefer to pass your timezone in date-time format for accurate result (optional) + * @param string $endDate Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id.Prefer to pass your timezone in date-time format for accurate result (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getListAsyncWithHttpInfo($listId, $startDate = null, $endDate = null) + { + $returnType = '\Brevo\Client\Model\GetExtendedList'; + $request = $this->getListRequest($listId, $startDate, $endDate); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getList' + * + * @param int $listId Id of the list (required) + * @param string $startDate Mandatory if endDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id.Prefer to pass your timezone in date-time format for accurate result (optional) + * @param string $endDate Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id.Prefer to pass your timezone in date-time format for accurate result (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getListRequest($listId, $startDate = null, $endDate = null) + { + // verify the required parameter 'listId' is set + if ($listId === null || (is_array($listId) && count($listId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $listId when calling getList' + ); + } + + $resourcePath = '/contacts/lists/{listId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($startDate !== null) { + $queryParams['startDate'] = ObjectSerializer::toQueryValue($startDate); + } + // query params + if ($endDate !== null) { + $queryParams['endDate'] = ObjectSerializer::toQueryValue($endDate); + } + + // path params + if ($listId !== null) { + $resourcePath = str_replace( + '{' . 'listId' . '}', + ObjectSerializer::toPathValue($listId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getLists + * + * Get all the lists + * + * @param int $limit Number of documents per page (optional, default to 10) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetLists + */ + public function getLists($limit = '10', $offset = '0', $sort = 'desc') + { + list($response) = $this->getListsWithHttpInfo($limit, $offset, $sort); + return $response; + } + + /** + * Operation getListsWithHttpInfo + * + * Get all the lists + * + * @param int $limit Number of documents per page (optional, default to 10) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetLists, HTTP status code, HTTP response headers (array of strings) + */ + public function getListsWithHttpInfo($limit = '10', $offset = '0', $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetLists'; + $request = $this->getListsRequest($limit, $offset, $sort); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetLists', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getListsAsync + * + * Get all the lists + * + * @param int $limit Number of documents per page (optional, default to 10) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getListsAsync($limit = '10', $offset = '0', $sort = 'desc') + { + return $this->getListsAsyncWithHttpInfo($limit, $offset, $sort) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getListsAsyncWithHttpInfo + * + * Get all the lists + * + * @param int $limit Number of documents per page (optional, default to 10) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getListsAsyncWithHttpInfo($limit = '10', $offset = '0', $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetLists'; + $request = $this->getListsRequest($limit, $offset, $sort); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getLists' + * + * @param int $limit Number of documents per page (optional, default to 10) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getListsRequest($limit = '10', $offset = '0', $sort = 'desc') + { + if ($limit !== null && $limit > 50) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling ContactsApi.getLists, must be smaller than or equal to 50.'); + } + if ($limit !== null && $limit < 0) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling ContactsApi.getLists, must be bigger than or equal to 0.'); + } + + + $resourcePath = '/contacts/lists'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getSegments + * + * Get all the Segments + * + * @param int $limit Number of documents per page (required) + * @param int $offset Index of the first document of the page (required) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetSegments + */ + public function getSegments($limit, $offset, $sort = 'desc') + { + list($response) = $this->getSegmentsWithHttpInfo($limit, $offset, $sort); + return $response; + } + + /** + * Operation getSegmentsWithHttpInfo + * + * Get all the Segments + * + * @param int $limit Number of documents per page (required) + * @param int $offset Index of the first document of the page (required) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetSegments, HTTP status code, HTTP response headers (array of strings) + */ + public function getSegmentsWithHttpInfo($limit, $offset, $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetSegments'; + $request = $this->getSegmentsRequest($limit, $offset, $sort); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetSegments', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getSegmentsAsync + * + * Get all the Segments + * + * @param int $limit Number of documents per page (required) + * @param int $offset Index of the first document of the page (required) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getSegmentsAsync($limit, $offset, $sort = 'desc') + { + return $this->getSegmentsAsyncWithHttpInfo($limit, $offset, $sort) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getSegmentsAsyncWithHttpInfo + * + * Get all the Segments + * + * @param int $limit Number of documents per page (required) + * @param int $offset Index of the first document of the page (required) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getSegmentsAsyncWithHttpInfo($limit, $offset, $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetSegments'; + $request = $this->getSegmentsRequest($limit, $offset, $sort); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getSegments' + * + * @param int $limit Number of documents per page (required) + * @param int $offset Index of the first document of the page (required) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getSegmentsRequest($limit, $offset, $sort = 'desc') + { + // verify the required parameter 'limit' is set + if ($limit === null || (is_array($limit) && count($limit) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $limit when calling getSegments' + ); + } + if ($limit > 50) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling ContactsApi.getSegments, must be smaller than or equal to 50.'); + } + if ($limit < 0) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling ContactsApi.getSegments, must be bigger than or equal to 0.'); + } + + // verify the required parameter 'offset' is set + if ($offset === null || (is_array($offset) && count($offset) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $offset when calling getSegments' + ); + } + + $resourcePath = '/contacts/segments'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation importContacts + * + * Import contacts + * + * @param \Brevo\Client\Model\RequestContactImport $requestContactImport Values to import contacts in Brevo. To know more about the expected format, please have a look at ``https://help.brevo.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns`` (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\CreatedProcessId + */ + public function importContacts($requestContactImport) + { + list($response) = $this->importContactsWithHttpInfo($requestContactImport); + return $response; + } + + /** + * Operation importContactsWithHttpInfo + * + * Import contacts + * + * @param \Brevo\Client\Model\RequestContactImport $requestContactImport Values to import contacts in Brevo. To know more about the expected format, please have a look at ``https://help.brevo.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns`` (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\CreatedProcessId, HTTP status code, HTTP response headers (array of strings) + */ + public function importContactsWithHttpInfo($requestContactImport) + { + $returnType = '\Brevo\Client\Model\CreatedProcessId'; + $request = $this->importContactsRequest($requestContactImport); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 202: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\CreatedProcessId', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation importContactsAsync + * + * Import contacts + * + * @param \Brevo\Client\Model\RequestContactImport $requestContactImport Values to import contacts in Brevo. To know more about the expected format, please have a look at ``https://help.brevo.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns`` (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function importContactsAsync($requestContactImport) + { + return $this->importContactsAsyncWithHttpInfo($requestContactImport) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation importContactsAsyncWithHttpInfo + * + * Import contacts + * + * @param \Brevo\Client\Model\RequestContactImport $requestContactImport Values to import contacts in Brevo. To know more about the expected format, please have a look at ``https://help.brevo.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns`` (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function importContactsAsyncWithHttpInfo($requestContactImport) + { + $returnType = '\Brevo\Client\Model\CreatedProcessId'; + $request = $this->importContactsRequest($requestContactImport); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'importContacts' + * + * @param \Brevo\Client\Model\RequestContactImport $requestContactImport Values to import contacts in Brevo. To know more about the expected format, please have a look at ``https://help.brevo.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns`` (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function importContactsRequest($requestContactImport) + { + // verify the required parameter 'requestContactImport' is set + if ($requestContactImport === null || (is_array($requestContactImport) && count($requestContactImport) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $requestContactImport when calling importContacts' + ); + } + + $resourcePath = '/contacts/import'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($requestContactImport)) { + $_tempBody = $requestContactImport; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation removeContactFromList + * + * Delete a contact from a list + * + * @param int $listId Id of the list (required) + * @param \Brevo\Client\Model\RemoveContactFromList $contactEmails Emails addresses OR IDs of the contacts (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\PostContactInfo + */ + public function removeContactFromList($listId, $contactEmails) + { + list($response) = $this->removeContactFromListWithHttpInfo($listId, $contactEmails); + return $response; + } + + /** + * Operation removeContactFromListWithHttpInfo + * + * Delete a contact from a list + * + * @param int $listId Id of the list (required) + * @param \Brevo\Client\Model\RemoveContactFromList $contactEmails Emails addresses OR IDs of the contacts (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\PostContactInfo, HTTP status code, HTTP response headers (array of strings) + */ + public function removeContactFromListWithHttpInfo($listId, $contactEmails) + { + $returnType = '\Brevo\Client\Model\PostContactInfo'; + $request = $this->removeContactFromListRequest($listId, $contactEmails); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\PostContactInfo', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation removeContactFromListAsync + * + * Delete a contact from a list + * + * @param int $listId Id of the list (required) + * @param \Brevo\Client\Model\RemoveContactFromList $contactEmails Emails addresses OR IDs of the contacts (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function removeContactFromListAsync($listId, $contactEmails) + { + return $this->removeContactFromListAsyncWithHttpInfo($listId, $contactEmails) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation removeContactFromListAsyncWithHttpInfo + * + * Delete a contact from a list + * + * @param int $listId Id of the list (required) + * @param \Brevo\Client\Model\RemoveContactFromList $contactEmails Emails addresses OR IDs of the contacts (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function removeContactFromListAsyncWithHttpInfo($listId, $contactEmails) + { + $returnType = '\Brevo\Client\Model\PostContactInfo'; + $request = $this->removeContactFromListRequest($listId, $contactEmails); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'removeContactFromList' + * + * @param int $listId Id of the list (required) + * @param \Brevo\Client\Model\RemoveContactFromList $contactEmails Emails addresses OR IDs of the contacts (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function removeContactFromListRequest($listId, $contactEmails) + { + // verify the required parameter 'listId' is set + if ($listId === null || (is_array($listId) && count($listId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $listId when calling removeContactFromList' + ); + } + // verify the required parameter 'contactEmails' is set + if ($contactEmails === null || (is_array($contactEmails) && count($contactEmails) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $contactEmails when calling removeContactFromList' + ); + } + + $resourcePath = '/contacts/lists/{listId}/contacts/remove'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($listId !== null) { + $resourcePath = str_replace( + '{' . 'listId' . '}', + ObjectSerializer::toPathValue($listId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($contactEmails)) { + $_tempBody = $contactEmails; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation requestContactExport + * + * Export contacts + * + * @param \Brevo\Client\Model\RequestContactExport $requestContactExport Values to request a contact export (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\CreatedProcessId + */ + public function requestContactExport($requestContactExport) + { + list($response) = $this->requestContactExportWithHttpInfo($requestContactExport); + return $response; + } + + /** + * Operation requestContactExportWithHttpInfo + * + * Export contacts + * + * @param \Brevo\Client\Model\RequestContactExport $requestContactExport Values to request a contact export (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\CreatedProcessId, HTTP status code, HTTP response headers (array of strings) + */ + public function requestContactExportWithHttpInfo($requestContactExport) + { + $returnType = '\Brevo\Client\Model\CreatedProcessId'; + $request = $this->requestContactExportRequest($requestContactExport); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 202: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\CreatedProcessId', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation requestContactExportAsync + * + * Export contacts + * + * @param \Brevo\Client\Model\RequestContactExport $requestContactExport Values to request a contact export (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function requestContactExportAsync($requestContactExport) + { + return $this->requestContactExportAsyncWithHttpInfo($requestContactExport) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation requestContactExportAsyncWithHttpInfo + * + * Export contacts + * + * @param \Brevo\Client\Model\RequestContactExport $requestContactExport Values to request a contact export (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function requestContactExportAsyncWithHttpInfo($requestContactExport) + { + $returnType = '\Brevo\Client\Model\CreatedProcessId'; + $request = $this->requestContactExportRequest($requestContactExport); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'requestContactExport' + * + * @param \Brevo\Client\Model\RequestContactExport $requestContactExport Values to request a contact export (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function requestContactExportRequest($requestContactExport) + { + // verify the required parameter 'requestContactExport' is set + if ($requestContactExport === null || (is_array($requestContactExport) && count($requestContactExport) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $requestContactExport when calling requestContactExport' + ); + } + + $resourcePath = '/contacts/export'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($requestContactExport)) { + $_tempBody = $requestContactExport; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation updateAttribute + * + * Update contact attribute + * + * @param string $attributeCategory Category of the attribute (required) + * @param string $attributeName Name of the existing attribute (required) + * @param \Brevo\Client\Model\UpdateAttribute $updateAttribute Values to update an attribute (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function updateAttribute($attributeCategory, $attributeName, $updateAttribute) + { + $this->updateAttributeWithHttpInfo($attributeCategory, $attributeName, $updateAttribute); + } + + /** + * Operation updateAttributeWithHttpInfo + * + * Update contact attribute + * + * @param string $attributeCategory Category of the attribute (required) + * @param string $attributeName Name of the existing attribute (required) + * @param \Brevo\Client\Model\UpdateAttribute $updateAttribute Values to update an attribute (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function updateAttributeWithHttpInfo($attributeCategory, $attributeName, $updateAttribute) + { + $returnType = ''; + $request = $this->updateAttributeRequest($attributeCategory, $attributeName, $updateAttribute); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation updateAttributeAsync + * + * Update contact attribute + * + * @param string $attributeCategory Category of the attribute (required) + * @param string $attributeName Name of the existing attribute (required) + * @param \Brevo\Client\Model\UpdateAttribute $updateAttribute Values to update an attribute (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateAttributeAsync($attributeCategory, $attributeName, $updateAttribute) + { + return $this->updateAttributeAsyncWithHttpInfo($attributeCategory, $attributeName, $updateAttribute) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateAttributeAsyncWithHttpInfo + * + * Update contact attribute + * + * @param string $attributeCategory Category of the attribute (required) + * @param string $attributeName Name of the existing attribute (required) + * @param \Brevo\Client\Model\UpdateAttribute $updateAttribute Values to update an attribute (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateAttributeAsyncWithHttpInfo($attributeCategory, $attributeName, $updateAttribute) + { + $returnType = ''; + $request = $this->updateAttributeRequest($attributeCategory, $attributeName, $updateAttribute); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'updateAttribute' + * + * @param string $attributeCategory Category of the attribute (required) + * @param string $attributeName Name of the existing attribute (required) + * @param \Brevo\Client\Model\UpdateAttribute $updateAttribute Values to update an attribute (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function updateAttributeRequest($attributeCategory, $attributeName, $updateAttribute) + { + // verify the required parameter 'attributeCategory' is set + if ($attributeCategory === null || (is_array($attributeCategory) && count($attributeCategory) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $attributeCategory when calling updateAttribute' + ); + } + // verify the required parameter 'attributeName' is set + if ($attributeName === null || (is_array($attributeName) && count($attributeName) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $attributeName when calling updateAttribute' + ); + } + // verify the required parameter 'updateAttribute' is set + if ($updateAttribute === null || (is_array($updateAttribute) && count($updateAttribute) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $updateAttribute when calling updateAttribute' + ); + } + + $resourcePath = '/contacts/attributes/{attributeCategory}/{attributeName}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($attributeCategory !== null) { + $resourcePath = str_replace( + '{' . 'attributeCategory' . '}', + ObjectSerializer::toPathValue($attributeCategory), + $resourcePath + ); + } + // path params + if ($attributeName !== null) { + $resourcePath = str_replace( + '{' . 'attributeName' . '}', + ObjectSerializer::toPathValue($attributeName), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($updateAttribute)) { + $_tempBody = $updateAttribute; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation updateBatchContacts + * + * Update multiple contacts + * + * @param \Brevo\Client\Model\UpdateBatchContacts $updateBatchContacts Values to update multiple contacts (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function updateBatchContacts($updateBatchContacts) + { + $this->updateBatchContactsWithHttpInfo($updateBatchContacts); + } + + /** + * Operation updateBatchContactsWithHttpInfo + * + * Update multiple contacts + * + * @param \Brevo\Client\Model\UpdateBatchContacts $updateBatchContacts Values to update multiple contacts (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function updateBatchContactsWithHttpInfo($updateBatchContacts) + { + $returnType = ''; + $request = $this->updateBatchContactsRequest($updateBatchContacts); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation updateBatchContactsAsync + * + * Update multiple contacts + * + * @param \Brevo\Client\Model\UpdateBatchContacts $updateBatchContacts Values to update multiple contacts (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateBatchContactsAsync($updateBatchContacts) + { + return $this->updateBatchContactsAsyncWithHttpInfo($updateBatchContacts) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateBatchContactsAsyncWithHttpInfo + * + * Update multiple contacts + * + * @param \Brevo\Client\Model\UpdateBatchContacts $updateBatchContacts Values to update multiple contacts (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateBatchContactsAsyncWithHttpInfo($updateBatchContacts) + { + $returnType = ''; + $request = $this->updateBatchContactsRequest($updateBatchContacts); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'updateBatchContacts' + * + * @param \Brevo\Client\Model\UpdateBatchContacts $updateBatchContacts Values to update multiple contacts (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function updateBatchContactsRequest($updateBatchContacts) + { + // verify the required parameter 'updateBatchContacts' is set + if ($updateBatchContacts === null || (is_array($updateBatchContacts) && count($updateBatchContacts) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $updateBatchContacts when calling updateBatchContacts' + ); + } + + $resourcePath = '/contacts/batch'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($updateBatchContacts)) { + $_tempBody = $updateBatchContacts; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation updateContact + * + * Update a contact + * + * @param string $identifier Email (urlencoded) OR ID of the contact (required) + * @param \Brevo\Client\Model\UpdateContact $updateContact Values to update a contact (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function updateContact($identifier, $updateContact) + { + $this->updateContactWithHttpInfo($identifier, $updateContact); + } + + /** + * Operation updateContactWithHttpInfo + * + * Update a contact + * + * @param string $identifier Email (urlencoded) OR ID of the contact (required) + * @param \Brevo\Client\Model\UpdateContact $updateContact Values to update a contact (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function updateContactWithHttpInfo($identifier, $updateContact) + { + $returnType = ''; + $request = $this->updateContactRequest($identifier, $updateContact); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation updateContactAsync + * + * Update a contact + * + * @param string $identifier Email (urlencoded) OR ID of the contact (required) + * @param \Brevo\Client\Model\UpdateContact $updateContact Values to update a contact (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateContactAsync($identifier, $updateContact) + { + return $this->updateContactAsyncWithHttpInfo($identifier, $updateContact) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateContactAsyncWithHttpInfo + * + * Update a contact + * + * @param string $identifier Email (urlencoded) OR ID of the contact (required) + * @param \Brevo\Client\Model\UpdateContact $updateContact Values to update a contact (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateContactAsyncWithHttpInfo($identifier, $updateContact) + { + $returnType = ''; + $request = $this->updateContactRequest($identifier, $updateContact); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'updateContact' + * + * @param string $identifier Email (urlencoded) OR ID of the contact (required) + * @param \Brevo\Client\Model\UpdateContact $updateContact Values to update a contact (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function updateContactRequest($identifier, $updateContact) + { + // verify the required parameter 'identifier' is set + if ($identifier === null || (is_array($identifier) && count($identifier) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $identifier when calling updateContact' + ); + } + // verify the required parameter 'updateContact' is set + if ($updateContact === null || (is_array($updateContact) && count($updateContact) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $updateContact when calling updateContact' + ); + } + + $resourcePath = '/contacts/{identifier}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($identifier !== null) { + $resourcePath = str_replace( + '{' . 'identifier' . '}', + ObjectSerializer::toPathValue($identifier), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($updateContact)) { + $_tempBody = $updateContact; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation updateFolder + * + * Update a folder + * + * @param int $folderId Id of the folder (required) + * @param \Brevo\Client\Model\CreateUpdateFolder $updateFolder Name of the folder (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function updateFolder($folderId, $updateFolder) + { + $this->updateFolderWithHttpInfo($folderId, $updateFolder); + } + + /** + * Operation updateFolderWithHttpInfo + * + * Update a folder + * + * @param int $folderId Id of the folder (required) + * @param \Brevo\Client\Model\CreateUpdateFolder $updateFolder Name of the folder (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function updateFolderWithHttpInfo($folderId, $updateFolder) + { + $returnType = ''; + $request = $this->updateFolderRequest($folderId, $updateFolder); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation updateFolderAsync + * + * Update a folder + * + * @param int $folderId Id of the folder (required) + * @param \Brevo\Client\Model\CreateUpdateFolder $updateFolder Name of the folder (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateFolderAsync($folderId, $updateFolder) + { + return $this->updateFolderAsyncWithHttpInfo($folderId, $updateFolder) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateFolderAsyncWithHttpInfo + * + * Update a folder + * + * @param int $folderId Id of the folder (required) + * @param \Brevo\Client\Model\CreateUpdateFolder $updateFolder Name of the folder (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateFolderAsyncWithHttpInfo($folderId, $updateFolder) + { + $returnType = ''; + $request = $this->updateFolderRequest($folderId, $updateFolder); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'updateFolder' + * + * @param int $folderId Id of the folder (required) + * @param \Brevo\Client\Model\CreateUpdateFolder $updateFolder Name of the folder (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function updateFolderRequest($folderId, $updateFolder) + { + // verify the required parameter 'folderId' is set + if ($folderId === null || (is_array($folderId) && count($folderId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $folderId when calling updateFolder' + ); + } + // verify the required parameter 'updateFolder' is set + if ($updateFolder === null || (is_array($updateFolder) && count($updateFolder) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $updateFolder when calling updateFolder' + ); + } + + $resourcePath = '/contacts/folders/{folderId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($folderId !== null) { + $resourcePath = str_replace( + '{' . 'folderId' . '}', + ObjectSerializer::toPathValue($folderId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($updateFolder)) { + $_tempBody = $updateFolder; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation updateList + * + * Update a list + * + * @param int $listId Id of the list (required) + * @param \Brevo\Client\Model\UpdateList $updateList Values to update a list (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function updateList($listId, $updateList) + { + $this->updateListWithHttpInfo($listId, $updateList); + } + + /** + * Operation updateListWithHttpInfo + * + * Update a list + * + * @param int $listId Id of the list (required) + * @param \Brevo\Client\Model\UpdateList $updateList Values to update a list (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function updateListWithHttpInfo($listId, $updateList) + { + $returnType = ''; + $request = $this->updateListRequest($listId, $updateList); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation updateListAsync + * + * Update a list + * + * @param int $listId Id of the list (required) + * @param \Brevo\Client\Model\UpdateList $updateList Values to update a list (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateListAsync($listId, $updateList) + { + return $this->updateListAsyncWithHttpInfo($listId, $updateList) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateListAsyncWithHttpInfo + * + * Update a list + * + * @param int $listId Id of the list (required) + * @param \Brevo\Client\Model\UpdateList $updateList Values to update a list (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateListAsyncWithHttpInfo($listId, $updateList) + { + $returnType = ''; + $request = $this->updateListRequest($listId, $updateList); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'updateList' + * + * @param int $listId Id of the list (required) + * @param \Brevo\Client\Model\UpdateList $updateList Values to update a list (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function updateListRequest($listId, $updateList) + { + // verify the required parameter 'listId' is set + if ($listId === null || (is_array($listId) && count($listId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $listId when calling updateList' + ); + } + // verify the required parameter 'updateList' is set + if ($updateList === null || (is_array($updateList) && count($updateList) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $updateList when calling updateList' + ); + } + + $resourcePath = '/contacts/lists/{listId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($listId !== null) { + $resourcePath = str_replace( + '{' . 'listId' . '}', + ObjectSerializer::toPathValue($listId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($updateList)) { + $_tempBody = $updateList; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/vendor/getbrevo/brevo-php/lib/Api/ConversationsApi.php b/vendor/getbrevo/brevo-php/lib/Api/ConversationsApi.php new file mode 100644 index 0000000..570d4c5 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Api/ConversationsApi.php @@ -0,0 +1,2635 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation conversationsAgentOnlinePingPost + * + * Sets agent’s status to online for 2-3 minutes + * + * @param \Brevo\Client\Model\Body14 $body Agent fields. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function conversationsAgentOnlinePingPost($body) + { + $this->conversationsAgentOnlinePingPostWithHttpInfo($body); + } + + /** + * Operation conversationsAgentOnlinePingPostWithHttpInfo + * + * Sets agent’s status to online for 2-3 minutes + * + * @param \Brevo\Client\Model\Body14 $body Agent fields. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function conversationsAgentOnlinePingPostWithHttpInfo($body) + { + $returnType = ''; + $request = $this->conversationsAgentOnlinePingPostRequest($body); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation conversationsAgentOnlinePingPostAsync + * + * Sets agent’s status to online for 2-3 minutes + * + * @param \Brevo\Client\Model\Body14 $body Agent fields. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function conversationsAgentOnlinePingPostAsync($body) + { + return $this->conversationsAgentOnlinePingPostAsyncWithHttpInfo($body) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation conversationsAgentOnlinePingPostAsyncWithHttpInfo + * + * Sets agent’s status to online for 2-3 minutes + * + * @param \Brevo\Client\Model\Body14 $body Agent fields. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function conversationsAgentOnlinePingPostAsyncWithHttpInfo($body) + { + $returnType = ''; + $request = $this->conversationsAgentOnlinePingPostRequest($body); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'conversationsAgentOnlinePingPost' + * + * @param \Brevo\Client\Model\Body14 $body Agent fields. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function conversationsAgentOnlinePingPostRequest($body) + { + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $body when calling conversationsAgentOnlinePingPost' + ); + } + + $resourcePath = '/conversations/agentOnlinePing'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation conversationsMessagesIdDelete + * + * Delete a message sent by an agent + * + * @param string $id ID of the message (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function conversationsMessagesIdDelete($id) + { + $this->conversationsMessagesIdDeleteWithHttpInfo($id); + } + + /** + * Operation conversationsMessagesIdDeleteWithHttpInfo + * + * Delete a message sent by an agent + * + * @param string $id ID of the message (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function conversationsMessagesIdDeleteWithHttpInfo($id) + { + $returnType = ''; + $request = $this->conversationsMessagesIdDeleteRequest($id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation conversationsMessagesIdDeleteAsync + * + * Delete a message sent by an agent + * + * @param string $id ID of the message (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function conversationsMessagesIdDeleteAsync($id) + { + return $this->conversationsMessagesIdDeleteAsyncWithHttpInfo($id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation conversationsMessagesIdDeleteAsyncWithHttpInfo + * + * Delete a message sent by an agent + * + * @param string $id ID of the message (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function conversationsMessagesIdDeleteAsyncWithHttpInfo($id) + { + $returnType = ''; + $request = $this->conversationsMessagesIdDeleteRequest($id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'conversationsMessagesIdDelete' + * + * @param string $id ID of the message (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function conversationsMessagesIdDeleteRequest($id) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling conversationsMessagesIdDelete' + ); + } + + $resourcePath = '/conversations/messages/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation conversationsMessagesIdGet + * + * Get a message + * + * @param string $id ID of the message (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\ConversationsMessage + */ + public function conversationsMessagesIdGet($id) + { + list($response) = $this->conversationsMessagesIdGetWithHttpInfo($id); + return $response; + } + + /** + * Operation conversationsMessagesIdGetWithHttpInfo + * + * Get a message + * + * @param string $id ID of the message (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\ConversationsMessage, HTTP status code, HTTP response headers (array of strings) + */ + public function conversationsMessagesIdGetWithHttpInfo($id) + { + $returnType = '\Brevo\Client\Model\ConversationsMessage'; + $request = $this->conversationsMessagesIdGetRequest($id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ConversationsMessage', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation conversationsMessagesIdGetAsync + * + * Get a message + * + * @param string $id ID of the message (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function conversationsMessagesIdGetAsync($id) + { + return $this->conversationsMessagesIdGetAsyncWithHttpInfo($id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation conversationsMessagesIdGetAsyncWithHttpInfo + * + * Get a message + * + * @param string $id ID of the message (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function conversationsMessagesIdGetAsyncWithHttpInfo($id) + { + $returnType = '\Brevo\Client\Model\ConversationsMessage'; + $request = $this->conversationsMessagesIdGetRequest($id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'conversationsMessagesIdGet' + * + * @param string $id ID of the message (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function conversationsMessagesIdGetRequest($id) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling conversationsMessagesIdGet' + ); + } + + $resourcePath = '/conversations/messages/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation conversationsMessagesIdPut + * + * Update a message sent by an agent + * + * @param string $id ID of the message (required) + * @param \Brevo\Client\Model\Body11 $body body (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\ConversationsMessage + */ + public function conversationsMessagesIdPut($id, $body = null) + { + list($response) = $this->conversationsMessagesIdPutWithHttpInfo($id, $body); + return $response; + } + + /** + * Operation conversationsMessagesIdPutWithHttpInfo + * + * Update a message sent by an agent + * + * @param string $id ID of the message (required) + * @param \Brevo\Client\Model\Body11 $body (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\ConversationsMessage, HTTP status code, HTTP response headers (array of strings) + */ + public function conversationsMessagesIdPutWithHttpInfo($id, $body = null) + { + $returnType = '\Brevo\Client\Model\ConversationsMessage'; + $request = $this->conversationsMessagesIdPutRequest($id, $body); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ConversationsMessage', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation conversationsMessagesIdPutAsync + * + * Update a message sent by an agent + * + * @param string $id ID of the message (required) + * @param \Brevo\Client\Model\Body11 $body (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function conversationsMessagesIdPutAsync($id, $body = null) + { + return $this->conversationsMessagesIdPutAsyncWithHttpInfo($id, $body) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation conversationsMessagesIdPutAsyncWithHttpInfo + * + * Update a message sent by an agent + * + * @param string $id ID of the message (required) + * @param \Brevo\Client\Model\Body11 $body (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function conversationsMessagesIdPutAsyncWithHttpInfo($id, $body = null) + { + $returnType = '\Brevo\Client\Model\ConversationsMessage'; + $request = $this->conversationsMessagesIdPutRequest($id, $body); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'conversationsMessagesIdPut' + * + * @param string $id ID of the message (required) + * @param \Brevo\Client\Model\Body11 $body (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function conversationsMessagesIdPutRequest($id, $body = null) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling conversationsMessagesIdPut' + ); + } + + $resourcePath = '/conversations/messages/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation conversationsMessagesPost + * + * Send a message as an agent + * + * @param \Brevo\Client\Model\Body10 $body Message fields. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\ConversationsMessage + */ + public function conversationsMessagesPost($body) + { + list($response) = $this->conversationsMessagesPostWithHttpInfo($body); + return $response; + } + + /** + * Operation conversationsMessagesPostWithHttpInfo + * + * Send a message as an agent + * + * @param \Brevo\Client\Model\Body10 $body Message fields. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\ConversationsMessage, HTTP status code, HTTP response headers (array of strings) + */ + public function conversationsMessagesPostWithHttpInfo($body) + { + $returnType = '\Brevo\Client\Model\ConversationsMessage'; + $request = $this->conversationsMessagesPostRequest($body); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ConversationsMessage', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation conversationsMessagesPostAsync + * + * Send a message as an agent + * + * @param \Brevo\Client\Model\Body10 $body Message fields. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function conversationsMessagesPostAsync($body) + { + return $this->conversationsMessagesPostAsyncWithHttpInfo($body) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation conversationsMessagesPostAsyncWithHttpInfo + * + * Send a message as an agent + * + * @param \Brevo\Client\Model\Body10 $body Message fields. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function conversationsMessagesPostAsyncWithHttpInfo($body) + { + $returnType = '\Brevo\Client\Model\ConversationsMessage'; + $request = $this->conversationsMessagesPostRequest($body); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'conversationsMessagesPost' + * + * @param \Brevo\Client\Model\Body10 $body Message fields. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function conversationsMessagesPostRequest($body) + { + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $body when calling conversationsMessagesPost' + ); + } + + $resourcePath = '/conversations/messages'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation conversationsPushedMessagesIdDelete + * + * Delete an automated message + * + * @param string $id ID of the message (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function conversationsPushedMessagesIdDelete($id) + { + $this->conversationsPushedMessagesIdDeleteWithHttpInfo($id); + } + + /** + * Operation conversationsPushedMessagesIdDeleteWithHttpInfo + * + * Delete an automated message + * + * @param string $id ID of the message (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function conversationsPushedMessagesIdDeleteWithHttpInfo($id) + { + $returnType = ''; + $request = $this->conversationsPushedMessagesIdDeleteRequest($id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation conversationsPushedMessagesIdDeleteAsync + * + * Delete an automated message + * + * @param string $id ID of the message (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function conversationsPushedMessagesIdDeleteAsync($id) + { + return $this->conversationsPushedMessagesIdDeleteAsyncWithHttpInfo($id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation conversationsPushedMessagesIdDeleteAsyncWithHttpInfo + * + * Delete an automated message + * + * @param string $id ID of the message (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function conversationsPushedMessagesIdDeleteAsyncWithHttpInfo($id) + { + $returnType = ''; + $request = $this->conversationsPushedMessagesIdDeleteRequest($id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'conversationsPushedMessagesIdDelete' + * + * @param string $id ID of the message (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function conversationsPushedMessagesIdDeleteRequest($id) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling conversationsPushedMessagesIdDelete' + ); + } + + $resourcePath = '/conversations/pushedMessages/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation conversationsPushedMessagesIdGet + * + * Get an automated message + * + * @param string $id ID of the message sent previously (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\ConversationsMessage + */ + public function conversationsPushedMessagesIdGet($id) + { + list($response) = $this->conversationsPushedMessagesIdGetWithHttpInfo($id); + return $response; + } + + /** + * Operation conversationsPushedMessagesIdGetWithHttpInfo + * + * Get an automated message + * + * @param string $id ID of the message sent previously (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\ConversationsMessage, HTTP status code, HTTP response headers (array of strings) + */ + public function conversationsPushedMessagesIdGetWithHttpInfo($id) + { + $returnType = '\Brevo\Client\Model\ConversationsMessage'; + $request = $this->conversationsPushedMessagesIdGetRequest($id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ConversationsMessage', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation conversationsPushedMessagesIdGetAsync + * + * Get an automated message + * + * @param string $id ID of the message sent previously (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function conversationsPushedMessagesIdGetAsync($id) + { + return $this->conversationsPushedMessagesIdGetAsyncWithHttpInfo($id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation conversationsPushedMessagesIdGetAsyncWithHttpInfo + * + * Get an automated message + * + * @param string $id ID of the message sent previously (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function conversationsPushedMessagesIdGetAsyncWithHttpInfo($id) + { + $returnType = '\Brevo\Client\Model\ConversationsMessage'; + $request = $this->conversationsPushedMessagesIdGetRequest($id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'conversationsPushedMessagesIdGet' + * + * @param string $id ID of the message sent previously (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function conversationsPushedMessagesIdGetRequest($id) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling conversationsPushedMessagesIdGet' + ); + } + + $resourcePath = '/conversations/pushedMessages/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation conversationsPushedMessagesIdPut + * + * Update an automated message + * + * @param string $id ID of the message (required) + * @param \Brevo\Client\Model\Body13 $body body (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\ConversationsMessage + */ + public function conversationsPushedMessagesIdPut($id, $body) + { + list($response) = $this->conversationsPushedMessagesIdPutWithHttpInfo($id, $body); + return $response; + } + + /** + * Operation conversationsPushedMessagesIdPutWithHttpInfo + * + * Update an automated message + * + * @param string $id ID of the message (required) + * @param \Brevo\Client\Model\Body13 $body (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\ConversationsMessage, HTTP status code, HTTP response headers (array of strings) + */ + public function conversationsPushedMessagesIdPutWithHttpInfo($id, $body) + { + $returnType = '\Brevo\Client\Model\ConversationsMessage'; + $request = $this->conversationsPushedMessagesIdPutRequest($id, $body); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ConversationsMessage', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation conversationsPushedMessagesIdPutAsync + * + * Update an automated message + * + * @param string $id ID of the message (required) + * @param \Brevo\Client\Model\Body13 $body (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function conversationsPushedMessagesIdPutAsync($id, $body) + { + return $this->conversationsPushedMessagesIdPutAsyncWithHttpInfo($id, $body) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation conversationsPushedMessagesIdPutAsyncWithHttpInfo + * + * Update an automated message + * + * @param string $id ID of the message (required) + * @param \Brevo\Client\Model\Body13 $body (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function conversationsPushedMessagesIdPutAsyncWithHttpInfo($id, $body) + { + $returnType = '\Brevo\Client\Model\ConversationsMessage'; + $request = $this->conversationsPushedMessagesIdPutRequest($id, $body); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'conversationsPushedMessagesIdPut' + * + * @param string $id ID of the message (required) + * @param \Brevo\Client\Model\Body13 $body (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function conversationsPushedMessagesIdPutRequest($id, $body) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling conversationsPushedMessagesIdPut' + ); + } + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $body when calling conversationsPushedMessagesIdPut' + ); + } + + $resourcePath = '/conversations/pushedMessages/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation conversationsPushedMessagesPost + * + * Send an automated message to a visitor + * + * @param \Brevo\Client\Model\Body12 $body body (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\ConversationsMessage + */ + public function conversationsPushedMessagesPost($body) + { + list($response) = $this->conversationsPushedMessagesPostWithHttpInfo($body); + return $response; + } + + /** + * Operation conversationsPushedMessagesPostWithHttpInfo + * + * Send an automated message to a visitor + * + * @param \Brevo\Client\Model\Body12 $body (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\ConversationsMessage, HTTP status code, HTTP response headers (array of strings) + */ + public function conversationsPushedMessagesPostWithHttpInfo($body) + { + $returnType = '\Brevo\Client\Model\ConversationsMessage'; + $request = $this->conversationsPushedMessagesPostRequest($body); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ConversationsMessage', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation conversationsPushedMessagesPostAsync + * + * Send an automated message to a visitor + * + * @param \Brevo\Client\Model\Body12 $body (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function conversationsPushedMessagesPostAsync($body) + { + return $this->conversationsPushedMessagesPostAsyncWithHttpInfo($body) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation conversationsPushedMessagesPostAsyncWithHttpInfo + * + * Send an automated message to a visitor + * + * @param \Brevo\Client\Model\Body12 $body (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function conversationsPushedMessagesPostAsyncWithHttpInfo($body) + { + $returnType = '\Brevo\Client\Model\ConversationsMessage'; + $request = $this->conversationsPushedMessagesPostRequest($body); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'conversationsPushedMessagesPost' + * + * @param \Brevo\Client\Model\Body12 $body (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function conversationsPushedMessagesPostRequest($body) + { + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $body when calling conversationsPushedMessagesPost' + ); + } + + $resourcePath = '/conversations/pushedMessages'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/vendor/getbrevo/brevo-php/lib/Api/CouponsApi.php b/vendor/getbrevo/brevo-php/lib/Api/CouponsApi.php new file mode 100644 index 0000000..ee2bde7 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Api/CouponsApi.php @@ -0,0 +1,1593 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation createCouponCollection + * + * Create а coupon collection + * + * @param \Brevo\Client\Model\CreateCouponCollection $createCouponCollection Values to create a coupon collection (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\InlineResponse2013 + */ + public function createCouponCollection($createCouponCollection) + { + list($response) = $this->createCouponCollectionWithHttpInfo($createCouponCollection); + return $response; + } + + /** + * Operation createCouponCollectionWithHttpInfo + * + * Create а coupon collection + * + * @param \Brevo\Client\Model\CreateCouponCollection $createCouponCollection Values to create a coupon collection (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\InlineResponse2013, HTTP status code, HTTP response headers (array of strings) + */ + public function createCouponCollectionWithHttpInfo($createCouponCollection) + { + $returnType = '\Brevo\Client\Model\InlineResponse2013'; + $request = $this->createCouponCollectionRequest($createCouponCollection); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\InlineResponse2013', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation createCouponCollectionAsync + * + * Create а coupon collection + * + * @param \Brevo\Client\Model\CreateCouponCollection $createCouponCollection Values to create a coupon collection (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createCouponCollectionAsync($createCouponCollection) + { + return $this->createCouponCollectionAsyncWithHttpInfo($createCouponCollection) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createCouponCollectionAsyncWithHttpInfo + * + * Create а coupon collection + * + * @param \Brevo\Client\Model\CreateCouponCollection $createCouponCollection Values to create a coupon collection (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createCouponCollectionAsyncWithHttpInfo($createCouponCollection) + { + $returnType = '\Brevo\Client\Model\InlineResponse2013'; + $request = $this->createCouponCollectionRequest($createCouponCollection); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createCouponCollection' + * + * @param \Brevo\Client\Model\CreateCouponCollection $createCouponCollection Values to create a coupon collection (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function createCouponCollectionRequest($createCouponCollection) + { + // verify the required parameter 'createCouponCollection' is set + if ($createCouponCollection === null || (is_array($createCouponCollection) && count($createCouponCollection) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $createCouponCollection when calling createCouponCollection' + ); + } + + $resourcePath = '/couponCollections'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($createCouponCollection)) { + $_tempBody = $createCouponCollection; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation createCoupons + * + * Create coupons for a coupon collection + * + * @param \Brevo\Client\Model\CreateCoupons $createCoupons Values to create coupons (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function createCoupons($createCoupons) + { + $this->createCouponsWithHttpInfo($createCoupons); + } + + /** + * Operation createCouponsWithHttpInfo + * + * Create coupons for a coupon collection + * + * @param \Brevo\Client\Model\CreateCoupons $createCoupons Values to create coupons (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function createCouponsWithHttpInfo($createCoupons) + { + $returnType = ''; + $request = $this->createCouponsRequest($createCoupons); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation createCouponsAsync + * + * Create coupons for a coupon collection + * + * @param \Brevo\Client\Model\CreateCoupons $createCoupons Values to create coupons (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createCouponsAsync($createCoupons) + { + return $this->createCouponsAsyncWithHttpInfo($createCoupons) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createCouponsAsyncWithHttpInfo + * + * Create coupons for a coupon collection + * + * @param \Brevo\Client\Model\CreateCoupons $createCoupons Values to create coupons (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createCouponsAsyncWithHttpInfo($createCoupons) + { + $returnType = ''; + $request = $this->createCouponsRequest($createCoupons); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createCoupons' + * + * @param \Brevo\Client\Model\CreateCoupons $createCoupons Values to create coupons (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function createCouponsRequest($createCoupons) + { + // verify the required parameter 'createCoupons' is set + if ($createCoupons === null || (is_array($createCoupons) && count($createCoupons) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $createCoupons when calling createCoupons' + ); + } + + $resourcePath = '/coupons'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($createCoupons)) { + $_tempBody = $createCoupons; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getCouponCollection + * + * Get a coupon collection by id + * + * @param string $id Id of the collection to return (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetCouponCollection + */ + public function getCouponCollection($id) + { + list($response) = $this->getCouponCollectionWithHttpInfo($id); + return $response; + } + + /** + * Operation getCouponCollectionWithHttpInfo + * + * Get a coupon collection by id + * + * @param string $id Id of the collection to return (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetCouponCollection, HTTP status code, HTTP response headers (array of strings) + */ + public function getCouponCollectionWithHttpInfo($id) + { + $returnType = '\Brevo\Client\Model\GetCouponCollection'; + $request = $this->getCouponCollectionRequest($id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetCouponCollection', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getCouponCollectionAsync + * + * Get a coupon collection by id + * + * @param string $id Id of the collection to return (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getCouponCollectionAsync($id) + { + return $this->getCouponCollectionAsyncWithHttpInfo($id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getCouponCollectionAsyncWithHttpInfo + * + * Get a coupon collection by id + * + * @param string $id Id of the collection to return (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getCouponCollectionAsyncWithHttpInfo($id) + { + $returnType = '\Brevo\Client\Model\GetCouponCollection'; + $request = $this->getCouponCollectionRequest($id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getCouponCollection' + * + * @param string $id Id of the collection to return (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getCouponCollectionRequest($id) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling getCouponCollection' + ); + } + + $resourcePath = '/couponCollections/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getCouponCollections + * + * Get all your coupon collections + * + * @param int $limit Number of documents returned per page (optional, default to 50) + * @param int $offset Index of the first document on the page (optional, default to 0) + * @param string $sort Sort the results by creation time in ascending/descending order (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetCouponCollection + */ + public function getCouponCollections($limit = '50', $offset = '0', $sort = 'desc') + { + list($response) = $this->getCouponCollectionsWithHttpInfo($limit, $offset, $sort); + return $response; + } + + /** + * Operation getCouponCollectionsWithHttpInfo + * + * Get all your coupon collections + * + * @param int $limit Number of documents returned per page (optional, default to 50) + * @param int $offset Index of the first document on the page (optional, default to 0) + * @param string $sort Sort the results by creation time in ascending/descending order (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetCouponCollection, HTTP status code, HTTP response headers (array of strings) + */ + public function getCouponCollectionsWithHttpInfo($limit = '50', $offset = '0', $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetCouponCollection'; + $request = $this->getCouponCollectionsRequest($limit, $offset, $sort); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetCouponCollection', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getCouponCollectionsAsync + * + * Get all your coupon collections + * + * @param int $limit Number of documents returned per page (optional, default to 50) + * @param int $offset Index of the first document on the page (optional, default to 0) + * @param string $sort Sort the results by creation time in ascending/descending order (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getCouponCollectionsAsync($limit = '50', $offset = '0', $sort = 'desc') + { + return $this->getCouponCollectionsAsyncWithHttpInfo($limit, $offset, $sort) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getCouponCollectionsAsyncWithHttpInfo + * + * Get all your coupon collections + * + * @param int $limit Number of documents returned per page (optional, default to 50) + * @param int $offset Index of the first document on the page (optional, default to 0) + * @param string $sort Sort the results by creation time in ascending/descending order (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getCouponCollectionsAsyncWithHttpInfo($limit = '50', $offset = '0', $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetCouponCollection'; + $request = $this->getCouponCollectionsRequest($limit, $offset, $sort); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getCouponCollections' + * + * @param int $limit Number of documents returned per page (optional, default to 50) + * @param int $offset Index of the first document on the page (optional, default to 0) + * @param string $sort Sort the results by creation time in ascending/descending order (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getCouponCollectionsRequest($limit = '50', $offset = '0', $sort = 'desc') + { + if ($limit !== null && $limit > 100) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling CouponsApi.getCouponCollections, must be smaller than or equal to 100.'); + } + if ($limit !== null && $limit < 0) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling CouponsApi.getCouponCollections, must be bigger than or equal to 0.'); + } + + if ($offset !== null && $offset < 0) { + throw new \InvalidArgumentException('invalid value for "$offset" when calling CouponsApi.getCouponCollections, must be bigger than or equal to 0.'); + } + + + $resourcePath = '/couponCollections'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation updateCouponCollection + * + * Update a coupon collection by id + * + * @param string $id Id of the collection to update (required) + * @param \Brevo\Client\Model\UpdateCouponCollection $updateCouponCollection Values to update the coupon collection (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\InlineResponse2002 + */ + public function updateCouponCollection($id, $updateCouponCollection) + { + list($response) = $this->updateCouponCollectionWithHttpInfo($id, $updateCouponCollection); + return $response; + } + + /** + * Operation updateCouponCollectionWithHttpInfo + * + * Update a coupon collection by id + * + * @param string $id Id of the collection to update (required) + * @param \Brevo\Client\Model\UpdateCouponCollection $updateCouponCollection Values to update the coupon collection (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\InlineResponse2002, HTTP status code, HTTP response headers (array of strings) + */ + public function updateCouponCollectionWithHttpInfo($id, $updateCouponCollection) + { + $returnType = '\Brevo\Client\Model\InlineResponse2002'; + $request = $this->updateCouponCollectionRequest($id, $updateCouponCollection); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\InlineResponse2002', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation updateCouponCollectionAsync + * + * Update a coupon collection by id + * + * @param string $id Id of the collection to update (required) + * @param \Brevo\Client\Model\UpdateCouponCollection $updateCouponCollection Values to update the coupon collection (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateCouponCollectionAsync($id, $updateCouponCollection) + { + return $this->updateCouponCollectionAsyncWithHttpInfo($id, $updateCouponCollection) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateCouponCollectionAsyncWithHttpInfo + * + * Update a coupon collection by id + * + * @param string $id Id of the collection to update (required) + * @param \Brevo\Client\Model\UpdateCouponCollection $updateCouponCollection Values to update the coupon collection (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateCouponCollectionAsyncWithHttpInfo($id, $updateCouponCollection) + { + $returnType = '\Brevo\Client\Model\InlineResponse2002'; + $request = $this->updateCouponCollectionRequest($id, $updateCouponCollection); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'updateCouponCollection' + * + * @param string $id Id of the collection to update (required) + * @param \Brevo\Client\Model\UpdateCouponCollection $updateCouponCollection Values to update the coupon collection (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function updateCouponCollectionRequest($id, $updateCouponCollection) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling updateCouponCollection' + ); + } + // verify the required parameter 'updateCouponCollection' is set + if ($updateCouponCollection === null || (is_array($updateCouponCollection) && count($updateCouponCollection) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $updateCouponCollection when calling updateCouponCollection' + ); + } + + $resourcePath = '/couponCollections/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($updateCouponCollection)) { + $_tempBody = $updateCouponCollection; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PATCH', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/vendor/getbrevo/brevo-php/lib/Api/DealsApi.php b/vendor/getbrevo/brevo-php/lib/Api/DealsApi.php new file mode 100644 index 0000000..1540c93 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Api/DealsApi.php @@ -0,0 +1,2877 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation crmAttributesDealsGet + * + * Get deal attributes + * + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\DealAttributes + */ + public function crmAttributesDealsGet() + { + list($response) = $this->crmAttributesDealsGetWithHttpInfo(); + return $response; + } + + /** + * Operation crmAttributesDealsGetWithHttpInfo + * + * Get deal attributes + * + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\DealAttributes, HTTP status code, HTTP response headers (array of strings) + */ + public function crmAttributesDealsGetWithHttpInfo() + { + $returnType = '\Brevo\Client\Model\DealAttributes'; + $request = $this->crmAttributesDealsGetRequest(); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\DealAttributes', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation crmAttributesDealsGetAsync + * + * Get deal attributes + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmAttributesDealsGetAsync() + { + return $this->crmAttributesDealsGetAsyncWithHttpInfo() + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation crmAttributesDealsGetAsyncWithHttpInfo + * + * Get deal attributes + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmAttributesDealsGetAsyncWithHttpInfo() + { + $returnType = '\Brevo\Client\Model\DealAttributes'; + $request = $this->crmAttributesDealsGetRequest(); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'crmAttributesDealsGet' + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function crmAttributesDealsGetRequest() + { + + $resourcePath = '/crm/attributes/deals'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation crmDealsGet + * + * Get all deals + * + * @param string $filtersAttributesDealName Filter by attributes. If you have filter for owner on your side please send it as `filters[attributes.deal_owner]`.\" (optional) + * @param string $filtersLinkedCompaniesIds Filter by linked companies ids (optional) + * @param string $filtersLinkedContactsIds Filter by linked companies ids (optional) + * @param int $offset Index of the first document of the page (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) + * @param string $sortBy The field used to sort field names. (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\DealsList + */ + public function crmDealsGet($filtersAttributesDealName = null, $filtersLinkedCompaniesIds = null, $filtersLinkedContactsIds = null, $offset = null, $limit = '50', $sort = null, $sortBy = null) + { + list($response) = $this->crmDealsGetWithHttpInfo($filtersAttributesDealName, $filtersLinkedCompaniesIds, $filtersLinkedContactsIds, $offset, $limit, $sort, $sortBy); + return $response; + } + + /** + * Operation crmDealsGetWithHttpInfo + * + * Get all deals + * + * @param string $filtersAttributesDealName Filter by attributes. If you have filter for owner on your side please send it as `filters[attributes.deal_owner]`.\" (optional) + * @param string $filtersLinkedCompaniesIds Filter by linked companies ids (optional) + * @param string $filtersLinkedContactsIds Filter by linked companies ids (optional) + * @param int $offset Index of the first document of the page (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) + * @param string $sortBy The field used to sort field names. (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\DealsList, HTTP status code, HTTP response headers (array of strings) + */ + public function crmDealsGetWithHttpInfo($filtersAttributesDealName = null, $filtersLinkedCompaniesIds = null, $filtersLinkedContactsIds = null, $offset = null, $limit = '50', $sort = null, $sortBy = null) + { + $returnType = '\Brevo\Client\Model\DealsList'; + $request = $this->crmDealsGetRequest($filtersAttributesDealName, $filtersLinkedCompaniesIds, $filtersLinkedContactsIds, $offset, $limit, $sort, $sortBy); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\DealsList', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation crmDealsGetAsync + * + * Get all deals + * + * @param string $filtersAttributesDealName Filter by attributes. If you have filter for owner on your side please send it as `filters[attributes.deal_owner]`.\" (optional) + * @param string $filtersLinkedCompaniesIds Filter by linked companies ids (optional) + * @param string $filtersLinkedContactsIds Filter by linked companies ids (optional) + * @param int $offset Index of the first document of the page (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) + * @param string $sortBy The field used to sort field names. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmDealsGetAsync($filtersAttributesDealName = null, $filtersLinkedCompaniesIds = null, $filtersLinkedContactsIds = null, $offset = null, $limit = '50', $sort = null, $sortBy = null) + { + return $this->crmDealsGetAsyncWithHttpInfo($filtersAttributesDealName, $filtersLinkedCompaniesIds, $filtersLinkedContactsIds, $offset, $limit, $sort, $sortBy) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation crmDealsGetAsyncWithHttpInfo + * + * Get all deals + * + * @param string $filtersAttributesDealName Filter by attributes. If you have filter for owner on your side please send it as `filters[attributes.deal_owner]`.\" (optional) + * @param string $filtersLinkedCompaniesIds Filter by linked companies ids (optional) + * @param string $filtersLinkedContactsIds Filter by linked companies ids (optional) + * @param int $offset Index of the first document of the page (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) + * @param string $sortBy The field used to sort field names. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmDealsGetAsyncWithHttpInfo($filtersAttributesDealName = null, $filtersLinkedCompaniesIds = null, $filtersLinkedContactsIds = null, $offset = null, $limit = '50', $sort = null, $sortBy = null) + { + $returnType = '\Brevo\Client\Model\DealsList'; + $request = $this->crmDealsGetRequest($filtersAttributesDealName, $filtersLinkedCompaniesIds, $filtersLinkedContactsIds, $offset, $limit, $sort, $sortBy); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'crmDealsGet' + * + * @param string $filtersAttributesDealName Filter by attributes. If you have filter for owner on your side please send it as `filters[attributes.deal_owner]`.\" (optional) + * @param string $filtersLinkedCompaniesIds Filter by linked companies ids (optional) + * @param string $filtersLinkedContactsIds Filter by linked companies ids (optional) + * @param int $offset Index of the first document of the page (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) + * @param string $sortBy The field used to sort field names. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function crmDealsGetRequest($filtersAttributesDealName = null, $filtersLinkedCompaniesIds = null, $filtersLinkedContactsIds = null, $offset = null, $limit = '50', $sort = null, $sortBy = null) + { + + $resourcePath = '/crm/deals'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($filtersAttributesDealName !== null) { + $queryParams['filters[attributes.deal_name]'] = ObjectSerializer::toQueryValue($filtersAttributesDealName); + } + // query params + if ($filtersLinkedCompaniesIds !== null) { + $queryParams['filters[linkedCompaniesIds]'] = ObjectSerializer::toQueryValue($filtersLinkedCompaniesIds); + } + // query params + if ($filtersLinkedContactsIds !== null) { + $queryParams['filters[linkedContactsIds]'] = ObjectSerializer::toQueryValue($filtersLinkedContactsIds); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); + } + // query params + if ($sortBy !== null) { + $queryParams['sortBy'] = ObjectSerializer::toQueryValue($sortBy); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation crmDealsIdDelete + * + * Delete a deal + * + * @param string $id id (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function crmDealsIdDelete($id) + { + $this->crmDealsIdDeleteWithHttpInfo($id); + } + + /** + * Operation crmDealsIdDeleteWithHttpInfo + * + * Delete a deal + * + * @param string $id (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function crmDealsIdDeleteWithHttpInfo($id) + { + $returnType = ''; + $request = $this->crmDealsIdDeleteRequest($id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation crmDealsIdDeleteAsync + * + * Delete a deal + * + * @param string $id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmDealsIdDeleteAsync($id) + { + return $this->crmDealsIdDeleteAsyncWithHttpInfo($id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation crmDealsIdDeleteAsyncWithHttpInfo + * + * Delete a deal + * + * @param string $id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmDealsIdDeleteAsyncWithHttpInfo($id) + { + $returnType = ''; + $request = $this->crmDealsIdDeleteRequest($id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'crmDealsIdDelete' + * + * @param string $id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function crmDealsIdDeleteRequest($id) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling crmDealsIdDelete' + ); + } + + $resourcePath = '/crm/deals/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation crmDealsIdGet + * + * Get a deal + * + * @param string $id id (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\Deal + */ + public function crmDealsIdGet($id) + { + list($response) = $this->crmDealsIdGetWithHttpInfo($id); + return $response; + } + + /** + * Operation crmDealsIdGetWithHttpInfo + * + * Get a deal + * + * @param string $id (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\Deal, HTTP status code, HTTP response headers (array of strings) + */ + public function crmDealsIdGetWithHttpInfo($id) + { + $returnType = '\Brevo\Client\Model\Deal'; + $request = $this->crmDealsIdGetRequest($id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\Deal', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation crmDealsIdGetAsync + * + * Get a deal + * + * @param string $id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmDealsIdGetAsync($id) + { + return $this->crmDealsIdGetAsyncWithHttpInfo($id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation crmDealsIdGetAsyncWithHttpInfo + * + * Get a deal + * + * @param string $id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmDealsIdGetAsyncWithHttpInfo($id) + { + $returnType = '\Brevo\Client\Model\Deal'; + $request = $this->crmDealsIdGetRequest($id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'crmDealsIdGet' + * + * @param string $id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function crmDealsIdGetRequest($id) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling crmDealsIdGet' + ); + } + + $resourcePath = '/crm/deals/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation crmDealsIdPatch + * + * Update a deal + * + * @param string $id id (required) + * @param \Brevo\Client\Model\Body6 $body Updated deal details. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function crmDealsIdPatch($id, $body) + { + $this->crmDealsIdPatchWithHttpInfo($id, $body); + } + + /** + * Operation crmDealsIdPatchWithHttpInfo + * + * Update a deal + * + * @param string $id (required) + * @param \Brevo\Client\Model\Body6 $body Updated deal details. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function crmDealsIdPatchWithHttpInfo($id, $body) + { + $returnType = ''; + $request = $this->crmDealsIdPatchRequest($id, $body); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation crmDealsIdPatchAsync + * + * Update a deal + * + * @param string $id (required) + * @param \Brevo\Client\Model\Body6 $body Updated deal details. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmDealsIdPatchAsync($id, $body) + { + return $this->crmDealsIdPatchAsyncWithHttpInfo($id, $body) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation crmDealsIdPatchAsyncWithHttpInfo + * + * Update a deal + * + * @param string $id (required) + * @param \Brevo\Client\Model\Body6 $body Updated deal details. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmDealsIdPatchAsyncWithHttpInfo($id, $body) + { + $returnType = ''; + $request = $this->crmDealsIdPatchRequest($id, $body); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'crmDealsIdPatch' + * + * @param string $id (required) + * @param \Brevo\Client\Model\Body6 $body Updated deal details. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function crmDealsIdPatchRequest($id, $body) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling crmDealsIdPatch' + ); + } + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $body when calling crmDealsIdPatch' + ); + } + + $resourcePath = '/crm/deals/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PATCH', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation crmDealsLinkUnlinkIdPatch + * + * Link and Unlink a deal with contacts and companies + * + * @param string $id id (required) + * @param \Brevo\Client\Model\Body7 $body Linked / Unlinked contacts and companies ids. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function crmDealsLinkUnlinkIdPatch($id, $body) + { + $this->crmDealsLinkUnlinkIdPatchWithHttpInfo($id, $body); + } + + /** + * Operation crmDealsLinkUnlinkIdPatchWithHttpInfo + * + * Link and Unlink a deal with contacts and companies + * + * @param string $id (required) + * @param \Brevo\Client\Model\Body7 $body Linked / Unlinked contacts and companies ids. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function crmDealsLinkUnlinkIdPatchWithHttpInfo($id, $body) + { + $returnType = ''; + $request = $this->crmDealsLinkUnlinkIdPatchRequest($id, $body); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation crmDealsLinkUnlinkIdPatchAsync + * + * Link and Unlink a deal with contacts and companies + * + * @param string $id (required) + * @param \Brevo\Client\Model\Body7 $body Linked / Unlinked contacts and companies ids. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmDealsLinkUnlinkIdPatchAsync($id, $body) + { + return $this->crmDealsLinkUnlinkIdPatchAsyncWithHttpInfo($id, $body) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation crmDealsLinkUnlinkIdPatchAsyncWithHttpInfo + * + * Link and Unlink a deal with contacts and companies + * + * @param string $id (required) + * @param \Brevo\Client\Model\Body7 $body Linked / Unlinked contacts and companies ids. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmDealsLinkUnlinkIdPatchAsyncWithHttpInfo($id, $body) + { + $returnType = ''; + $request = $this->crmDealsLinkUnlinkIdPatchRequest($id, $body); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'crmDealsLinkUnlinkIdPatch' + * + * @param string $id (required) + * @param \Brevo\Client\Model\Body7 $body Linked / Unlinked contacts and companies ids. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function crmDealsLinkUnlinkIdPatchRequest($id, $body) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling crmDealsLinkUnlinkIdPatch' + ); + } + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $body when calling crmDealsLinkUnlinkIdPatch' + ); + } + + $resourcePath = '/crm/deals/link-unlink/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PATCH', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation crmDealsPost + * + * Create a deal + * + * @param \Brevo\Client\Model\Body5 $body Deal create data. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\InlineResponse2011 + */ + public function crmDealsPost($body) + { + list($response) = $this->crmDealsPostWithHttpInfo($body); + return $response; + } + + /** + * Operation crmDealsPostWithHttpInfo + * + * Create a deal + * + * @param \Brevo\Client\Model\Body5 $body Deal create data. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\InlineResponse2011, HTTP status code, HTTP response headers (array of strings) + */ + public function crmDealsPostWithHttpInfo($body) + { + $returnType = '\Brevo\Client\Model\InlineResponse2011'; + $request = $this->crmDealsPostRequest($body); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\InlineResponse2011', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation crmDealsPostAsync + * + * Create a deal + * + * @param \Brevo\Client\Model\Body5 $body Deal create data. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmDealsPostAsync($body) + { + return $this->crmDealsPostAsyncWithHttpInfo($body) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation crmDealsPostAsyncWithHttpInfo + * + * Create a deal + * + * @param \Brevo\Client\Model\Body5 $body Deal create data. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmDealsPostAsyncWithHttpInfo($body) + { + $returnType = '\Brevo\Client\Model\InlineResponse2011'; + $request = $this->crmDealsPostRequest($body); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'crmDealsPost' + * + * @param \Brevo\Client\Model\Body5 $body Deal create data. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function crmDealsPostRequest($body) + { + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $body when calling crmDealsPost' + ); + } + + $resourcePath = '/crm/deals'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation crmPipelineDetailsAllGet + * + * Get all pipelines + * + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\Pipelines + */ + public function crmPipelineDetailsAllGet() + { + list($response) = $this->crmPipelineDetailsAllGetWithHttpInfo(); + return $response; + } + + /** + * Operation crmPipelineDetailsAllGetWithHttpInfo + * + * Get all pipelines + * + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\Pipelines, HTTP status code, HTTP response headers (array of strings) + */ + public function crmPipelineDetailsAllGetWithHttpInfo() + { + $returnType = '\Brevo\Client\Model\Pipelines'; + $request = $this->crmPipelineDetailsAllGetRequest(); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\Pipelines', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation crmPipelineDetailsAllGetAsync + * + * Get all pipelines + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmPipelineDetailsAllGetAsync() + { + return $this->crmPipelineDetailsAllGetAsyncWithHttpInfo() + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation crmPipelineDetailsAllGetAsyncWithHttpInfo + * + * Get all pipelines + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmPipelineDetailsAllGetAsyncWithHttpInfo() + { + $returnType = '\Brevo\Client\Model\Pipelines'; + $request = $this->crmPipelineDetailsAllGetRequest(); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'crmPipelineDetailsAllGet' + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function crmPipelineDetailsAllGetRequest() + { + + $resourcePath = '/crm/pipeline/details/all'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation crmPipelineDetailsGet + * + * Get pipeline stages + * + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\Pipeline + */ + public function crmPipelineDetailsGet() + { + list($response) = $this->crmPipelineDetailsGetWithHttpInfo(); + return $response; + } + + /** + * Operation crmPipelineDetailsGetWithHttpInfo + * + * Get pipeline stages + * + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\Pipeline, HTTP status code, HTTP response headers (array of strings) + */ + public function crmPipelineDetailsGetWithHttpInfo() + { + $returnType = '\Brevo\Client\Model\Pipeline'; + $request = $this->crmPipelineDetailsGetRequest(); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\Pipeline', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation crmPipelineDetailsGetAsync + * + * Get pipeline stages + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmPipelineDetailsGetAsync() + { + return $this->crmPipelineDetailsGetAsyncWithHttpInfo() + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation crmPipelineDetailsGetAsyncWithHttpInfo + * + * Get pipeline stages + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmPipelineDetailsGetAsyncWithHttpInfo() + { + $returnType = '\Brevo\Client\Model\Pipeline'; + $request = $this->crmPipelineDetailsGetRequest(); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'crmPipelineDetailsGet' + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function crmPipelineDetailsGetRequest() + { + + $resourcePath = '/crm/pipeline/details'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation crmPipelineDetailsPipelineIDGet + * + * Get a pipeline + * + * @param string $pipelineID pipelineID (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\Pipelines + */ + public function crmPipelineDetailsPipelineIDGet($pipelineID) + { + list($response) = $this->crmPipelineDetailsPipelineIDGetWithHttpInfo($pipelineID); + return $response; + } + + /** + * Operation crmPipelineDetailsPipelineIDGetWithHttpInfo + * + * Get a pipeline + * + * @param string $pipelineID (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\Pipelines, HTTP status code, HTTP response headers (array of strings) + */ + public function crmPipelineDetailsPipelineIDGetWithHttpInfo($pipelineID) + { + $returnType = '\Brevo\Client\Model\Pipelines'; + $request = $this->crmPipelineDetailsPipelineIDGetRequest($pipelineID); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\Pipelines', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation crmPipelineDetailsPipelineIDGetAsync + * + * Get a pipeline + * + * @param string $pipelineID (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmPipelineDetailsPipelineIDGetAsync($pipelineID) + { + return $this->crmPipelineDetailsPipelineIDGetAsyncWithHttpInfo($pipelineID) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation crmPipelineDetailsPipelineIDGetAsyncWithHttpInfo + * + * Get a pipeline + * + * @param string $pipelineID (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmPipelineDetailsPipelineIDGetAsyncWithHttpInfo($pipelineID) + { + $returnType = '\Brevo\Client\Model\Pipelines'; + $request = $this->crmPipelineDetailsPipelineIDGetRequest($pipelineID); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'crmPipelineDetailsPipelineIDGet' + * + * @param string $pipelineID (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function crmPipelineDetailsPipelineIDGetRequest($pipelineID) + { + // verify the required parameter 'pipelineID' is set + if ($pipelineID === null || (is_array($pipelineID) && count($pipelineID) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $pipelineID when calling crmPipelineDetailsPipelineIDGet' + ); + } + + $resourcePath = '/crm/pipeline/details/{pipelineID}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($pipelineID !== null) { + $resourcePath = str_replace( + '{' . 'pipelineID' . '}', + ObjectSerializer::toPathValue($pipelineID), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/vendor/getbrevo/brevo-php/lib/Api/DomainsApi.php b/vendor/getbrevo/brevo-php/lib/Api/DomainsApi.php new file mode 100644 index 0000000..c4ec0d6 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Api/DomainsApi.php @@ -0,0 +1,1500 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation authenticateDomain + * + * Authenticate a domain + * + * @param string $domainName Domain name (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\AuthenticateDomainModel + */ + public function authenticateDomain($domainName) + { + list($response) = $this->authenticateDomainWithHttpInfo($domainName); + return $response; + } + + /** + * Operation authenticateDomainWithHttpInfo + * + * Authenticate a domain + * + * @param string $domainName Domain name (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\AuthenticateDomainModel, HTTP status code, HTTP response headers (array of strings) + */ + public function authenticateDomainWithHttpInfo($domainName) + { + $returnType = '\Brevo\Client\Model\AuthenticateDomainModel'; + $request = $this->authenticateDomainRequest($domainName); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\AuthenticateDomainModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation authenticateDomainAsync + * + * Authenticate a domain + * + * @param string $domainName Domain name (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function authenticateDomainAsync($domainName) + { + return $this->authenticateDomainAsyncWithHttpInfo($domainName) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation authenticateDomainAsyncWithHttpInfo + * + * Authenticate a domain + * + * @param string $domainName Domain name (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function authenticateDomainAsyncWithHttpInfo($domainName) + { + $returnType = '\Brevo\Client\Model\AuthenticateDomainModel'; + $request = $this->authenticateDomainRequest($domainName); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'authenticateDomain' + * + * @param string $domainName Domain name (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function authenticateDomainRequest($domainName) + { + // verify the required parameter 'domainName' is set + if ($domainName === null || (is_array($domainName) && count($domainName) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $domainName when calling authenticateDomain' + ); + } + + $resourcePath = '/senders/domains/{domainName}/authenticate'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($domainName !== null) { + $resourcePath = str_replace( + '{' . 'domainName' . '}', + ObjectSerializer::toPathValue($domainName), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation createDomain + * + * Create a new domain + * + * @param \Brevo\Client\Model\CreateDomain $domainName domain's name (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\CreateDomainModel + */ + public function createDomain($domainName = null) + { + list($response) = $this->createDomainWithHttpInfo($domainName); + return $response; + } + + /** + * Operation createDomainWithHttpInfo + * + * Create a new domain + * + * @param \Brevo\Client\Model\CreateDomain $domainName domain's name (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\CreateDomainModel, HTTP status code, HTTP response headers (array of strings) + */ + public function createDomainWithHttpInfo($domainName = null) + { + $returnType = '\Brevo\Client\Model\CreateDomainModel'; + $request = $this->createDomainRequest($domainName); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\CreateDomainModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation createDomainAsync + * + * Create a new domain + * + * @param \Brevo\Client\Model\CreateDomain $domainName domain's name (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createDomainAsync($domainName = null) + { + return $this->createDomainAsyncWithHttpInfo($domainName) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createDomainAsyncWithHttpInfo + * + * Create a new domain + * + * @param \Brevo\Client\Model\CreateDomain $domainName domain's name (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createDomainAsyncWithHttpInfo($domainName = null) + { + $returnType = '\Brevo\Client\Model\CreateDomainModel'; + $request = $this->createDomainRequest($domainName); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createDomain' + * + * @param \Brevo\Client\Model\CreateDomain $domainName domain's name (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function createDomainRequest($domainName = null) + { + + $resourcePath = '/senders/domains'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($domainName)) { + $_tempBody = $domainName; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation deleteDomain + * + * Delete a domain + * + * @param string $domainName Domain name (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function deleteDomain($domainName) + { + $this->deleteDomainWithHttpInfo($domainName); + } + + /** + * Operation deleteDomainWithHttpInfo + * + * Delete a domain + * + * @param string $domainName Domain name (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteDomainWithHttpInfo($domainName) + { + $returnType = ''; + $request = $this->deleteDomainRequest($domainName); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation deleteDomainAsync + * + * Delete a domain + * + * @param string $domainName Domain name (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteDomainAsync($domainName) + { + return $this->deleteDomainAsyncWithHttpInfo($domainName) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteDomainAsyncWithHttpInfo + * + * Delete a domain + * + * @param string $domainName Domain name (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteDomainAsyncWithHttpInfo($domainName) + { + $returnType = ''; + $request = $this->deleteDomainRequest($domainName); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'deleteDomain' + * + * @param string $domainName Domain name (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function deleteDomainRequest($domainName) + { + // verify the required parameter 'domainName' is set + if ($domainName === null || (is_array($domainName) && count($domainName) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $domainName when calling deleteDomain' + ); + } + + $resourcePath = '/senders/domains/{domainName}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($domainName !== null) { + $resourcePath = str_replace( + '{' . 'domainName' . '}', + ObjectSerializer::toPathValue($domainName), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getDomainConfiguration + * + * Validate domain configuration + * + * @param string $domainName Domain name (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetDomainConfigurationModel + */ + public function getDomainConfiguration($domainName) + { + list($response) = $this->getDomainConfigurationWithHttpInfo($domainName); + return $response; + } + + /** + * Operation getDomainConfigurationWithHttpInfo + * + * Validate domain configuration + * + * @param string $domainName Domain name (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetDomainConfigurationModel, HTTP status code, HTTP response headers (array of strings) + */ + public function getDomainConfigurationWithHttpInfo($domainName) + { + $returnType = '\Brevo\Client\Model\GetDomainConfigurationModel'; + $request = $this->getDomainConfigurationRequest($domainName); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetDomainConfigurationModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getDomainConfigurationAsync + * + * Validate domain configuration + * + * @param string $domainName Domain name (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getDomainConfigurationAsync($domainName) + { + return $this->getDomainConfigurationAsyncWithHttpInfo($domainName) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getDomainConfigurationAsyncWithHttpInfo + * + * Validate domain configuration + * + * @param string $domainName Domain name (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getDomainConfigurationAsyncWithHttpInfo($domainName) + { + $returnType = '\Brevo\Client\Model\GetDomainConfigurationModel'; + $request = $this->getDomainConfigurationRequest($domainName); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getDomainConfiguration' + * + * @param string $domainName Domain name (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getDomainConfigurationRequest($domainName) + { + // verify the required parameter 'domainName' is set + if ($domainName === null || (is_array($domainName) && count($domainName) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $domainName when calling getDomainConfiguration' + ); + } + + $resourcePath = '/senders/domains/{domainName}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($domainName !== null) { + $resourcePath = str_replace( + '{' . 'domainName' . '}', + ObjectSerializer::toPathValue($domainName), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getDomains + * + * Get the list of all your domains + * + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetDomainsList + */ + public function getDomains() + { + list($response) = $this->getDomainsWithHttpInfo(); + return $response; + } + + /** + * Operation getDomainsWithHttpInfo + * + * Get the list of all your domains + * + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetDomainsList, HTTP status code, HTTP response headers (array of strings) + */ + public function getDomainsWithHttpInfo() + { + $returnType = '\Brevo\Client\Model\GetDomainsList'; + $request = $this->getDomainsRequest(); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetDomainsList', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getDomainsAsync + * + * Get the list of all your domains + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getDomainsAsync() + { + return $this->getDomainsAsyncWithHttpInfo() + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getDomainsAsyncWithHttpInfo + * + * Get the list of all your domains + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getDomainsAsyncWithHttpInfo() + { + $returnType = '\Brevo\Client\Model\GetDomainsList'; + $request = $this->getDomainsRequest(); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getDomains' + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getDomainsRequest() + { + + $resourcePath = '/senders/domains'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/vendor/getbrevo/brevo-php/lib/Api/EcommerceApi.php b/vendor/getbrevo/brevo-php/lib/Api/EcommerceApi.php new file mode 100644 index 0000000..d667474 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Api/EcommerceApi.php @@ -0,0 +1,3614 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation createBatchOrder + * + * Create orders in batch + * + * @param \Brevo\Client\Model\OrderBatch $orderBatch orderBatch (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function createBatchOrder($orderBatch) + { + $this->createBatchOrderWithHttpInfo($orderBatch); + } + + /** + * Operation createBatchOrderWithHttpInfo + * + * Create orders in batch + * + * @param \Brevo\Client\Model\OrderBatch $orderBatch (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function createBatchOrderWithHttpInfo($orderBatch) + { + $returnType = ''; + $request = $this->createBatchOrderRequest($orderBatch); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation createBatchOrderAsync + * + * Create orders in batch + * + * @param \Brevo\Client\Model\OrderBatch $orderBatch (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createBatchOrderAsync($orderBatch) + { + return $this->createBatchOrderAsyncWithHttpInfo($orderBatch) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createBatchOrderAsyncWithHttpInfo + * + * Create orders in batch + * + * @param \Brevo\Client\Model\OrderBatch $orderBatch (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createBatchOrderAsyncWithHttpInfo($orderBatch) + { + $returnType = ''; + $request = $this->createBatchOrderRequest($orderBatch); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createBatchOrder' + * + * @param \Brevo\Client\Model\OrderBatch $orderBatch (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function createBatchOrderRequest($orderBatch) + { + // verify the required parameter 'orderBatch' is set + if ($orderBatch === null || (is_array($orderBatch) && count($orderBatch) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $orderBatch when calling createBatchOrder' + ); + } + + $resourcePath = '/orders/status/batch'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($orderBatch)) { + $_tempBody = $orderBatch; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation createOrder + * + * Managing the status of the order + * + * @param \Brevo\Client\Model\Order $order order (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function createOrder($order) + { + $this->createOrderWithHttpInfo($order); + } + + /** + * Operation createOrderWithHttpInfo + * + * Managing the status of the order + * + * @param \Brevo\Client\Model\Order $order (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function createOrderWithHttpInfo($order) + { + $returnType = ''; + $request = $this->createOrderRequest($order); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation createOrderAsync + * + * Managing the status of the order + * + * @param \Brevo\Client\Model\Order $order (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createOrderAsync($order) + { + return $this->createOrderAsyncWithHttpInfo($order) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createOrderAsyncWithHttpInfo + * + * Managing the status of the order + * + * @param \Brevo\Client\Model\Order $order (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createOrderAsyncWithHttpInfo($order) + { + $returnType = ''; + $request = $this->createOrderRequest($order); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createOrder' + * + * @param \Brevo\Client\Model\Order $order (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function createOrderRequest($order) + { + // verify the required parameter 'order' is set + if ($order === null || (is_array($order) && count($order) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $order when calling createOrder' + ); + } + + $resourcePath = '/orders/status'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($order)) { + $_tempBody = $order; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation createUpdateBatchCategory + * + * Create categories in batch + * + * @param \Brevo\Client\Model\CreateUpdateBatchCategory $createUpdateBatchCategory Values to create a batch of categories (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\CreateUpdateBatchCategoryModel + */ + public function createUpdateBatchCategory($createUpdateBatchCategory) + { + list($response) = $this->createUpdateBatchCategoryWithHttpInfo($createUpdateBatchCategory); + return $response; + } + + /** + * Operation createUpdateBatchCategoryWithHttpInfo + * + * Create categories in batch + * + * @param \Brevo\Client\Model\CreateUpdateBatchCategory $createUpdateBatchCategory Values to create a batch of categories (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\CreateUpdateBatchCategoryModel, HTTP status code, HTTP response headers (array of strings) + */ + public function createUpdateBatchCategoryWithHttpInfo($createUpdateBatchCategory) + { + $returnType = '\Brevo\Client\Model\CreateUpdateBatchCategoryModel'; + $request = $this->createUpdateBatchCategoryRequest($createUpdateBatchCategory); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\CreateUpdateBatchCategoryModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation createUpdateBatchCategoryAsync + * + * Create categories in batch + * + * @param \Brevo\Client\Model\CreateUpdateBatchCategory $createUpdateBatchCategory Values to create a batch of categories (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createUpdateBatchCategoryAsync($createUpdateBatchCategory) + { + return $this->createUpdateBatchCategoryAsyncWithHttpInfo($createUpdateBatchCategory) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createUpdateBatchCategoryAsyncWithHttpInfo + * + * Create categories in batch + * + * @param \Brevo\Client\Model\CreateUpdateBatchCategory $createUpdateBatchCategory Values to create a batch of categories (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createUpdateBatchCategoryAsyncWithHttpInfo($createUpdateBatchCategory) + { + $returnType = '\Brevo\Client\Model\CreateUpdateBatchCategoryModel'; + $request = $this->createUpdateBatchCategoryRequest($createUpdateBatchCategory); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createUpdateBatchCategory' + * + * @param \Brevo\Client\Model\CreateUpdateBatchCategory $createUpdateBatchCategory Values to create a batch of categories (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function createUpdateBatchCategoryRequest($createUpdateBatchCategory) + { + // verify the required parameter 'createUpdateBatchCategory' is set + if ($createUpdateBatchCategory === null || (is_array($createUpdateBatchCategory) && count($createUpdateBatchCategory) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $createUpdateBatchCategory when calling createUpdateBatchCategory' + ); + } + + $resourcePath = '/categories/batch'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($createUpdateBatchCategory)) { + $_tempBody = $createUpdateBatchCategory; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation createUpdateBatchProducts + * + * Create products in batch + * + * @param \Brevo\Client\Model\CreateUpdateBatchProducts $createUpdateBatchProducts Values to create a batch of products (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\CreateUpdateBatchProductsModel + */ + public function createUpdateBatchProducts($createUpdateBatchProducts) + { + list($response) = $this->createUpdateBatchProductsWithHttpInfo($createUpdateBatchProducts); + return $response; + } + + /** + * Operation createUpdateBatchProductsWithHttpInfo + * + * Create products in batch + * + * @param \Brevo\Client\Model\CreateUpdateBatchProducts $createUpdateBatchProducts Values to create a batch of products (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\CreateUpdateBatchProductsModel, HTTP status code, HTTP response headers (array of strings) + */ + public function createUpdateBatchProductsWithHttpInfo($createUpdateBatchProducts) + { + $returnType = '\Brevo\Client\Model\CreateUpdateBatchProductsModel'; + $request = $this->createUpdateBatchProductsRequest($createUpdateBatchProducts); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\CreateUpdateBatchProductsModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation createUpdateBatchProductsAsync + * + * Create products in batch + * + * @param \Brevo\Client\Model\CreateUpdateBatchProducts $createUpdateBatchProducts Values to create a batch of products (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createUpdateBatchProductsAsync($createUpdateBatchProducts) + { + return $this->createUpdateBatchProductsAsyncWithHttpInfo($createUpdateBatchProducts) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createUpdateBatchProductsAsyncWithHttpInfo + * + * Create products in batch + * + * @param \Brevo\Client\Model\CreateUpdateBatchProducts $createUpdateBatchProducts Values to create a batch of products (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createUpdateBatchProductsAsyncWithHttpInfo($createUpdateBatchProducts) + { + $returnType = '\Brevo\Client\Model\CreateUpdateBatchProductsModel'; + $request = $this->createUpdateBatchProductsRequest($createUpdateBatchProducts); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createUpdateBatchProducts' + * + * @param \Brevo\Client\Model\CreateUpdateBatchProducts $createUpdateBatchProducts Values to create a batch of products (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function createUpdateBatchProductsRequest($createUpdateBatchProducts) + { + // verify the required parameter 'createUpdateBatchProducts' is set + if ($createUpdateBatchProducts === null || (is_array($createUpdateBatchProducts) && count($createUpdateBatchProducts) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $createUpdateBatchProducts when calling createUpdateBatchProducts' + ); + } + + $resourcePath = '/products/batch'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($createUpdateBatchProducts)) { + $_tempBody = $createUpdateBatchProducts; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation createUpdateCategory + * + * Create/Update a category + * + * @param \Brevo\Client\Model\CreateUpdateCategory $createUpdateCategory Values to create/update a category (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\CreateCategoryModel + */ + public function createUpdateCategory($createUpdateCategory) + { + list($response) = $this->createUpdateCategoryWithHttpInfo($createUpdateCategory); + return $response; + } + + /** + * Operation createUpdateCategoryWithHttpInfo + * + * Create/Update a category + * + * @param \Brevo\Client\Model\CreateUpdateCategory $createUpdateCategory Values to create/update a category (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\CreateCategoryModel, HTTP status code, HTTP response headers (array of strings) + */ + public function createUpdateCategoryWithHttpInfo($createUpdateCategory) + { + $returnType = '\Brevo\Client\Model\CreateCategoryModel'; + $request = $this->createUpdateCategoryRequest($createUpdateCategory); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\CreateCategoryModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation createUpdateCategoryAsync + * + * Create/Update a category + * + * @param \Brevo\Client\Model\CreateUpdateCategory $createUpdateCategory Values to create/update a category (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createUpdateCategoryAsync($createUpdateCategory) + { + return $this->createUpdateCategoryAsyncWithHttpInfo($createUpdateCategory) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createUpdateCategoryAsyncWithHttpInfo + * + * Create/Update a category + * + * @param \Brevo\Client\Model\CreateUpdateCategory $createUpdateCategory Values to create/update a category (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createUpdateCategoryAsyncWithHttpInfo($createUpdateCategory) + { + $returnType = '\Brevo\Client\Model\CreateCategoryModel'; + $request = $this->createUpdateCategoryRequest($createUpdateCategory); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createUpdateCategory' + * + * @param \Brevo\Client\Model\CreateUpdateCategory $createUpdateCategory Values to create/update a category (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function createUpdateCategoryRequest($createUpdateCategory) + { + // verify the required parameter 'createUpdateCategory' is set + if ($createUpdateCategory === null || (is_array($createUpdateCategory) && count($createUpdateCategory) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $createUpdateCategory when calling createUpdateCategory' + ); + } + + $resourcePath = '/categories'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($createUpdateCategory)) { + $_tempBody = $createUpdateCategory; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation createUpdateProduct + * + * Create/Update a product + * + * @param \Brevo\Client\Model\CreateUpdateProduct $createUpdateProduct Values to create/update a product (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\CreateProductModel + */ + public function createUpdateProduct($createUpdateProduct) + { + list($response) = $this->createUpdateProductWithHttpInfo($createUpdateProduct); + return $response; + } + + /** + * Operation createUpdateProductWithHttpInfo + * + * Create/Update a product + * + * @param \Brevo\Client\Model\CreateUpdateProduct $createUpdateProduct Values to create/update a product (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\CreateProductModel, HTTP status code, HTTP response headers (array of strings) + */ + public function createUpdateProductWithHttpInfo($createUpdateProduct) + { + $returnType = '\Brevo\Client\Model\CreateProductModel'; + $request = $this->createUpdateProductRequest($createUpdateProduct); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\CreateProductModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation createUpdateProductAsync + * + * Create/Update a product + * + * @param \Brevo\Client\Model\CreateUpdateProduct $createUpdateProduct Values to create/update a product (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createUpdateProductAsync($createUpdateProduct) + { + return $this->createUpdateProductAsyncWithHttpInfo($createUpdateProduct) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createUpdateProductAsyncWithHttpInfo + * + * Create/Update a product + * + * @param \Brevo\Client\Model\CreateUpdateProduct $createUpdateProduct Values to create/update a product (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createUpdateProductAsyncWithHttpInfo($createUpdateProduct) + { + $returnType = '\Brevo\Client\Model\CreateProductModel'; + $request = $this->createUpdateProductRequest($createUpdateProduct); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createUpdateProduct' + * + * @param \Brevo\Client\Model\CreateUpdateProduct $createUpdateProduct Values to create/update a product (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function createUpdateProductRequest($createUpdateProduct) + { + // verify the required parameter 'createUpdateProduct' is set + if ($createUpdateProduct === null || (is_array($createUpdateProduct) && count($createUpdateProduct) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $createUpdateProduct when calling createUpdateProduct' + ); + } + + $resourcePath = '/products'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($createUpdateProduct)) { + $_tempBody = $createUpdateProduct; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation ecommerceActivatePost + * + * Activate the eCommerce app + * + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function ecommerceActivatePost() + { + $this->ecommerceActivatePostWithHttpInfo(); + } + + /** + * Operation ecommerceActivatePostWithHttpInfo + * + * Activate the eCommerce app + * + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function ecommerceActivatePostWithHttpInfo() + { + $returnType = ''; + $request = $this->ecommerceActivatePostRequest(); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation ecommerceActivatePostAsync + * + * Activate the eCommerce app + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function ecommerceActivatePostAsync() + { + return $this->ecommerceActivatePostAsyncWithHttpInfo() + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation ecommerceActivatePostAsyncWithHttpInfo + * + * Activate the eCommerce app + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function ecommerceActivatePostAsyncWithHttpInfo() + { + $returnType = ''; + $request = $this->ecommerceActivatePostRequest(); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'ecommerceActivatePost' + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function ecommerceActivatePostRequest() + { + + $resourcePath = '/ecommerce/activate'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getCategories + * + * Return all your categories + * + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document in the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string[] $ids Filter by category ids (optional) + * @param string $name Filter by category name (optional) + * @param string $modifiedSince Filter (urlencoded) the categories modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** (optional) + * @param string $createdSince Filter (urlencoded) the categories created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetCategories + */ + public function getCategories($limit = '50', $offset = '0', $sort = 'desc', $ids = null, $name = null, $modifiedSince = null, $createdSince = null) + { + list($response) = $this->getCategoriesWithHttpInfo($limit, $offset, $sort, $ids, $name, $modifiedSince, $createdSince); + return $response; + } + + /** + * Operation getCategoriesWithHttpInfo + * + * Return all your categories + * + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document in the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string[] $ids Filter by category ids (optional) + * @param string $name Filter by category name (optional) + * @param string $modifiedSince Filter (urlencoded) the categories modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** (optional) + * @param string $createdSince Filter (urlencoded) the categories created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetCategories, HTTP status code, HTTP response headers (array of strings) + */ + public function getCategoriesWithHttpInfo($limit = '50', $offset = '0', $sort = 'desc', $ids = null, $name = null, $modifiedSince = null, $createdSince = null) + { + $returnType = '\Brevo\Client\Model\GetCategories'; + $request = $this->getCategoriesRequest($limit, $offset, $sort, $ids, $name, $modifiedSince, $createdSince); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetCategories', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getCategoriesAsync + * + * Return all your categories + * + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document in the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string[] $ids Filter by category ids (optional) + * @param string $name Filter by category name (optional) + * @param string $modifiedSince Filter (urlencoded) the categories modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** (optional) + * @param string $createdSince Filter (urlencoded) the categories created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getCategoriesAsync($limit = '50', $offset = '0', $sort = 'desc', $ids = null, $name = null, $modifiedSince = null, $createdSince = null) + { + return $this->getCategoriesAsyncWithHttpInfo($limit, $offset, $sort, $ids, $name, $modifiedSince, $createdSince) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getCategoriesAsyncWithHttpInfo + * + * Return all your categories + * + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document in the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string[] $ids Filter by category ids (optional) + * @param string $name Filter by category name (optional) + * @param string $modifiedSince Filter (urlencoded) the categories modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** (optional) + * @param string $createdSince Filter (urlencoded) the categories created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getCategoriesAsyncWithHttpInfo($limit = '50', $offset = '0', $sort = 'desc', $ids = null, $name = null, $modifiedSince = null, $createdSince = null) + { + $returnType = '\Brevo\Client\Model\GetCategories'; + $request = $this->getCategoriesRequest($limit, $offset, $sort, $ids, $name, $modifiedSince, $createdSince); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getCategories' + * + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document in the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string[] $ids Filter by category ids (optional) + * @param string $name Filter by category name (optional) + * @param string $modifiedSince Filter (urlencoded) the categories modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** (optional) + * @param string $createdSince Filter (urlencoded) the categories created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getCategoriesRequest($limit = '50', $offset = '0', $sort = 'desc', $ids = null, $name = null, $modifiedSince = null, $createdSince = null) + { + if ($limit !== null && $limit > 100) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling EcommerceApi.getCategories, must be smaller than or equal to 100.'); + } + + + $resourcePath = '/categories'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); + } + // query params + if (is_array($ids)) { + $queryParams['ids'] = $ids; + } else + if ($ids !== null) { + $queryParams['ids'] = ObjectSerializer::toQueryValue($ids); + } + // query params + if ($name !== null) { + $queryParams['name'] = ObjectSerializer::toQueryValue($name); + } + // query params + if ($modifiedSince !== null) { + $queryParams['modifiedSince'] = ObjectSerializer::toQueryValue($modifiedSince); + } + // query params + if ($createdSince !== null) { + $queryParams['createdSince'] = ObjectSerializer::toQueryValue($createdSince); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getCategoryInfo + * + * Get a category details + * + * @param string $id Category ID (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetCategoryDetails + */ + public function getCategoryInfo($id) + { + list($response) = $this->getCategoryInfoWithHttpInfo($id); + return $response; + } + + /** + * Operation getCategoryInfoWithHttpInfo + * + * Get a category details + * + * @param string $id Category ID (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetCategoryDetails, HTTP status code, HTTP response headers (array of strings) + */ + public function getCategoryInfoWithHttpInfo($id) + { + $returnType = '\Brevo\Client\Model\GetCategoryDetails'; + $request = $this->getCategoryInfoRequest($id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetCategoryDetails', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getCategoryInfoAsync + * + * Get a category details + * + * @param string $id Category ID (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getCategoryInfoAsync($id) + { + return $this->getCategoryInfoAsyncWithHttpInfo($id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getCategoryInfoAsyncWithHttpInfo + * + * Get a category details + * + * @param string $id Category ID (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getCategoryInfoAsyncWithHttpInfo($id) + { + $returnType = '\Brevo\Client\Model\GetCategoryDetails'; + $request = $this->getCategoryInfoRequest($id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getCategoryInfo' + * + * @param string $id Category ID (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getCategoryInfoRequest($id) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling getCategoryInfo' + ); + } + + $resourcePath = '/categories/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getOrders + * + * Get order details + * + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document in the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $modifiedSince Filter (urlencoded) the orders modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** (optional) + * @param string $createdSince Filter (urlencoded) the orders created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetOrders + */ + public function getOrders($limit = '50', $offset = '0', $sort = 'desc', $modifiedSince = null, $createdSince = null) + { + list($response) = $this->getOrdersWithHttpInfo($limit, $offset, $sort, $modifiedSince, $createdSince); + return $response; + } + + /** + * Operation getOrdersWithHttpInfo + * + * Get order details + * + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document in the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $modifiedSince Filter (urlencoded) the orders modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** (optional) + * @param string $createdSince Filter (urlencoded) the orders created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetOrders, HTTP status code, HTTP response headers (array of strings) + */ + public function getOrdersWithHttpInfo($limit = '50', $offset = '0', $sort = 'desc', $modifiedSince = null, $createdSince = null) + { + $returnType = '\Brevo\Client\Model\GetOrders'; + $request = $this->getOrdersRequest($limit, $offset, $sort, $modifiedSince, $createdSince); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetOrders', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getOrdersAsync + * + * Get order details + * + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document in the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $modifiedSince Filter (urlencoded) the orders modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** (optional) + * @param string $createdSince Filter (urlencoded) the orders created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getOrdersAsync($limit = '50', $offset = '0', $sort = 'desc', $modifiedSince = null, $createdSince = null) + { + return $this->getOrdersAsyncWithHttpInfo($limit, $offset, $sort, $modifiedSince, $createdSince) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getOrdersAsyncWithHttpInfo + * + * Get order details + * + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document in the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $modifiedSince Filter (urlencoded) the orders modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** (optional) + * @param string $createdSince Filter (urlencoded) the orders created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getOrdersAsyncWithHttpInfo($limit = '50', $offset = '0', $sort = 'desc', $modifiedSince = null, $createdSince = null) + { + $returnType = '\Brevo\Client\Model\GetOrders'; + $request = $this->getOrdersRequest($limit, $offset, $sort, $modifiedSince, $createdSince); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getOrders' + * + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document in the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $modifiedSince Filter (urlencoded) the orders modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** (optional) + * @param string $createdSince Filter (urlencoded) the orders created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getOrdersRequest($limit = '50', $offset = '0', $sort = 'desc', $modifiedSince = null, $createdSince = null) + { + if ($limit !== null && $limit > 100) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling EcommerceApi.getOrders, must be smaller than or equal to 100.'); + } + + + $resourcePath = '/orders'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); + } + // query params + if ($modifiedSince !== null) { + $queryParams['modifiedSince'] = ObjectSerializer::toQueryValue($modifiedSince); + } + // query params + if ($createdSince !== null) { + $queryParams['createdSince'] = ObjectSerializer::toQueryValue($createdSince); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getProductInfo + * + * Get a product's details + * + * @param string $id Product ID (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetProductDetails + */ + public function getProductInfo($id) + { + list($response) = $this->getProductInfoWithHttpInfo($id); + return $response; + } + + /** + * Operation getProductInfoWithHttpInfo + * + * Get a product's details + * + * @param string $id Product ID (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetProductDetails, HTTP status code, HTTP response headers (array of strings) + */ + public function getProductInfoWithHttpInfo($id) + { + $returnType = '\Brevo\Client\Model\GetProductDetails'; + $request = $this->getProductInfoRequest($id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetProductDetails', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getProductInfoAsync + * + * Get a product's details + * + * @param string $id Product ID (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getProductInfoAsync($id) + { + return $this->getProductInfoAsyncWithHttpInfo($id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getProductInfoAsyncWithHttpInfo + * + * Get a product's details + * + * @param string $id Product ID (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getProductInfoAsyncWithHttpInfo($id) + { + $returnType = '\Brevo\Client\Model\GetProductDetails'; + $request = $this->getProductInfoRequest($id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getProductInfo' + * + * @param string $id Product ID (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getProductInfoRequest($id) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling getProductInfo' + ); + } + + $resourcePath = '/products/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getProducts + * + * Return all your products + * + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document in the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string[] $ids Filter by product ids (optional) + * @param string $name Filter by product name, minimum 3 characters should be present for search (optional) + * @param float $priceLte Price filter for products less than and equals to particular amount (optional) + * @param float $priceGte Price filter for products greater than and equals to particular amount (optional) + * @param float $priceLt Price filter for products less than particular amount (optional) + * @param float $priceGt Price filter for products greater than particular amount (optional) + * @param float $priceEq Price filter for products equals to particular amount (optional) + * @param float $priceNe Price filter for products not equals to particular amount (optional) + * @param string[] $categories Filter by category ids (optional) + * @param string $modifiedSince Filter (urlencoded) the orders modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** (optional) + * @param string $createdSince Filter (urlencoded) the orders created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetProducts + */ + public function getProducts($limit = '50', $offset = '0', $sort = 'desc', $ids = null, $name = null, $priceLte = null, $priceGte = null, $priceLt = null, $priceGt = null, $priceEq = null, $priceNe = null, $categories = null, $modifiedSince = null, $createdSince = null) + { + list($response) = $this->getProductsWithHttpInfo($limit, $offset, $sort, $ids, $name, $priceLte, $priceGte, $priceLt, $priceGt, $priceEq, $priceNe, $categories, $modifiedSince, $createdSince); + return $response; + } + + /** + * Operation getProductsWithHttpInfo + * + * Return all your products + * + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document in the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string[] $ids Filter by product ids (optional) + * @param string $name Filter by product name, minimum 3 characters should be present for search (optional) + * @param float $priceLte Price filter for products less than and equals to particular amount (optional) + * @param float $priceGte Price filter for products greater than and equals to particular amount (optional) + * @param float $priceLt Price filter for products less than particular amount (optional) + * @param float $priceGt Price filter for products greater than particular amount (optional) + * @param float $priceEq Price filter for products equals to particular amount (optional) + * @param float $priceNe Price filter for products not equals to particular amount (optional) + * @param string[] $categories Filter by category ids (optional) + * @param string $modifiedSince Filter (urlencoded) the orders modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** (optional) + * @param string $createdSince Filter (urlencoded) the orders created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetProducts, HTTP status code, HTTP response headers (array of strings) + */ + public function getProductsWithHttpInfo($limit = '50', $offset = '0', $sort = 'desc', $ids = null, $name = null, $priceLte = null, $priceGte = null, $priceLt = null, $priceGt = null, $priceEq = null, $priceNe = null, $categories = null, $modifiedSince = null, $createdSince = null) + { + $returnType = '\Brevo\Client\Model\GetProducts'; + $request = $this->getProductsRequest($limit, $offset, $sort, $ids, $name, $priceLte, $priceGte, $priceLt, $priceGt, $priceEq, $priceNe, $categories, $modifiedSince, $createdSince); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetProducts', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getProductsAsync + * + * Return all your products + * + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document in the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string[] $ids Filter by product ids (optional) + * @param string $name Filter by product name, minimum 3 characters should be present for search (optional) + * @param float $priceLte Price filter for products less than and equals to particular amount (optional) + * @param float $priceGte Price filter for products greater than and equals to particular amount (optional) + * @param float $priceLt Price filter for products less than particular amount (optional) + * @param float $priceGt Price filter for products greater than particular amount (optional) + * @param float $priceEq Price filter for products equals to particular amount (optional) + * @param float $priceNe Price filter for products not equals to particular amount (optional) + * @param string[] $categories Filter by category ids (optional) + * @param string $modifiedSince Filter (urlencoded) the orders modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** (optional) + * @param string $createdSince Filter (urlencoded) the orders created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getProductsAsync($limit = '50', $offset = '0', $sort = 'desc', $ids = null, $name = null, $priceLte = null, $priceGte = null, $priceLt = null, $priceGt = null, $priceEq = null, $priceNe = null, $categories = null, $modifiedSince = null, $createdSince = null) + { + return $this->getProductsAsyncWithHttpInfo($limit, $offset, $sort, $ids, $name, $priceLte, $priceGte, $priceLt, $priceGt, $priceEq, $priceNe, $categories, $modifiedSince, $createdSince) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getProductsAsyncWithHttpInfo + * + * Return all your products + * + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document in the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string[] $ids Filter by product ids (optional) + * @param string $name Filter by product name, minimum 3 characters should be present for search (optional) + * @param float $priceLte Price filter for products less than and equals to particular amount (optional) + * @param float $priceGte Price filter for products greater than and equals to particular amount (optional) + * @param float $priceLt Price filter for products less than particular amount (optional) + * @param float $priceGt Price filter for products greater than particular amount (optional) + * @param float $priceEq Price filter for products equals to particular amount (optional) + * @param float $priceNe Price filter for products not equals to particular amount (optional) + * @param string[] $categories Filter by category ids (optional) + * @param string $modifiedSince Filter (urlencoded) the orders modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** (optional) + * @param string $createdSince Filter (urlencoded) the orders created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getProductsAsyncWithHttpInfo($limit = '50', $offset = '0', $sort = 'desc', $ids = null, $name = null, $priceLte = null, $priceGte = null, $priceLt = null, $priceGt = null, $priceEq = null, $priceNe = null, $categories = null, $modifiedSince = null, $createdSince = null) + { + $returnType = '\Brevo\Client\Model\GetProducts'; + $request = $this->getProductsRequest($limit, $offset, $sort, $ids, $name, $priceLte, $priceGte, $priceLt, $priceGt, $priceEq, $priceNe, $categories, $modifiedSince, $createdSince); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getProducts' + * + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document in the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string[] $ids Filter by product ids (optional) + * @param string $name Filter by product name, minimum 3 characters should be present for search (optional) + * @param float $priceLte Price filter for products less than and equals to particular amount (optional) + * @param float $priceGte Price filter for products greater than and equals to particular amount (optional) + * @param float $priceLt Price filter for products less than particular amount (optional) + * @param float $priceGt Price filter for products greater than particular amount (optional) + * @param float $priceEq Price filter for products equals to particular amount (optional) + * @param float $priceNe Price filter for products not equals to particular amount (optional) + * @param string[] $categories Filter by category ids (optional) + * @param string $modifiedSince Filter (urlencoded) the orders modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** (optional) + * @param string $createdSince Filter (urlencoded) the orders created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getProductsRequest($limit = '50', $offset = '0', $sort = 'desc', $ids = null, $name = null, $priceLte = null, $priceGte = null, $priceLt = null, $priceGt = null, $priceEq = null, $priceNe = null, $categories = null, $modifiedSince = null, $createdSince = null) + { + if ($limit !== null && $limit > 1000) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling EcommerceApi.getProducts, must be smaller than or equal to 1000.'); + } + + + $resourcePath = '/products'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); + } + // query params + if (is_array($ids)) { + $queryParams['ids'] = $ids; + } else + if ($ids !== null) { + $queryParams['ids'] = ObjectSerializer::toQueryValue($ids); + } + // query params + if ($name !== null) { + $queryParams['name'] = ObjectSerializer::toQueryValue($name); + } + // query params + if ($priceLte !== null) { + $queryParams['price[lte]'] = ObjectSerializer::toQueryValue($priceLte); + } + // query params + if ($priceGte !== null) { + $queryParams['price[gte]'] = ObjectSerializer::toQueryValue($priceGte); + } + // query params + if ($priceLt !== null) { + $queryParams['price[lt]'] = ObjectSerializer::toQueryValue($priceLt); + } + // query params + if ($priceGt !== null) { + $queryParams['price[gt]'] = ObjectSerializer::toQueryValue($priceGt); + } + // query params + if ($priceEq !== null) { + $queryParams['price[eq]'] = ObjectSerializer::toQueryValue($priceEq); + } + // query params + if ($priceNe !== null) { + $queryParams['price[ne]'] = ObjectSerializer::toQueryValue($priceNe); + } + // query params + if (is_array($categories)) { + $queryParams['categories'] = $categories; + } else + if ($categories !== null) { + $queryParams['categories'] = ObjectSerializer::toQueryValue($categories); + } + // query params + if ($modifiedSince !== null) { + $queryParams['modifiedSince'] = ObjectSerializer::toQueryValue($modifiedSince); + } + // query params + if ($createdSince !== null) { + $queryParams['createdSince'] = ObjectSerializer::toQueryValue($createdSince); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/vendor/getbrevo/brevo-php/lib/Api/EmailCampaignsApi.php b/vendor/getbrevo/brevo-php/lib/Api/EmailCampaignsApi.php new file mode 100644 index 0000000..f5cec46 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Api/EmailCampaignsApi.php @@ -0,0 +1,3845 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation createEmailCampaign + * + * Create an email campaign + * + * @param \Brevo\Client\Model\CreateEmailCampaign $emailCampaigns Values to create a campaign (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\CreateModel + */ + public function createEmailCampaign($emailCampaigns) + { + list($response) = $this->createEmailCampaignWithHttpInfo($emailCampaigns); + return $response; + } + + /** + * Operation createEmailCampaignWithHttpInfo + * + * Create an email campaign + * + * @param \Brevo\Client\Model\CreateEmailCampaign $emailCampaigns Values to create a campaign (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\CreateModel, HTTP status code, HTTP response headers (array of strings) + */ + public function createEmailCampaignWithHttpInfo($emailCampaigns) + { + $returnType = '\Brevo\Client\Model\CreateModel'; + $request = $this->createEmailCampaignRequest($emailCampaigns); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\CreateModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation createEmailCampaignAsync + * + * Create an email campaign + * + * @param \Brevo\Client\Model\CreateEmailCampaign $emailCampaigns Values to create a campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createEmailCampaignAsync($emailCampaigns) + { + return $this->createEmailCampaignAsyncWithHttpInfo($emailCampaigns) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createEmailCampaignAsyncWithHttpInfo + * + * Create an email campaign + * + * @param \Brevo\Client\Model\CreateEmailCampaign $emailCampaigns Values to create a campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createEmailCampaignAsyncWithHttpInfo($emailCampaigns) + { + $returnType = '\Brevo\Client\Model\CreateModel'; + $request = $this->createEmailCampaignRequest($emailCampaigns); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createEmailCampaign' + * + * @param \Brevo\Client\Model\CreateEmailCampaign $emailCampaigns Values to create a campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function createEmailCampaignRequest($emailCampaigns) + { + // verify the required parameter 'emailCampaigns' is set + if ($emailCampaigns === null || (is_array($emailCampaigns) && count($emailCampaigns) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $emailCampaigns when calling createEmailCampaign' + ); + } + + $resourcePath = '/emailCampaigns'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($emailCampaigns)) { + $_tempBody = $emailCampaigns; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation deleteEmailCampaign + * + * Delete an email campaign + * + * @param int $campaignId id of the campaign (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function deleteEmailCampaign($campaignId) + { + $this->deleteEmailCampaignWithHttpInfo($campaignId); + } + + /** + * Operation deleteEmailCampaignWithHttpInfo + * + * Delete an email campaign + * + * @param int $campaignId id of the campaign (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteEmailCampaignWithHttpInfo($campaignId) + { + $returnType = ''; + $request = $this->deleteEmailCampaignRequest($campaignId); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation deleteEmailCampaignAsync + * + * Delete an email campaign + * + * @param int $campaignId id of the campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteEmailCampaignAsync($campaignId) + { + return $this->deleteEmailCampaignAsyncWithHttpInfo($campaignId) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteEmailCampaignAsyncWithHttpInfo + * + * Delete an email campaign + * + * @param int $campaignId id of the campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteEmailCampaignAsyncWithHttpInfo($campaignId) + { + $returnType = ''; + $request = $this->deleteEmailCampaignRequest($campaignId); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'deleteEmailCampaign' + * + * @param int $campaignId id of the campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function deleteEmailCampaignRequest($campaignId) + { + // verify the required parameter 'campaignId' is set + if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $campaignId when calling deleteEmailCampaign' + ); + } + + $resourcePath = '/emailCampaigns/{campaignId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($campaignId !== null) { + $resourcePath = str_replace( + '{' . 'campaignId' . '}', + ObjectSerializer::toPathValue($campaignId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation emailExportRecipients + * + * Export the recipients of an email campaign + * + * @param int $campaignId Id of the campaign (required) + * @param \Brevo\Client\Model\EmailExportRecipients $recipientExport Values to send for a recipient export request (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\CreatedProcessId + */ + public function emailExportRecipients($campaignId, $recipientExport = null) + { + list($response) = $this->emailExportRecipientsWithHttpInfo($campaignId, $recipientExport); + return $response; + } + + /** + * Operation emailExportRecipientsWithHttpInfo + * + * Export the recipients of an email campaign + * + * @param int $campaignId Id of the campaign (required) + * @param \Brevo\Client\Model\EmailExportRecipients $recipientExport Values to send for a recipient export request (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\CreatedProcessId, HTTP status code, HTTP response headers (array of strings) + */ + public function emailExportRecipientsWithHttpInfo($campaignId, $recipientExport = null) + { + $returnType = '\Brevo\Client\Model\CreatedProcessId'; + $request = $this->emailExportRecipientsRequest($campaignId, $recipientExport); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 202: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\CreatedProcessId', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation emailExportRecipientsAsync + * + * Export the recipients of an email campaign + * + * @param int $campaignId Id of the campaign (required) + * @param \Brevo\Client\Model\EmailExportRecipients $recipientExport Values to send for a recipient export request (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function emailExportRecipientsAsync($campaignId, $recipientExport = null) + { + return $this->emailExportRecipientsAsyncWithHttpInfo($campaignId, $recipientExport) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation emailExportRecipientsAsyncWithHttpInfo + * + * Export the recipients of an email campaign + * + * @param int $campaignId Id of the campaign (required) + * @param \Brevo\Client\Model\EmailExportRecipients $recipientExport Values to send for a recipient export request (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function emailExportRecipientsAsyncWithHttpInfo($campaignId, $recipientExport = null) + { + $returnType = '\Brevo\Client\Model\CreatedProcessId'; + $request = $this->emailExportRecipientsRequest($campaignId, $recipientExport); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'emailExportRecipients' + * + * @param int $campaignId Id of the campaign (required) + * @param \Brevo\Client\Model\EmailExportRecipients $recipientExport Values to send for a recipient export request (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function emailExportRecipientsRequest($campaignId, $recipientExport = null) + { + // verify the required parameter 'campaignId' is set + if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $campaignId when calling emailExportRecipients' + ); + } + + $resourcePath = '/emailCampaigns/{campaignId}/exportRecipients'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($campaignId !== null) { + $resourcePath = str_replace( + '{' . 'campaignId' . '}', + ObjectSerializer::toPathValue($campaignId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($recipientExport)) { + $_tempBody = $recipientExport; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getAbTestCampaignResult + * + * Get an A/B test email campaign results + * + * @param int $campaignId Id of the A/B test campaign (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\AbTestCampaignResult + */ + public function getAbTestCampaignResult($campaignId) + { + list($response) = $this->getAbTestCampaignResultWithHttpInfo($campaignId); + return $response; + } + + /** + * Operation getAbTestCampaignResultWithHttpInfo + * + * Get an A/B test email campaign results + * + * @param int $campaignId Id of the A/B test campaign (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\AbTestCampaignResult, HTTP status code, HTTP response headers (array of strings) + */ + public function getAbTestCampaignResultWithHttpInfo($campaignId) + { + $returnType = '\Brevo\Client\Model\AbTestCampaignResult'; + $request = $this->getAbTestCampaignResultRequest($campaignId); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\AbTestCampaignResult', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getAbTestCampaignResultAsync + * + * Get an A/B test email campaign results + * + * @param int $campaignId Id of the A/B test campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getAbTestCampaignResultAsync($campaignId) + { + return $this->getAbTestCampaignResultAsyncWithHttpInfo($campaignId) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getAbTestCampaignResultAsyncWithHttpInfo + * + * Get an A/B test email campaign results + * + * @param int $campaignId Id of the A/B test campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getAbTestCampaignResultAsyncWithHttpInfo($campaignId) + { + $returnType = '\Brevo\Client\Model\AbTestCampaignResult'; + $request = $this->getAbTestCampaignResultRequest($campaignId); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getAbTestCampaignResult' + * + * @param int $campaignId Id of the A/B test campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getAbTestCampaignResultRequest($campaignId) + { + // verify the required parameter 'campaignId' is set + if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $campaignId when calling getAbTestCampaignResult' + ); + } + + $resourcePath = '/emailCampaigns/{campaignId}/abTestCampaignResult'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($campaignId !== null) { + $resourcePath = str_replace( + '{' . 'campaignId' . '}', + ObjectSerializer::toPathValue($campaignId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getEmailCampaign + * + * Get an email campaign report + * + * @param int $campaignId Id of the campaign (required) + * @param string $statistics Filter on the type of statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response. (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetEmailCampaign + */ + public function getEmailCampaign($campaignId, $statistics = null) + { + list($response) = $this->getEmailCampaignWithHttpInfo($campaignId, $statistics); + return $response; + } + + /** + * Operation getEmailCampaignWithHttpInfo + * + * Get an email campaign report + * + * @param int $campaignId Id of the campaign (required) + * @param string $statistics Filter on the type of statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response. (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetEmailCampaign, HTTP status code, HTTP response headers (array of strings) + */ + public function getEmailCampaignWithHttpInfo($campaignId, $statistics = null) + { + $returnType = '\Brevo\Client\Model\GetEmailCampaign'; + $request = $this->getEmailCampaignRequest($campaignId, $statistics); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetEmailCampaign', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getEmailCampaignAsync + * + * Get an email campaign report + * + * @param int $campaignId Id of the campaign (required) + * @param string $statistics Filter on the type of statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getEmailCampaignAsync($campaignId, $statistics = null) + { + return $this->getEmailCampaignAsyncWithHttpInfo($campaignId, $statistics) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getEmailCampaignAsyncWithHttpInfo + * + * Get an email campaign report + * + * @param int $campaignId Id of the campaign (required) + * @param string $statistics Filter on the type of statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getEmailCampaignAsyncWithHttpInfo($campaignId, $statistics = null) + { + $returnType = '\Brevo\Client\Model\GetEmailCampaign'; + $request = $this->getEmailCampaignRequest($campaignId, $statistics); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getEmailCampaign' + * + * @param int $campaignId Id of the campaign (required) + * @param string $statistics Filter on the type of statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getEmailCampaignRequest($campaignId, $statistics = null) + { + // verify the required parameter 'campaignId' is set + if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $campaignId when calling getEmailCampaign' + ); + } + + $resourcePath = '/emailCampaigns/{campaignId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($statistics !== null) { + $queryParams['statistics'] = ObjectSerializer::toQueryValue($statistics); + } + + // path params + if ($campaignId !== null) { + $resourcePath = str_replace( + '{' . 'campaignId' . '}', + ObjectSerializer::toPathValue($campaignId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getEmailCampaigns + * + * Return all your created email campaigns + * + * @param string $type Filter on the type of the campaigns (optional) + * @param string $status Filter on the status of the campaign (optional) + * @param string $statistics Filter on the type of statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response. (optional) + * @param string $startDate Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param string $endDate Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document in the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param bool $excludeHtmlContent Use this flag to exclude htmlContent from the response body. If set to **true**, htmlContent field will be returned as empty string in the response body (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetEmailCampaigns + */ + public function getEmailCampaigns($type = null, $status = null, $statistics = null, $startDate = null, $endDate = null, $limit = '50', $offset = '0', $sort = 'desc', $excludeHtmlContent = null) + { + list($response) = $this->getEmailCampaignsWithHttpInfo($type, $status, $statistics, $startDate, $endDate, $limit, $offset, $sort, $excludeHtmlContent); + return $response; + } + + /** + * Operation getEmailCampaignsWithHttpInfo + * + * Return all your created email campaigns + * + * @param string $type Filter on the type of the campaigns (optional) + * @param string $status Filter on the status of the campaign (optional) + * @param string $statistics Filter on the type of statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response. (optional) + * @param string $startDate Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param string $endDate Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document in the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param bool $excludeHtmlContent Use this flag to exclude htmlContent from the response body. If set to **true**, htmlContent field will be returned as empty string in the response body (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetEmailCampaigns, HTTP status code, HTTP response headers (array of strings) + */ + public function getEmailCampaignsWithHttpInfo($type = null, $status = null, $statistics = null, $startDate = null, $endDate = null, $limit = '50', $offset = '0', $sort = 'desc', $excludeHtmlContent = null) + { + $returnType = '\Brevo\Client\Model\GetEmailCampaigns'; + $request = $this->getEmailCampaignsRequest($type, $status, $statistics, $startDate, $endDate, $limit, $offset, $sort, $excludeHtmlContent); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetEmailCampaigns', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getEmailCampaignsAsync + * + * Return all your created email campaigns + * + * @param string $type Filter on the type of the campaigns (optional) + * @param string $status Filter on the status of the campaign (optional) + * @param string $statistics Filter on the type of statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response. (optional) + * @param string $startDate Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param string $endDate Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document in the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param bool $excludeHtmlContent Use this flag to exclude htmlContent from the response body. If set to **true**, htmlContent field will be returned as empty string in the response body (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getEmailCampaignsAsync($type = null, $status = null, $statistics = null, $startDate = null, $endDate = null, $limit = '50', $offset = '0', $sort = 'desc', $excludeHtmlContent = null) + { + return $this->getEmailCampaignsAsyncWithHttpInfo($type, $status, $statistics, $startDate, $endDate, $limit, $offset, $sort, $excludeHtmlContent) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getEmailCampaignsAsyncWithHttpInfo + * + * Return all your created email campaigns + * + * @param string $type Filter on the type of the campaigns (optional) + * @param string $status Filter on the status of the campaign (optional) + * @param string $statistics Filter on the type of statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response. (optional) + * @param string $startDate Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param string $endDate Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document in the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param bool $excludeHtmlContent Use this flag to exclude htmlContent from the response body. If set to **true**, htmlContent field will be returned as empty string in the response body (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getEmailCampaignsAsyncWithHttpInfo($type = null, $status = null, $statistics = null, $startDate = null, $endDate = null, $limit = '50', $offset = '0', $sort = 'desc', $excludeHtmlContent = null) + { + $returnType = '\Brevo\Client\Model\GetEmailCampaigns'; + $request = $this->getEmailCampaignsRequest($type, $status, $statistics, $startDate, $endDate, $limit, $offset, $sort, $excludeHtmlContent); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getEmailCampaigns' + * + * @param string $type Filter on the type of the campaigns (optional) + * @param string $status Filter on the status of the campaign (optional) + * @param string $statistics Filter on the type of statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response. (optional) + * @param string $startDate Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param string $endDate Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document in the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param bool $excludeHtmlContent Use this flag to exclude htmlContent from the response body. If set to **true**, htmlContent field will be returned as empty string in the response body (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getEmailCampaignsRequest($type = null, $status = null, $statistics = null, $startDate = null, $endDate = null, $limit = '50', $offset = '0', $sort = 'desc', $excludeHtmlContent = null) + { + if ($limit !== null && $limit > 100) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling EmailCampaignsApi.getEmailCampaigns, must be smaller than or equal to 100.'); + } + if ($limit !== null && $limit < 0) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling EmailCampaignsApi.getEmailCampaigns, must be bigger than or equal to 0.'); + } + + + $resourcePath = '/emailCampaigns'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($type !== null) { + $queryParams['type'] = ObjectSerializer::toQueryValue($type); + } + // query params + if ($status !== null) { + $queryParams['status'] = ObjectSerializer::toQueryValue($status); + } + // query params + if ($statistics !== null) { + $queryParams['statistics'] = ObjectSerializer::toQueryValue($statistics); + } + // query params + if ($startDate !== null) { + $queryParams['startDate'] = ObjectSerializer::toQueryValue($startDate); + } + // query params + if ($endDate !== null) { + $queryParams['endDate'] = ObjectSerializer::toQueryValue($endDate); + } + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); + } + // query params + if ($excludeHtmlContent !== null) { + $queryParams['excludeHtmlContent'] = ObjectSerializer::toQueryValue($excludeHtmlContent); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getSharedTemplateUrl + * + * Get a shared template url + * + * @param int $campaignId Id of the campaign or template (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetSharedTemplateUrl + */ + public function getSharedTemplateUrl($campaignId) + { + list($response) = $this->getSharedTemplateUrlWithHttpInfo($campaignId); + return $response; + } + + /** + * Operation getSharedTemplateUrlWithHttpInfo + * + * Get a shared template url + * + * @param int $campaignId Id of the campaign or template (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetSharedTemplateUrl, HTTP status code, HTTP response headers (array of strings) + */ + public function getSharedTemplateUrlWithHttpInfo($campaignId) + { + $returnType = '\Brevo\Client\Model\GetSharedTemplateUrl'; + $request = $this->getSharedTemplateUrlRequest($campaignId); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetSharedTemplateUrl', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getSharedTemplateUrlAsync + * + * Get a shared template url + * + * @param int $campaignId Id of the campaign or template (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getSharedTemplateUrlAsync($campaignId) + { + return $this->getSharedTemplateUrlAsyncWithHttpInfo($campaignId) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getSharedTemplateUrlAsyncWithHttpInfo + * + * Get a shared template url + * + * @param int $campaignId Id of the campaign or template (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getSharedTemplateUrlAsyncWithHttpInfo($campaignId) + { + $returnType = '\Brevo\Client\Model\GetSharedTemplateUrl'; + $request = $this->getSharedTemplateUrlRequest($campaignId); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getSharedTemplateUrl' + * + * @param int $campaignId Id of the campaign or template (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getSharedTemplateUrlRequest($campaignId) + { + // verify the required parameter 'campaignId' is set + if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $campaignId when calling getSharedTemplateUrl' + ); + } + + $resourcePath = '/emailCampaigns/{campaignId}/sharedUrl'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($campaignId !== null) { + $resourcePath = str_replace( + '{' . 'campaignId' . '}', + ObjectSerializer::toPathValue($campaignId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation sendEmailCampaignNow + * + * Send an email campaign immediately, based on campaignId + * + * @param int $campaignId Id of the campaign (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function sendEmailCampaignNow($campaignId) + { + $this->sendEmailCampaignNowWithHttpInfo($campaignId); + } + + /** + * Operation sendEmailCampaignNowWithHttpInfo + * + * Send an email campaign immediately, based on campaignId + * + * @param int $campaignId Id of the campaign (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function sendEmailCampaignNowWithHttpInfo($campaignId) + { + $returnType = ''; + $request = $this->sendEmailCampaignNowRequest($campaignId); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 402: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation sendEmailCampaignNowAsync + * + * Send an email campaign immediately, based on campaignId + * + * @param int $campaignId Id of the campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function sendEmailCampaignNowAsync($campaignId) + { + return $this->sendEmailCampaignNowAsyncWithHttpInfo($campaignId) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation sendEmailCampaignNowAsyncWithHttpInfo + * + * Send an email campaign immediately, based on campaignId + * + * @param int $campaignId Id of the campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function sendEmailCampaignNowAsyncWithHttpInfo($campaignId) + { + $returnType = ''; + $request = $this->sendEmailCampaignNowRequest($campaignId); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'sendEmailCampaignNow' + * + * @param int $campaignId Id of the campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function sendEmailCampaignNowRequest($campaignId) + { + // verify the required parameter 'campaignId' is set + if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $campaignId when calling sendEmailCampaignNow' + ); + } + + $resourcePath = '/emailCampaigns/{campaignId}/sendNow'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($campaignId !== null) { + $resourcePath = str_replace( + '{' . 'campaignId' . '}', + ObjectSerializer::toPathValue($campaignId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation sendReport + * + * Send the report of a campaign + * + * @param int $campaignId Id of the campaign (required) + * @param \Brevo\Client\Model\SendReport $sendReport Values for send a report (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function sendReport($campaignId, $sendReport) + { + $this->sendReportWithHttpInfo($campaignId, $sendReport); + } + + /** + * Operation sendReportWithHttpInfo + * + * Send the report of a campaign + * + * @param int $campaignId Id of the campaign (required) + * @param \Brevo\Client\Model\SendReport $sendReport Values for send a report (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function sendReportWithHttpInfo($campaignId, $sendReport) + { + $returnType = ''; + $request = $this->sendReportRequest($campaignId, $sendReport); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation sendReportAsync + * + * Send the report of a campaign + * + * @param int $campaignId Id of the campaign (required) + * @param \Brevo\Client\Model\SendReport $sendReport Values for send a report (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function sendReportAsync($campaignId, $sendReport) + { + return $this->sendReportAsyncWithHttpInfo($campaignId, $sendReport) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation sendReportAsyncWithHttpInfo + * + * Send the report of a campaign + * + * @param int $campaignId Id of the campaign (required) + * @param \Brevo\Client\Model\SendReport $sendReport Values for send a report (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function sendReportAsyncWithHttpInfo($campaignId, $sendReport) + { + $returnType = ''; + $request = $this->sendReportRequest($campaignId, $sendReport); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'sendReport' + * + * @param int $campaignId Id of the campaign (required) + * @param \Brevo\Client\Model\SendReport $sendReport Values for send a report (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function sendReportRequest($campaignId, $sendReport) + { + // verify the required parameter 'campaignId' is set + if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $campaignId when calling sendReport' + ); + } + // verify the required parameter 'sendReport' is set + if ($sendReport === null || (is_array($sendReport) && count($sendReport) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $sendReport when calling sendReport' + ); + } + + $resourcePath = '/emailCampaigns/{campaignId}/sendReport'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($campaignId !== null) { + $resourcePath = str_replace( + '{' . 'campaignId' . '}', + ObjectSerializer::toPathValue($campaignId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($sendReport)) { + $_tempBody = $sendReport; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation sendTestEmail + * + * Send an email campaign to your test list + * + * @param int $campaignId Id of the campaign (required) + * @param \Brevo\Client\Model\SendTestEmail $emailTo emailTo (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function sendTestEmail($campaignId, $emailTo) + { + $this->sendTestEmailWithHttpInfo($campaignId, $emailTo); + } + + /** + * Operation sendTestEmailWithHttpInfo + * + * Send an email campaign to your test list + * + * @param int $campaignId Id of the campaign (required) + * @param \Brevo\Client\Model\SendTestEmail $emailTo (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function sendTestEmailWithHttpInfo($campaignId, $emailTo) + { + $returnType = ''; + $request = $this->sendTestEmailRequest($campaignId, $emailTo); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\PostSendFailed', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation sendTestEmailAsync + * + * Send an email campaign to your test list + * + * @param int $campaignId Id of the campaign (required) + * @param \Brevo\Client\Model\SendTestEmail $emailTo (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function sendTestEmailAsync($campaignId, $emailTo) + { + return $this->sendTestEmailAsyncWithHttpInfo($campaignId, $emailTo) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation sendTestEmailAsyncWithHttpInfo + * + * Send an email campaign to your test list + * + * @param int $campaignId Id of the campaign (required) + * @param \Brevo\Client\Model\SendTestEmail $emailTo (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function sendTestEmailAsyncWithHttpInfo($campaignId, $emailTo) + { + $returnType = ''; + $request = $this->sendTestEmailRequest($campaignId, $emailTo); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'sendTestEmail' + * + * @param int $campaignId Id of the campaign (required) + * @param \Brevo\Client\Model\SendTestEmail $emailTo (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function sendTestEmailRequest($campaignId, $emailTo) + { + // verify the required parameter 'campaignId' is set + if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $campaignId when calling sendTestEmail' + ); + } + // verify the required parameter 'emailTo' is set + if ($emailTo === null || (is_array($emailTo) && count($emailTo) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $emailTo when calling sendTestEmail' + ); + } + + $resourcePath = '/emailCampaigns/{campaignId}/sendTest'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($campaignId !== null) { + $resourcePath = str_replace( + '{' . 'campaignId' . '}', + ObjectSerializer::toPathValue($campaignId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($emailTo)) { + $_tempBody = $emailTo; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation updateCampaignStatus + * + * Update an email campaign status + * + * @param int $campaignId Id of the campaign (required) + * @param \Brevo\Client\Model\UpdateCampaignStatus $status Status of the campaign (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function updateCampaignStatus($campaignId, $status) + { + $this->updateCampaignStatusWithHttpInfo($campaignId, $status); + } + + /** + * Operation updateCampaignStatusWithHttpInfo + * + * Update an email campaign status + * + * @param int $campaignId Id of the campaign (required) + * @param \Brevo\Client\Model\UpdateCampaignStatus $status Status of the campaign (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function updateCampaignStatusWithHttpInfo($campaignId, $status) + { + $returnType = ''; + $request = $this->updateCampaignStatusRequest($campaignId, $status); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation updateCampaignStatusAsync + * + * Update an email campaign status + * + * @param int $campaignId Id of the campaign (required) + * @param \Brevo\Client\Model\UpdateCampaignStatus $status Status of the campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateCampaignStatusAsync($campaignId, $status) + { + return $this->updateCampaignStatusAsyncWithHttpInfo($campaignId, $status) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateCampaignStatusAsyncWithHttpInfo + * + * Update an email campaign status + * + * @param int $campaignId Id of the campaign (required) + * @param \Brevo\Client\Model\UpdateCampaignStatus $status Status of the campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateCampaignStatusAsyncWithHttpInfo($campaignId, $status) + { + $returnType = ''; + $request = $this->updateCampaignStatusRequest($campaignId, $status); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'updateCampaignStatus' + * + * @param int $campaignId Id of the campaign (required) + * @param \Brevo\Client\Model\UpdateCampaignStatus $status Status of the campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function updateCampaignStatusRequest($campaignId, $status) + { + // verify the required parameter 'campaignId' is set + if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $campaignId when calling updateCampaignStatus' + ); + } + // verify the required parameter 'status' is set + if ($status === null || (is_array($status) && count($status) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $status when calling updateCampaignStatus' + ); + } + + $resourcePath = '/emailCampaigns/{campaignId}/status'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($campaignId !== null) { + $resourcePath = str_replace( + '{' . 'campaignId' . '}', + ObjectSerializer::toPathValue($campaignId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($status)) { + $_tempBody = $status; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation updateEmailCampaign + * + * Update an email campaign + * + * @param int $campaignId Id of the campaign (required) + * @param \Brevo\Client\Model\UpdateEmailCampaign $emailCampaign Values to update a campaign (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function updateEmailCampaign($campaignId, $emailCampaign) + { + $this->updateEmailCampaignWithHttpInfo($campaignId, $emailCampaign); + } + + /** + * Operation updateEmailCampaignWithHttpInfo + * + * Update an email campaign + * + * @param int $campaignId Id of the campaign (required) + * @param \Brevo\Client\Model\UpdateEmailCampaign $emailCampaign Values to update a campaign (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function updateEmailCampaignWithHttpInfo($campaignId, $emailCampaign) + { + $returnType = ''; + $request = $this->updateEmailCampaignRequest($campaignId, $emailCampaign); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation updateEmailCampaignAsync + * + * Update an email campaign + * + * @param int $campaignId Id of the campaign (required) + * @param \Brevo\Client\Model\UpdateEmailCampaign $emailCampaign Values to update a campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateEmailCampaignAsync($campaignId, $emailCampaign) + { + return $this->updateEmailCampaignAsyncWithHttpInfo($campaignId, $emailCampaign) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateEmailCampaignAsyncWithHttpInfo + * + * Update an email campaign + * + * @param int $campaignId Id of the campaign (required) + * @param \Brevo\Client\Model\UpdateEmailCampaign $emailCampaign Values to update a campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateEmailCampaignAsyncWithHttpInfo($campaignId, $emailCampaign) + { + $returnType = ''; + $request = $this->updateEmailCampaignRequest($campaignId, $emailCampaign); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'updateEmailCampaign' + * + * @param int $campaignId Id of the campaign (required) + * @param \Brevo\Client\Model\UpdateEmailCampaign $emailCampaign Values to update a campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function updateEmailCampaignRequest($campaignId, $emailCampaign) + { + // verify the required parameter 'campaignId' is set + if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $campaignId when calling updateEmailCampaign' + ); + } + // verify the required parameter 'emailCampaign' is set + if ($emailCampaign === null || (is_array($emailCampaign) && count($emailCampaign) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $emailCampaign when calling updateEmailCampaign' + ); + } + + $resourcePath = '/emailCampaigns/{campaignId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($campaignId !== null) { + $resourcePath = str_replace( + '{' . 'campaignId' . '}', + ObjectSerializer::toPathValue($campaignId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($emailCampaign)) { + $_tempBody = $emailCampaign; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation uploadImageToGallery + * + * Upload an image to your account's image gallery + * + * @param \Brevo\Client\Model\UploadImageToGallery $uploadImage Parameters to upload an image (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\UploadImageModel + */ + public function uploadImageToGallery($uploadImage) + { + list($response) = $this->uploadImageToGalleryWithHttpInfo($uploadImage); + return $response; + } + + /** + * Operation uploadImageToGalleryWithHttpInfo + * + * Upload an image to your account's image gallery + * + * @param \Brevo\Client\Model\UploadImageToGallery $uploadImage Parameters to upload an image (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\UploadImageModel, HTTP status code, HTTP response headers (array of strings) + */ + public function uploadImageToGalleryWithHttpInfo($uploadImage) + { + $returnType = '\Brevo\Client\Model\UploadImageModel'; + $request = $this->uploadImageToGalleryRequest($uploadImage); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\UploadImageModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation uploadImageToGalleryAsync + * + * Upload an image to your account's image gallery + * + * @param \Brevo\Client\Model\UploadImageToGallery $uploadImage Parameters to upload an image (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function uploadImageToGalleryAsync($uploadImage) + { + return $this->uploadImageToGalleryAsyncWithHttpInfo($uploadImage) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation uploadImageToGalleryAsyncWithHttpInfo + * + * Upload an image to your account's image gallery + * + * @param \Brevo\Client\Model\UploadImageToGallery $uploadImage Parameters to upload an image (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function uploadImageToGalleryAsyncWithHttpInfo($uploadImage) + { + $returnType = '\Brevo\Client\Model\UploadImageModel'; + $request = $this->uploadImageToGalleryRequest($uploadImage); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'uploadImageToGallery' + * + * @param \Brevo\Client\Model\UploadImageToGallery $uploadImage Parameters to upload an image (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function uploadImageToGalleryRequest($uploadImage) + { + // verify the required parameter 'uploadImage' is set + if ($uploadImage === null || (is_array($uploadImage) && count($uploadImage) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $uploadImage when calling uploadImageToGallery' + ); + } + + $resourcePath = '/emailCampaigns/images'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($uploadImage)) { + $_tempBody = $uploadImage; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/vendor/getbrevo/brevo-php/lib/Api/EventsApi.php b/vendor/getbrevo/brevo-php/lib/Api/EventsApi.php new file mode 100644 index 0000000..88a81c4 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Api/EventsApi.php @@ -0,0 +1,361 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation createEvent + * + * Create an event + * + * @param \Brevo\Client\Model\Event $event event (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function createEvent($event) + { + $this->createEventWithHttpInfo($event); + } + + /** + * Operation createEventWithHttpInfo + * + * Create an event + * + * @param \Brevo\Client\Model\Event $event (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function createEventWithHttpInfo($event) + { + $returnType = ''; + $request = $this->createEventRequest($event); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation createEventAsync + * + * Create an event + * + * @param \Brevo\Client\Model\Event $event (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createEventAsync($event) + { + return $this->createEventAsyncWithHttpInfo($event) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createEventAsyncWithHttpInfo + * + * Create an event + * + * @param \Brevo\Client\Model\Event $event (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createEventAsyncWithHttpInfo($event) + { + $returnType = ''; + $request = $this->createEventRequest($event); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createEvent' + * + * @param \Brevo\Client\Model\Event $event (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function createEventRequest($event) + { + // verify the required parameter 'event' is set + if ($event === null || (is_array($event) && count($event) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $event when calling createEvent' + ); + } + + $resourcePath = '/events'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($event)) { + $_tempBody = $event; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/vendor/getbrevo/brevo-php/lib/Api/ExternalFeedsApi.php b/vendor/getbrevo/brevo-php/lib/Api/ExternalFeedsApi.php new file mode 100644 index 0000000..3970d76 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Api/ExternalFeedsApi.php @@ -0,0 +1,1561 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation createExternalFeed + * + * Create an external feed + * + * @param \Brevo\Client\Model\CreateExternalFeed $createExternalFeed Values to create a feed (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\InlineResponse2015 + */ + public function createExternalFeed($createExternalFeed) + { + list($response) = $this->createExternalFeedWithHttpInfo($createExternalFeed); + return $response; + } + + /** + * Operation createExternalFeedWithHttpInfo + * + * Create an external feed + * + * @param \Brevo\Client\Model\CreateExternalFeed $createExternalFeed Values to create a feed (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\InlineResponse2015, HTTP status code, HTTP response headers (array of strings) + */ + public function createExternalFeedWithHttpInfo($createExternalFeed) + { + $returnType = '\Brevo\Client\Model\InlineResponse2015'; + $request = $this->createExternalFeedRequest($createExternalFeed); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\InlineResponse2015', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation createExternalFeedAsync + * + * Create an external feed + * + * @param \Brevo\Client\Model\CreateExternalFeed $createExternalFeed Values to create a feed (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createExternalFeedAsync($createExternalFeed) + { + return $this->createExternalFeedAsyncWithHttpInfo($createExternalFeed) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createExternalFeedAsyncWithHttpInfo + * + * Create an external feed + * + * @param \Brevo\Client\Model\CreateExternalFeed $createExternalFeed Values to create a feed (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createExternalFeedAsyncWithHttpInfo($createExternalFeed) + { + $returnType = '\Brevo\Client\Model\InlineResponse2015'; + $request = $this->createExternalFeedRequest($createExternalFeed); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createExternalFeed' + * + * @param \Brevo\Client\Model\CreateExternalFeed $createExternalFeed Values to create a feed (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function createExternalFeedRequest($createExternalFeed) + { + // verify the required parameter 'createExternalFeed' is set + if ($createExternalFeed === null || (is_array($createExternalFeed) && count($createExternalFeed) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $createExternalFeed when calling createExternalFeed' + ); + } + + $resourcePath = '/feeds'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($createExternalFeed)) { + $_tempBody = $createExternalFeed; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation deleteExternalFeed + * + * Delete an external feed + * + * @param string $uuid UUID of the feed to delete (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function deleteExternalFeed($uuid) + { + $this->deleteExternalFeedWithHttpInfo($uuid); + } + + /** + * Operation deleteExternalFeedWithHttpInfo + * + * Delete an external feed + * + * @param string $uuid UUID of the feed to delete (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteExternalFeedWithHttpInfo($uuid) + { + $returnType = ''; + $request = $this->deleteExternalFeedRequest($uuid); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation deleteExternalFeedAsync + * + * Delete an external feed + * + * @param string $uuid UUID of the feed to delete (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteExternalFeedAsync($uuid) + { + return $this->deleteExternalFeedAsyncWithHttpInfo($uuid) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteExternalFeedAsyncWithHttpInfo + * + * Delete an external feed + * + * @param string $uuid UUID of the feed to delete (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteExternalFeedAsyncWithHttpInfo($uuid) + { + $returnType = ''; + $request = $this->deleteExternalFeedRequest($uuid); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'deleteExternalFeed' + * + * @param string $uuid UUID of the feed to delete (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function deleteExternalFeedRequest($uuid) + { + // verify the required parameter 'uuid' is set + if ($uuid === null || (is_array($uuid) && count($uuid) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $uuid when calling deleteExternalFeed' + ); + } + + $resourcePath = '/feeds/{uuid}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($uuid !== null) { + $resourcePath = str_replace( + '{' . 'uuid' . '}', + ObjectSerializer::toPathValue($uuid), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getAllExternalFeeds + * + * Fetch all external feeds + * + * @param string $search Can be used to filter records by search keyword on feed name (optional) + * @param \DateTime $startDate Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older than current date. (optional) + * @param \DateTime $endDate Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed. (optional, default to desc) + * @param string $authType Filter the records by `authType` of the feed. (optional) + * @param int $limit Number of documents returned per page. (optional, default to 50) + * @param int $offset Index of the first document on the page. (optional, default to 0) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetAllExternalFeeds + */ + public function getAllExternalFeeds($search = null, $startDate = null, $endDate = null, $sort = 'desc', $authType = null, $limit = '50', $offset = '0') + { + list($response) = $this->getAllExternalFeedsWithHttpInfo($search, $startDate, $endDate, $sort, $authType, $limit, $offset); + return $response; + } + + /** + * Operation getAllExternalFeedsWithHttpInfo + * + * Fetch all external feeds + * + * @param string $search Can be used to filter records by search keyword on feed name (optional) + * @param \DateTime $startDate Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older than current date. (optional) + * @param \DateTime $endDate Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed. (optional, default to desc) + * @param string $authType Filter the records by `authType` of the feed. (optional) + * @param int $limit Number of documents returned per page. (optional, default to 50) + * @param int $offset Index of the first document on the page. (optional, default to 0) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetAllExternalFeeds, HTTP status code, HTTP response headers (array of strings) + */ + public function getAllExternalFeedsWithHttpInfo($search = null, $startDate = null, $endDate = null, $sort = 'desc', $authType = null, $limit = '50', $offset = '0') + { + $returnType = '\Brevo\Client\Model\GetAllExternalFeeds'; + $request = $this->getAllExternalFeedsRequest($search, $startDate, $endDate, $sort, $authType, $limit, $offset); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetAllExternalFeeds', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getAllExternalFeedsAsync + * + * Fetch all external feeds + * + * @param string $search Can be used to filter records by search keyword on feed name (optional) + * @param \DateTime $startDate Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older than current date. (optional) + * @param \DateTime $endDate Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed. (optional, default to desc) + * @param string $authType Filter the records by `authType` of the feed. (optional) + * @param int $limit Number of documents returned per page. (optional, default to 50) + * @param int $offset Index of the first document on the page. (optional, default to 0) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getAllExternalFeedsAsync($search = null, $startDate = null, $endDate = null, $sort = 'desc', $authType = null, $limit = '50', $offset = '0') + { + return $this->getAllExternalFeedsAsyncWithHttpInfo($search, $startDate, $endDate, $sort, $authType, $limit, $offset) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getAllExternalFeedsAsyncWithHttpInfo + * + * Fetch all external feeds + * + * @param string $search Can be used to filter records by search keyword on feed name (optional) + * @param \DateTime $startDate Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older than current date. (optional) + * @param \DateTime $endDate Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed. (optional, default to desc) + * @param string $authType Filter the records by `authType` of the feed. (optional) + * @param int $limit Number of documents returned per page. (optional, default to 50) + * @param int $offset Index of the first document on the page. (optional, default to 0) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getAllExternalFeedsAsyncWithHttpInfo($search = null, $startDate = null, $endDate = null, $sort = 'desc', $authType = null, $limit = '50', $offset = '0') + { + $returnType = '\Brevo\Client\Model\GetAllExternalFeeds'; + $request = $this->getAllExternalFeedsRequest($search, $startDate, $endDate, $sort, $authType, $limit, $offset); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getAllExternalFeeds' + * + * @param string $search Can be used to filter records by search keyword on feed name (optional) + * @param \DateTime $startDate Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older than current date. (optional) + * @param \DateTime $endDate Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed. (optional, default to desc) + * @param string $authType Filter the records by `authType` of the feed. (optional) + * @param int $limit Number of documents returned per page. (optional, default to 50) + * @param int $offset Index of the first document on the page. (optional, default to 0) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getAllExternalFeedsRequest($search = null, $startDate = null, $endDate = null, $sort = 'desc', $authType = null, $limit = '50', $offset = '0') + { + if ($limit !== null && $limit > 500) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling ExternalFeedsApi.getAllExternalFeeds, must be smaller than or equal to 500.'); + } + if ($limit !== null && $limit < 0) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling ExternalFeedsApi.getAllExternalFeeds, must be bigger than or equal to 0.'); + } + + + $resourcePath = '/feeds'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($search !== null) { + $queryParams['search'] = ObjectSerializer::toQueryValue($search); + } + // query params + if ($startDate !== null) { + $queryParams['startDate'] = ObjectSerializer::toQueryValue($startDate); + } + // query params + if ($endDate !== null) { + $queryParams['endDate'] = ObjectSerializer::toQueryValue($endDate); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); + } + // query params + if ($authType !== null) { + $queryParams['authType'] = ObjectSerializer::toQueryValue($authType); + } + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getExternalFeedByUUID + * + * Get an external feed by UUID + * + * @param string $uuid UUID of the feed to fetch (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetExternalFeedByUUID + */ + public function getExternalFeedByUUID($uuid) + { + list($response) = $this->getExternalFeedByUUIDWithHttpInfo($uuid); + return $response; + } + + /** + * Operation getExternalFeedByUUIDWithHttpInfo + * + * Get an external feed by UUID + * + * @param string $uuid UUID of the feed to fetch (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetExternalFeedByUUID, HTTP status code, HTTP response headers (array of strings) + */ + public function getExternalFeedByUUIDWithHttpInfo($uuid) + { + $returnType = '\Brevo\Client\Model\GetExternalFeedByUUID'; + $request = $this->getExternalFeedByUUIDRequest($uuid); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetExternalFeedByUUID', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getExternalFeedByUUIDAsync + * + * Get an external feed by UUID + * + * @param string $uuid UUID of the feed to fetch (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getExternalFeedByUUIDAsync($uuid) + { + return $this->getExternalFeedByUUIDAsyncWithHttpInfo($uuid) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getExternalFeedByUUIDAsyncWithHttpInfo + * + * Get an external feed by UUID + * + * @param string $uuid UUID of the feed to fetch (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getExternalFeedByUUIDAsyncWithHttpInfo($uuid) + { + $returnType = '\Brevo\Client\Model\GetExternalFeedByUUID'; + $request = $this->getExternalFeedByUUIDRequest($uuid); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getExternalFeedByUUID' + * + * @param string $uuid UUID of the feed to fetch (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getExternalFeedByUUIDRequest($uuid) + { + // verify the required parameter 'uuid' is set + if ($uuid === null || (is_array($uuid) && count($uuid) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $uuid when calling getExternalFeedByUUID' + ); + } + + $resourcePath = '/feeds/{uuid}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($uuid !== null) { + $resourcePath = str_replace( + '{' . 'uuid' . '}', + ObjectSerializer::toPathValue($uuid), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation updateExternalFeed + * + * Update an external feed + * + * @param string $uuid UUID of the feed to update (required) + * @param \Brevo\Client\Model\UpdateExternalFeed $updateExternalFeed Values to update a feed (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function updateExternalFeed($uuid, $updateExternalFeed) + { + $this->updateExternalFeedWithHttpInfo($uuid, $updateExternalFeed); + } + + /** + * Operation updateExternalFeedWithHttpInfo + * + * Update an external feed + * + * @param string $uuid UUID of the feed to update (required) + * @param \Brevo\Client\Model\UpdateExternalFeed $updateExternalFeed Values to update a feed (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function updateExternalFeedWithHttpInfo($uuid, $updateExternalFeed) + { + $returnType = ''; + $request = $this->updateExternalFeedRequest($uuid, $updateExternalFeed); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation updateExternalFeedAsync + * + * Update an external feed + * + * @param string $uuid UUID of the feed to update (required) + * @param \Brevo\Client\Model\UpdateExternalFeed $updateExternalFeed Values to update a feed (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateExternalFeedAsync($uuid, $updateExternalFeed) + { + return $this->updateExternalFeedAsyncWithHttpInfo($uuid, $updateExternalFeed) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateExternalFeedAsyncWithHttpInfo + * + * Update an external feed + * + * @param string $uuid UUID of the feed to update (required) + * @param \Brevo\Client\Model\UpdateExternalFeed $updateExternalFeed Values to update a feed (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateExternalFeedAsyncWithHttpInfo($uuid, $updateExternalFeed) + { + $returnType = ''; + $request = $this->updateExternalFeedRequest($uuid, $updateExternalFeed); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'updateExternalFeed' + * + * @param string $uuid UUID of the feed to update (required) + * @param \Brevo\Client\Model\UpdateExternalFeed $updateExternalFeed Values to update a feed (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function updateExternalFeedRequest($uuid, $updateExternalFeed) + { + // verify the required parameter 'uuid' is set + if ($uuid === null || (is_array($uuid) && count($uuid) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $uuid when calling updateExternalFeed' + ); + } + // verify the required parameter 'updateExternalFeed' is set + if ($updateExternalFeed === null || (is_array($updateExternalFeed) && count($updateExternalFeed) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $updateExternalFeed when calling updateExternalFeed' + ); + } + + $resourcePath = '/feeds/{uuid}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($uuid !== null) { + $resourcePath = str_replace( + '{' . 'uuid' . '}', + ObjectSerializer::toPathValue($uuid), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($updateExternalFeed)) { + $_tempBody = $updateExternalFeed; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/vendor/getbrevo/brevo-php/lib/Api/FilesApi.php b/vendor/getbrevo/brevo-php/lib/Api/FilesApi.php new file mode 100644 index 0000000..ee1f190 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Api/FilesApi.php @@ -0,0 +1,1598 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation crmFilesGet + * + * Get all files + * + * @param string $entity Filter by file entity type (optional) + * @param string $entityIds Filter by file entity IDs (optional) + * @param int $dateFrom dateFrom to date range filter type (timestamp in milliseconds) (optional) + * @param int $dateTo dateTo to date range filter type (timestamp in milliseconds) (optional) + * @param int $offset Index of the first document of the page (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\FileList + */ + public function crmFilesGet($entity = null, $entityIds = null, $dateFrom = null, $dateTo = null, $offset = null, $limit = '50', $sort = null) + { + list($response) = $this->crmFilesGetWithHttpInfo($entity, $entityIds, $dateFrom, $dateTo, $offset, $limit, $sort); + return $response; + } + + /** + * Operation crmFilesGetWithHttpInfo + * + * Get all files + * + * @param string $entity Filter by file entity type (optional) + * @param string $entityIds Filter by file entity IDs (optional) + * @param int $dateFrom dateFrom to date range filter type (timestamp in milliseconds) (optional) + * @param int $dateTo dateTo to date range filter type (timestamp in milliseconds) (optional) + * @param int $offset Index of the first document of the page (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\FileList, HTTP status code, HTTP response headers (array of strings) + */ + public function crmFilesGetWithHttpInfo($entity = null, $entityIds = null, $dateFrom = null, $dateTo = null, $offset = null, $limit = '50', $sort = null) + { + $returnType = '\Brevo\Client\Model\FileList'; + $request = $this->crmFilesGetRequest($entity, $entityIds, $dateFrom, $dateTo, $offset, $limit, $sort); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\FileList', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation crmFilesGetAsync + * + * Get all files + * + * @param string $entity Filter by file entity type (optional) + * @param string $entityIds Filter by file entity IDs (optional) + * @param int $dateFrom dateFrom to date range filter type (timestamp in milliseconds) (optional) + * @param int $dateTo dateTo to date range filter type (timestamp in milliseconds) (optional) + * @param int $offset Index of the first document of the page (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmFilesGetAsync($entity = null, $entityIds = null, $dateFrom = null, $dateTo = null, $offset = null, $limit = '50', $sort = null) + { + return $this->crmFilesGetAsyncWithHttpInfo($entity, $entityIds, $dateFrom, $dateTo, $offset, $limit, $sort) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation crmFilesGetAsyncWithHttpInfo + * + * Get all files + * + * @param string $entity Filter by file entity type (optional) + * @param string $entityIds Filter by file entity IDs (optional) + * @param int $dateFrom dateFrom to date range filter type (timestamp in milliseconds) (optional) + * @param int $dateTo dateTo to date range filter type (timestamp in milliseconds) (optional) + * @param int $offset Index of the first document of the page (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmFilesGetAsyncWithHttpInfo($entity = null, $entityIds = null, $dateFrom = null, $dateTo = null, $offset = null, $limit = '50', $sort = null) + { + $returnType = '\Brevo\Client\Model\FileList'; + $request = $this->crmFilesGetRequest($entity, $entityIds, $dateFrom, $dateTo, $offset, $limit, $sort); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'crmFilesGet' + * + * @param string $entity Filter by file entity type (optional) + * @param string $entityIds Filter by file entity IDs (optional) + * @param int $dateFrom dateFrom to date range filter type (timestamp in milliseconds) (optional) + * @param int $dateTo dateTo to date range filter type (timestamp in milliseconds) (optional) + * @param int $offset Index of the first document of the page (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function crmFilesGetRequest($entity = null, $entityIds = null, $dateFrom = null, $dateTo = null, $offset = null, $limit = '50', $sort = null) + { + + $resourcePath = '/crm/files'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($entity !== null) { + $queryParams['entity'] = ObjectSerializer::toQueryValue($entity); + } + // query params + if ($entityIds !== null) { + $queryParams['entityIds'] = ObjectSerializer::toQueryValue($entityIds); + } + // query params + if ($dateFrom !== null) { + $queryParams['dateFrom'] = ObjectSerializer::toQueryValue($dateFrom); + } + // query params + if ($dateTo !== null) { + $queryParams['dateTo'] = ObjectSerializer::toQueryValue($dateTo); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation crmFilesIdDataGet + * + * Get file details + * + * @param string $id File id to get file data. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\FileData + */ + public function crmFilesIdDataGet($id) + { + list($response) = $this->crmFilesIdDataGetWithHttpInfo($id); + return $response; + } + + /** + * Operation crmFilesIdDataGetWithHttpInfo + * + * Get file details + * + * @param string $id File id to get file data. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\FileData, HTTP status code, HTTP response headers (array of strings) + */ + public function crmFilesIdDataGetWithHttpInfo($id) + { + $returnType = '\Brevo\Client\Model\FileData'; + $request = $this->crmFilesIdDataGetRequest($id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\FileData', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation crmFilesIdDataGetAsync + * + * Get file details + * + * @param string $id File id to get file data. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmFilesIdDataGetAsync($id) + { + return $this->crmFilesIdDataGetAsyncWithHttpInfo($id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation crmFilesIdDataGetAsyncWithHttpInfo + * + * Get file details + * + * @param string $id File id to get file data. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmFilesIdDataGetAsyncWithHttpInfo($id) + { + $returnType = '\Brevo\Client\Model\FileData'; + $request = $this->crmFilesIdDataGetRequest($id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'crmFilesIdDataGet' + * + * @param string $id File id to get file data. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function crmFilesIdDataGetRequest($id) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling crmFilesIdDataGet' + ); + } + + $resourcePath = '/crm/files/{id}/data'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation crmFilesIdDelete + * + * Delete a file + * + * @param string $id File id to delete. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function crmFilesIdDelete($id) + { + $this->crmFilesIdDeleteWithHttpInfo($id); + } + + /** + * Operation crmFilesIdDeleteWithHttpInfo + * + * Delete a file + * + * @param string $id File id to delete. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function crmFilesIdDeleteWithHttpInfo($id) + { + $returnType = ''; + $request = $this->crmFilesIdDeleteRequest($id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation crmFilesIdDeleteAsync + * + * Delete a file + * + * @param string $id File id to delete. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmFilesIdDeleteAsync($id) + { + return $this->crmFilesIdDeleteAsyncWithHttpInfo($id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation crmFilesIdDeleteAsyncWithHttpInfo + * + * Delete a file + * + * @param string $id File id to delete. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmFilesIdDeleteAsyncWithHttpInfo($id) + { + $returnType = ''; + $request = $this->crmFilesIdDeleteRequest($id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'crmFilesIdDelete' + * + * @param string $id File id to delete. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function crmFilesIdDeleteRequest($id) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling crmFilesIdDelete' + ); + } + + $resourcePath = '/crm/files/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation crmFilesIdGet + * + * Download a file + * + * @param string $id File id to download. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\FileDownloadableLink + */ + public function crmFilesIdGet($id) + { + list($response) = $this->crmFilesIdGetWithHttpInfo($id); + return $response; + } + + /** + * Operation crmFilesIdGetWithHttpInfo + * + * Download a file + * + * @param string $id File id to download. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\FileDownloadableLink, HTTP status code, HTTP response headers (array of strings) + */ + public function crmFilesIdGetWithHttpInfo($id) + { + $returnType = '\Brevo\Client\Model\FileDownloadableLink'; + $request = $this->crmFilesIdGetRequest($id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\FileDownloadableLink', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation crmFilesIdGetAsync + * + * Download a file + * + * @param string $id File id to download. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmFilesIdGetAsync($id) + { + return $this->crmFilesIdGetAsyncWithHttpInfo($id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation crmFilesIdGetAsyncWithHttpInfo + * + * Download a file + * + * @param string $id File id to download. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmFilesIdGetAsyncWithHttpInfo($id) + { + $returnType = '\Brevo\Client\Model\FileDownloadableLink'; + $request = $this->crmFilesIdGetRequest($id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'crmFilesIdGet' + * + * @param string $id File id to download. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function crmFilesIdGetRequest($id) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling crmFilesIdGet' + ); + } + + $resourcePath = '/crm/files/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation crmFilesPost + * + * Upload a file + * + * @param \SplFileObject $file File data to create a file. (required) + * @param string $dealId Deal id linked to a file (optional) + * @param int $contactId Contact id linked to a file (optional) + * @param string $companyId Company id linked to a file (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\FileData + */ + public function crmFilesPost($file, $dealId = null, $contactId = null, $companyId = null) + { + list($response) = $this->crmFilesPostWithHttpInfo($file, $dealId, $contactId, $companyId); + return $response; + } + + /** + * Operation crmFilesPostWithHttpInfo + * + * Upload a file + * + * @param \SplFileObject $file File data to create a file. (required) + * @param string $dealId Deal id linked to a file (optional) + * @param int $contactId Contact id linked to a file (optional) + * @param string $companyId Company id linked to a file (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\FileData, HTTP status code, HTTP response headers (array of strings) + */ + public function crmFilesPostWithHttpInfo($file, $dealId = null, $contactId = null, $companyId = null) + { + $returnType = '\Brevo\Client\Model\FileData'; + $request = $this->crmFilesPostRequest($file, $dealId, $contactId, $companyId); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\FileData', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation crmFilesPostAsync + * + * Upload a file + * + * @param \SplFileObject $file File data to create a file. (required) + * @param string $dealId Deal id linked to a file (optional) + * @param int $contactId Contact id linked to a file (optional) + * @param string $companyId Company id linked to a file (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmFilesPostAsync($file, $dealId = null, $contactId = null, $companyId = null) + { + return $this->crmFilesPostAsyncWithHttpInfo($file, $dealId, $contactId, $companyId) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation crmFilesPostAsyncWithHttpInfo + * + * Upload a file + * + * @param \SplFileObject $file File data to create a file. (required) + * @param string $dealId Deal id linked to a file (optional) + * @param int $contactId Contact id linked to a file (optional) + * @param string $companyId Company id linked to a file (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmFilesPostAsyncWithHttpInfo($file, $dealId = null, $contactId = null, $companyId = null) + { + $returnType = '\Brevo\Client\Model\FileData'; + $request = $this->crmFilesPostRequest($file, $dealId, $contactId, $companyId); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'crmFilesPost' + * + * @param \SplFileObject $file File data to create a file. (required) + * @param string $dealId Deal id linked to a file (optional) + * @param int $contactId Contact id linked to a file (optional) + * @param string $companyId Company id linked to a file (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function crmFilesPostRequest($file, $dealId = null, $contactId = null, $companyId = null) + { + // verify the required parameter 'file' is set + if ($file === null || (is_array($file) && count($file) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $file when calling crmFilesPost' + ); + } + + $resourcePath = '/crm/files'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // form params + if ($file !== null) { + $multipart = true; + $formParams['file'] = \GuzzleHttp\Psr7\try_fopen(ObjectSerializer::toFormValue($file), 'rb'); + } + // form params + if ($dealId !== null) { + $formParams['dealId'] = ObjectSerializer::toFormValue($dealId); + } + // form params + if ($contactId !== null) { + $formParams['contactId'] = ObjectSerializer::toFormValue($contactId); + } + // form params + if ($companyId !== null) { + $formParams['companyId'] = ObjectSerializer::toFormValue($companyId); + } + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['multipart/form-data'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/vendor/getbrevo/brevo-php/lib/Api/FoldersApi.php b/vendor/getbrevo/brevo-php/lib/Api/FoldersApi.php new file mode 100644 index 0000000..80d50fb --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Api/FoldersApi.php @@ -0,0 +1,1852 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation createFolder + * + * Create a folder + * + * @param \Brevo\Client\Model\CreateUpdateFolder $createFolder Name of the folder (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\CreateModel + */ + public function createFolder($createFolder) + { + list($response) = $this->createFolderWithHttpInfo($createFolder); + return $response; + } + + /** + * Operation createFolderWithHttpInfo + * + * Create a folder + * + * @param \Brevo\Client\Model\CreateUpdateFolder $createFolder Name of the folder (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\CreateModel, HTTP status code, HTTP response headers (array of strings) + */ + public function createFolderWithHttpInfo($createFolder) + { + $returnType = '\Brevo\Client\Model\CreateModel'; + $request = $this->createFolderRequest($createFolder); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\CreateModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation createFolderAsync + * + * Create a folder + * + * @param \Brevo\Client\Model\CreateUpdateFolder $createFolder Name of the folder (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createFolderAsync($createFolder) + { + return $this->createFolderAsyncWithHttpInfo($createFolder) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createFolderAsyncWithHttpInfo + * + * Create a folder + * + * @param \Brevo\Client\Model\CreateUpdateFolder $createFolder Name of the folder (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createFolderAsyncWithHttpInfo($createFolder) + { + $returnType = '\Brevo\Client\Model\CreateModel'; + $request = $this->createFolderRequest($createFolder); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createFolder' + * + * @param \Brevo\Client\Model\CreateUpdateFolder $createFolder Name of the folder (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function createFolderRequest($createFolder) + { + // verify the required parameter 'createFolder' is set + if ($createFolder === null || (is_array($createFolder) && count($createFolder) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $createFolder when calling createFolder' + ); + } + + $resourcePath = '/contacts/folders'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($createFolder)) { + $_tempBody = $createFolder; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation deleteFolder + * + * Delete a folder (and all its lists) + * + * @param int $folderId Id of the folder (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function deleteFolder($folderId) + { + $this->deleteFolderWithHttpInfo($folderId); + } + + /** + * Operation deleteFolderWithHttpInfo + * + * Delete a folder (and all its lists) + * + * @param int $folderId Id of the folder (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteFolderWithHttpInfo($folderId) + { + $returnType = ''; + $request = $this->deleteFolderRequest($folderId); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation deleteFolderAsync + * + * Delete a folder (and all its lists) + * + * @param int $folderId Id of the folder (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteFolderAsync($folderId) + { + return $this->deleteFolderAsyncWithHttpInfo($folderId) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteFolderAsyncWithHttpInfo + * + * Delete a folder (and all its lists) + * + * @param int $folderId Id of the folder (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteFolderAsyncWithHttpInfo($folderId) + { + $returnType = ''; + $request = $this->deleteFolderRequest($folderId); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'deleteFolder' + * + * @param int $folderId Id of the folder (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function deleteFolderRequest($folderId) + { + // verify the required parameter 'folderId' is set + if ($folderId === null || (is_array($folderId) && count($folderId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $folderId when calling deleteFolder' + ); + } + + $resourcePath = '/contacts/folders/{folderId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($folderId !== null) { + $resourcePath = str_replace( + '{' . 'folderId' . '}', + ObjectSerializer::toPathValue($folderId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getFolder + * + * Returns a folder's details + * + * @param int $folderId id of the folder (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetFolder + */ + public function getFolder($folderId) + { + list($response) = $this->getFolderWithHttpInfo($folderId); + return $response; + } + + /** + * Operation getFolderWithHttpInfo + * + * Returns a folder's details + * + * @param int $folderId id of the folder (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetFolder, HTTP status code, HTTP response headers (array of strings) + */ + public function getFolderWithHttpInfo($folderId) + { + $returnType = '\Brevo\Client\Model\GetFolder'; + $request = $this->getFolderRequest($folderId); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetFolder', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getFolderAsync + * + * Returns a folder's details + * + * @param int $folderId id of the folder (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getFolderAsync($folderId) + { + return $this->getFolderAsyncWithHttpInfo($folderId) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getFolderAsyncWithHttpInfo + * + * Returns a folder's details + * + * @param int $folderId id of the folder (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getFolderAsyncWithHttpInfo($folderId) + { + $returnType = '\Brevo\Client\Model\GetFolder'; + $request = $this->getFolderRequest($folderId); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getFolder' + * + * @param int $folderId id of the folder (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getFolderRequest($folderId) + { + // verify the required parameter 'folderId' is set + if ($folderId === null || (is_array($folderId) && count($folderId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $folderId when calling getFolder' + ); + } + + $resourcePath = '/contacts/folders/{folderId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($folderId !== null) { + $resourcePath = str_replace( + '{' . 'folderId' . '}', + ObjectSerializer::toPathValue($folderId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getFolderLists + * + * Get lists in a folder + * + * @param int $folderId Id of the folder (required) + * @param int $limit Number of documents per page (optional, default to 10) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetFolderLists + */ + public function getFolderLists($folderId, $limit = '10', $offset = '0', $sort = 'desc') + { + list($response) = $this->getFolderListsWithHttpInfo($folderId, $limit, $offset, $sort); + return $response; + } + + /** + * Operation getFolderListsWithHttpInfo + * + * Get lists in a folder + * + * @param int $folderId Id of the folder (required) + * @param int $limit Number of documents per page (optional, default to 10) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetFolderLists, HTTP status code, HTTP response headers (array of strings) + */ + public function getFolderListsWithHttpInfo($folderId, $limit = '10', $offset = '0', $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetFolderLists'; + $request = $this->getFolderListsRequest($folderId, $limit, $offset, $sort); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetFolderLists', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getFolderListsAsync + * + * Get lists in a folder + * + * @param int $folderId Id of the folder (required) + * @param int $limit Number of documents per page (optional, default to 10) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getFolderListsAsync($folderId, $limit = '10', $offset = '0', $sort = 'desc') + { + return $this->getFolderListsAsyncWithHttpInfo($folderId, $limit, $offset, $sort) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getFolderListsAsyncWithHttpInfo + * + * Get lists in a folder + * + * @param int $folderId Id of the folder (required) + * @param int $limit Number of documents per page (optional, default to 10) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getFolderListsAsyncWithHttpInfo($folderId, $limit = '10', $offset = '0', $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetFolderLists'; + $request = $this->getFolderListsRequest($folderId, $limit, $offset, $sort); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getFolderLists' + * + * @param int $folderId Id of the folder (required) + * @param int $limit Number of documents per page (optional, default to 10) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getFolderListsRequest($folderId, $limit = '10', $offset = '0', $sort = 'desc') + { + // verify the required parameter 'folderId' is set + if ($folderId === null || (is_array($folderId) && count($folderId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $folderId when calling getFolderLists' + ); + } + if ($limit !== null && $limit > 50) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling FoldersApi.getFolderLists, must be smaller than or equal to 50.'); + } + + + $resourcePath = '/contacts/folders/{folderId}/lists'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); + } + + // path params + if ($folderId !== null) { + $resourcePath = str_replace( + '{' . 'folderId' . '}', + ObjectSerializer::toPathValue($folderId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getFolders + * + * Get all folders + * + * @param int $limit Number of documents per page (required) + * @param int $offset Index of the first document of the page (required) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetFolders + */ + public function getFolders($limit, $offset, $sort = 'desc') + { + list($response) = $this->getFoldersWithHttpInfo($limit, $offset, $sort); + return $response; + } + + /** + * Operation getFoldersWithHttpInfo + * + * Get all folders + * + * @param int $limit Number of documents per page (required) + * @param int $offset Index of the first document of the page (required) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetFolders, HTTP status code, HTTP response headers (array of strings) + */ + public function getFoldersWithHttpInfo($limit, $offset, $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetFolders'; + $request = $this->getFoldersRequest($limit, $offset, $sort); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetFolders', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getFoldersAsync + * + * Get all folders + * + * @param int $limit Number of documents per page (required) + * @param int $offset Index of the first document of the page (required) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getFoldersAsync($limit, $offset, $sort = 'desc') + { + return $this->getFoldersAsyncWithHttpInfo($limit, $offset, $sort) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getFoldersAsyncWithHttpInfo + * + * Get all folders + * + * @param int $limit Number of documents per page (required) + * @param int $offset Index of the first document of the page (required) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getFoldersAsyncWithHttpInfo($limit, $offset, $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetFolders'; + $request = $this->getFoldersRequest($limit, $offset, $sort); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getFolders' + * + * @param int $limit Number of documents per page (required) + * @param int $offset Index of the first document of the page (required) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getFoldersRequest($limit, $offset, $sort = 'desc') + { + // verify the required parameter 'limit' is set + if ($limit === null || (is_array($limit) && count($limit) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $limit when calling getFolders' + ); + } + if ($limit > 50) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling FoldersApi.getFolders, must be smaller than or equal to 50.'); + } + + // verify the required parameter 'offset' is set + if ($offset === null || (is_array($offset) && count($offset) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $offset when calling getFolders' + ); + } + + $resourcePath = '/contacts/folders'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation updateFolder + * + * Update a folder + * + * @param int $folderId Id of the folder (required) + * @param \Brevo\Client\Model\CreateUpdateFolder $updateFolder Name of the folder (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function updateFolder($folderId, $updateFolder) + { + $this->updateFolderWithHttpInfo($folderId, $updateFolder); + } + + /** + * Operation updateFolderWithHttpInfo + * + * Update a folder + * + * @param int $folderId Id of the folder (required) + * @param \Brevo\Client\Model\CreateUpdateFolder $updateFolder Name of the folder (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function updateFolderWithHttpInfo($folderId, $updateFolder) + { + $returnType = ''; + $request = $this->updateFolderRequest($folderId, $updateFolder); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation updateFolderAsync + * + * Update a folder + * + * @param int $folderId Id of the folder (required) + * @param \Brevo\Client\Model\CreateUpdateFolder $updateFolder Name of the folder (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateFolderAsync($folderId, $updateFolder) + { + return $this->updateFolderAsyncWithHttpInfo($folderId, $updateFolder) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateFolderAsyncWithHttpInfo + * + * Update a folder + * + * @param int $folderId Id of the folder (required) + * @param \Brevo\Client\Model\CreateUpdateFolder $updateFolder Name of the folder (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateFolderAsyncWithHttpInfo($folderId, $updateFolder) + { + $returnType = ''; + $request = $this->updateFolderRequest($folderId, $updateFolder); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'updateFolder' + * + * @param int $folderId Id of the folder (required) + * @param \Brevo\Client\Model\CreateUpdateFolder $updateFolder Name of the folder (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function updateFolderRequest($folderId, $updateFolder) + { + // verify the required parameter 'folderId' is set + if ($folderId === null || (is_array($folderId) && count($folderId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $folderId when calling updateFolder' + ); + } + // verify the required parameter 'updateFolder' is set + if ($updateFolder === null || (is_array($updateFolder) && count($updateFolder) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $updateFolder when calling updateFolder' + ); + } + + $resourcePath = '/contacts/folders/{folderId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($folderId !== null) { + $resourcePath = str_replace( + '{' . 'folderId' . '}', + ObjectSerializer::toPathValue($folderId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($updateFolder)) { + $_tempBody = $updateFolder; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/vendor/getbrevo/brevo-php/lib/Api/InboundParsingApi.php b/vendor/getbrevo/brevo-php/lib/Api/InboundParsingApi.php new file mode 100644 index 0000000..865dd15 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Api/InboundParsingApi.php @@ -0,0 +1,1019 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation getInboundEmailAttachment + * + * Retrieve inbound attachment with download token. + * + * @param string $downloadToken Token to fetch a particular attachment (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \SplFileObject + */ + public function getInboundEmailAttachment($downloadToken) + { + list($response) = $this->getInboundEmailAttachmentWithHttpInfo($downloadToken); + return $response; + } + + /** + * Operation getInboundEmailAttachmentWithHttpInfo + * + * Retrieve inbound attachment with download token. + * + * @param string $downloadToken Token to fetch a particular attachment (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \SplFileObject, HTTP status code, HTTP response headers (array of strings) + */ + public function getInboundEmailAttachmentWithHttpInfo($downloadToken) + { + $returnType = '\SplFileObject'; + $request = $this->getInboundEmailAttachmentRequest($downloadToken); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SplFileObject', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getInboundEmailAttachmentAsync + * + * Retrieve inbound attachment with download token. + * + * @param string $downloadToken Token to fetch a particular attachment (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getInboundEmailAttachmentAsync($downloadToken) + { + return $this->getInboundEmailAttachmentAsyncWithHttpInfo($downloadToken) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getInboundEmailAttachmentAsyncWithHttpInfo + * + * Retrieve inbound attachment with download token. + * + * @param string $downloadToken Token to fetch a particular attachment (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getInboundEmailAttachmentAsyncWithHttpInfo($downloadToken) + { + $returnType = '\SplFileObject'; + $request = $this->getInboundEmailAttachmentRequest($downloadToken); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getInboundEmailAttachment' + * + * @param string $downloadToken Token to fetch a particular attachment (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getInboundEmailAttachmentRequest($downloadToken) + { + // verify the required parameter 'downloadToken' is set + if ($downloadToken === null || (is_array($downloadToken) && count($downloadToken) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $downloadToken when calling getInboundEmailAttachment' + ); + } + + $resourcePath = '/inbound/attachments/{downloadToken}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($downloadToken !== null) { + $resourcePath = str_replace( + '{' . 'downloadToken' . '}', + ObjectSerializer::toPathValue($downloadToken), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getInboundEmailEvents + * + * Get the list of all the events for the received emails. + * + * @param string $sender Email address of the sender. (optional) + * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) from which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * @param int $limit Number of documents returned per page (optional, default to 100) + * @param int $offset Index of the first document on the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetInboundEmailEvents + */ + public function getInboundEmailEvents($sender = null, $startDate = null, $endDate = null, $limit = '100', $offset = '0', $sort = 'desc') + { + list($response) = $this->getInboundEmailEventsWithHttpInfo($sender, $startDate, $endDate, $limit, $offset, $sort); + return $response; + } + + /** + * Operation getInboundEmailEventsWithHttpInfo + * + * Get the list of all the events for the received emails. + * + * @param string $sender Email address of the sender. (optional) + * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) from which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * @param int $limit Number of documents returned per page (optional, default to 100) + * @param int $offset Index of the first document on the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetInboundEmailEvents, HTTP status code, HTTP response headers (array of strings) + */ + public function getInboundEmailEventsWithHttpInfo($sender = null, $startDate = null, $endDate = null, $limit = '100', $offset = '0', $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetInboundEmailEvents'; + $request = $this->getInboundEmailEventsRequest($sender, $startDate, $endDate, $limit, $offset, $sort); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetInboundEmailEvents', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getInboundEmailEventsAsync + * + * Get the list of all the events for the received emails. + * + * @param string $sender Email address of the sender. (optional) + * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) from which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * @param int $limit Number of documents returned per page (optional, default to 100) + * @param int $offset Index of the first document on the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getInboundEmailEventsAsync($sender = null, $startDate = null, $endDate = null, $limit = '100', $offset = '0', $sort = 'desc') + { + return $this->getInboundEmailEventsAsyncWithHttpInfo($sender, $startDate, $endDate, $limit, $offset, $sort) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getInboundEmailEventsAsyncWithHttpInfo + * + * Get the list of all the events for the received emails. + * + * @param string $sender Email address of the sender. (optional) + * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) from which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * @param int $limit Number of documents returned per page (optional, default to 100) + * @param int $offset Index of the first document on the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getInboundEmailEventsAsyncWithHttpInfo($sender = null, $startDate = null, $endDate = null, $limit = '100', $offset = '0', $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetInboundEmailEvents'; + $request = $this->getInboundEmailEventsRequest($sender, $startDate, $endDate, $limit, $offset, $sort); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getInboundEmailEvents' + * + * @param string $sender Email address of the sender. (optional) + * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) from which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * @param int $limit Number of documents returned per page (optional, default to 100) + * @param int $offset Index of the first document on the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getInboundEmailEventsRequest($sender = null, $startDate = null, $endDate = null, $limit = '100', $offset = '0', $sort = 'desc') + { + if ($limit !== null && $limit > 500) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling InboundParsingApi.getInboundEmailEvents, must be smaller than or equal to 500.'); + } + if ($limit !== null && $limit < 0) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling InboundParsingApi.getInboundEmailEvents, must be bigger than or equal to 0.'); + } + + + $resourcePath = '/inbound/events'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($sender !== null) { + $queryParams['sender'] = ObjectSerializer::toQueryValue($sender); + } + // query params + if ($startDate !== null) { + $queryParams['startDate'] = ObjectSerializer::toQueryValue($startDate); + } + // query params + if ($endDate !== null) { + $queryParams['endDate'] = ObjectSerializer::toQueryValue($endDate); + } + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getInboundEmailEventsByUuid + * + * Fetch all events history for one particular received email. + * + * @param string $uuid UUID to fetch events specific to recieved email (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetInboundEmailEventsByUuid + */ + public function getInboundEmailEventsByUuid($uuid) + { + list($response) = $this->getInboundEmailEventsByUuidWithHttpInfo($uuid); + return $response; + } + + /** + * Operation getInboundEmailEventsByUuidWithHttpInfo + * + * Fetch all events history for one particular received email. + * + * @param string $uuid UUID to fetch events specific to recieved email (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetInboundEmailEventsByUuid, HTTP status code, HTTP response headers (array of strings) + */ + public function getInboundEmailEventsByUuidWithHttpInfo($uuid) + { + $returnType = '\Brevo\Client\Model\GetInboundEmailEventsByUuid'; + $request = $this->getInboundEmailEventsByUuidRequest($uuid); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetInboundEmailEventsByUuid', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getInboundEmailEventsByUuidAsync + * + * Fetch all events history for one particular received email. + * + * @param string $uuid UUID to fetch events specific to recieved email (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getInboundEmailEventsByUuidAsync($uuid) + { + return $this->getInboundEmailEventsByUuidAsyncWithHttpInfo($uuid) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getInboundEmailEventsByUuidAsyncWithHttpInfo + * + * Fetch all events history for one particular received email. + * + * @param string $uuid UUID to fetch events specific to recieved email (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getInboundEmailEventsByUuidAsyncWithHttpInfo($uuid) + { + $returnType = '\Brevo\Client\Model\GetInboundEmailEventsByUuid'; + $request = $this->getInboundEmailEventsByUuidRequest($uuid); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getInboundEmailEventsByUuid' + * + * @param string $uuid UUID to fetch events specific to recieved email (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getInboundEmailEventsByUuidRequest($uuid) + { + // verify the required parameter 'uuid' is set + if ($uuid === null || (is_array($uuid) && count($uuid) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $uuid when calling getInboundEmailEventsByUuid' + ); + } + + $resourcePath = '/inbound/events/{uuid}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($uuid !== null) { + $resourcePath = str_replace( + '{' . 'uuid' . '}', + ObjectSerializer::toPathValue($uuid), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/vendor/getbrevo/brevo-php/lib/Api/ListsApi.php b/vendor/getbrevo/brevo-php/lib/Api/ListsApi.php new file mode 100644 index 0000000..da332bd --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Api/ListsApi.php @@ -0,0 +1,2793 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation addContactToList + * + * Add existing contacts to a list + * + * @param int $listId Id of the list (required) + * @param \Brevo\Client\Model\AddContactToList $contactEmails Emails addresses OR IDs of the contacts (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\PostContactInfo + */ + public function addContactToList($listId, $contactEmails) + { + list($response) = $this->addContactToListWithHttpInfo($listId, $contactEmails); + return $response; + } + + /** + * Operation addContactToListWithHttpInfo + * + * Add existing contacts to a list + * + * @param int $listId Id of the list (required) + * @param \Brevo\Client\Model\AddContactToList $contactEmails Emails addresses OR IDs of the contacts (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\PostContactInfo, HTTP status code, HTTP response headers (array of strings) + */ + public function addContactToListWithHttpInfo($listId, $contactEmails) + { + $returnType = '\Brevo\Client\Model\PostContactInfo'; + $request = $this->addContactToListRequest($listId, $contactEmails); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\PostContactInfo', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation addContactToListAsync + * + * Add existing contacts to a list + * + * @param int $listId Id of the list (required) + * @param \Brevo\Client\Model\AddContactToList $contactEmails Emails addresses OR IDs of the contacts (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function addContactToListAsync($listId, $contactEmails) + { + return $this->addContactToListAsyncWithHttpInfo($listId, $contactEmails) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation addContactToListAsyncWithHttpInfo + * + * Add existing contacts to a list + * + * @param int $listId Id of the list (required) + * @param \Brevo\Client\Model\AddContactToList $contactEmails Emails addresses OR IDs of the contacts (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function addContactToListAsyncWithHttpInfo($listId, $contactEmails) + { + $returnType = '\Brevo\Client\Model\PostContactInfo'; + $request = $this->addContactToListRequest($listId, $contactEmails); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'addContactToList' + * + * @param int $listId Id of the list (required) + * @param \Brevo\Client\Model\AddContactToList $contactEmails Emails addresses OR IDs of the contacts (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function addContactToListRequest($listId, $contactEmails) + { + // verify the required parameter 'listId' is set + if ($listId === null || (is_array($listId) && count($listId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $listId when calling addContactToList' + ); + } + // verify the required parameter 'contactEmails' is set + if ($contactEmails === null || (is_array($contactEmails) && count($contactEmails) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $contactEmails when calling addContactToList' + ); + } + + $resourcePath = '/contacts/lists/{listId}/contacts/add'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($listId !== null) { + $resourcePath = str_replace( + '{' . 'listId' . '}', + ObjectSerializer::toPathValue($listId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($contactEmails)) { + $_tempBody = $contactEmails; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation createList + * + * Create a list + * + * @param \Brevo\Client\Model\CreateList $createList Values to create a list (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\CreateModel + */ + public function createList($createList) + { + list($response) = $this->createListWithHttpInfo($createList); + return $response; + } + + /** + * Operation createListWithHttpInfo + * + * Create a list + * + * @param \Brevo\Client\Model\CreateList $createList Values to create a list (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\CreateModel, HTTP status code, HTTP response headers (array of strings) + */ + public function createListWithHttpInfo($createList) + { + $returnType = '\Brevo\Client\Model\CreateModel'; + $request = $this->createListRequest($createList); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\CreateModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation createListAsync + * + * Create a list + * + * @param \Brevo\Client\Model\CreateList $createList Values to create a list (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createListAsync($createList) + { + return $this->createListAsyncWithHttpInfo($createList) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createListAsyncWithHttpInfo + * + * Create a list + * + * @param \Brevo\Client\Model\CreateList $createList Values to create a list (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createListAsyncWithHttpInfo($createList) + { + $returnType = '\Brevo\Client\Model\CreateModel'; + $request = $this->createListRequest($createList); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createList' + * + * @param \Brevo\Client\Model\CreateList $createList Values to create a list (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function createListRequest($createList) + { + // verify the required parameter 'createList' is set + if ($createList === null || (is_array($createList) && count($createList) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $createList when calling createList' + ); + } + + $resourcePath = '/contacts/lists'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($createList)) { + $_tempBody = $createList; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation deleteList + * + * Delete a list + * + * @param int $listId Id of the list (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function deleteList($listId) + { + $this->deleteListWithHttpInfo($listId); + } + + /** + * Operation deleteListWithHttpInfo + * + * Delete a list + * + * @param int $listId Id of the list (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteListWithHttpInfo($listId) + { + $returnType = ''; + $request = $this->deleteListRequest($listId); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation deleteListAsync + * + * Delete a list + * + * @param int $listId Id of the list (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteListAsync($listId) + { + return $this->deleteListAsyncWithHttpInfo($listId) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteListAsyncWithHttpInfo + * + * Delete a list + * + * @param int $listId Id of the list (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteListAsyncWithHttpInfo($listId) + { + $returnType = ''; + $request = $this->deleteListRequest($listId); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'deleteList' + * + * @param int $listId Id of the list (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function deleteListRequest($listId) + { + // verify the required parameter 'listId' is set + if ($listId === null || (is_array($listId) && count($listId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $listId when calling deleteList' + ); + } + + $resourcePath = '/contacts/lists/{listId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($listId !== null) { + $resourcePath = str_replace( + '{' . 'listId' . '}', + ObjectSerializer::toPathValue($listId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getContactsFromList + * + * Get contacts in a list + * + * @param int $listId Id of the list (required) + * @param string $modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetContacts + */ + public function getContactsFromList($listId, $modifiedSince = null, $limit = '50', $offset = '0', $sort = 'desc') + { + list($response) = $this->getContactsFromListWithHttpInfo($listId, $modifiedSince, $limit, $offset, $sort); + return $response; + } + + /** + * Operation getContactsFromListWithHttpInfo + * + * Get contacts in a list + * + * @param int $listId Id of the list (required) + * @param string $modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetContacts, HTTP status code, HTTP response headers (array of strings) + */ + public function getContactsFromListWithHttpInfo($listId, $modifiedSince = null, $limit = '50', $offset = '0', $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetContacts'; + $request = $this->getContactsFromListRequest($listId, $modifiedSince, $limit, $offset, $sort); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetContacts', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getContactsFromListAsync + * + * Get contacts in a list + * + * @param int $listId Id of the list (required) + * @param string $modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getContactsFromListAsync($listId, $modifiedSince = null, $limit = '50', $offset = '0', $sort = 'desc') + { + return $this->getContactsFromListAsyncWithHttpInfo($listId, $modifiedSince, $limit, $offset, $sort) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getContactsFromListAsyncWithHttpInfo + * + * Get contacts in a list + * + * @param int $listId Id of the list (required) + * @param string $modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getContactsFromListAsyncWithHttpInfo($listId, $modifiedSince = null, $limit = '50', $offset = '0', $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetContacts'; + $request = $this->getContactsFromListRequest($listId, $modifiedSince, $limit, $offset, $sort); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getContactsFromList' + * + * @param int $listId Id of the list (required) + * @param string $modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getContactsFromListRequest($listId, $modifiedSince = null, $limit = '50', $offset = '0', $sort = 'desc') + { + // verify the required parameter 'listId' is set + if ($listId === null || (is_array($listId) && count($listId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $listId when calling getContactsFromList' + ); + } + if ($limit !== null && $limit > 500) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling ListsApi.getContactsFromList, must be smaller than or equal to 500.'); + } + + + $resourcePath = '/contacts/lists/{listId}/contacts'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($modifiedSince !== null) { + $queryParams['modifiedSince'] = ObjectSerializer::toQueryValue($modifiedSince); + } + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); + } + + // path params + if ($listId !== null) { + $resourcePath = str_replace( + '{' . 'listId' . '}', + ObjectSerializer::toPathValue($listId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getFolderLists + * + * Get lists in a folder + * + * @param int $folderId Id of the folder (required) + * @param int $limit Number of documents per page (optional, default to 10) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetFolderLists + */ + public function getFolderLists($folderId, $limit = '10', $offset = '0', $sort = 'desc') + { + list($response) = $this->getFolderListsWithHttpInfo($folderId, $limit, $offset, $sort); + return $response; + } + + /** + * Operation getFolderListsWithHttpInfo + * + * Get lists in a folder + * + * @param int $folderId Id of the folder (required) + * @param int $limit Number of documents per page (optional, default to 10) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetFolderLists, HTTP status code, HTTP response headers (array of strings) + */ + public function getFolderListsWithHttpInfo($folderId, $limit = '10', $offset = '0', $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetFolderLists'; + $request = $this->getFolderListsRequest($folderId, $limit, $offset, $sort); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetFolderLists', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getFolderListsAsync + * + * Get lists in a folder + * + * @param int $folderId Id of the folder (required) + * @param int $limit Number of documents per page (optional, default to 10) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getFolderListsAsync($folderId, $limit = '10', $offset = '0', $sort = 'desc') + { + return $this->getFolderListsAsyncWithHttpInfo($folderId, $limit, $offset, $sort) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getFolderListsAsyncWithHttpInfo + * + * Get lists in a folder + * + * @param int $folderId Id of the folder (required) + * @param int $limit Number of documents per page (optional, default to 10) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getFolderListsAsyncWithHttpInfo($folderId, $limit = '10', $offset = '0', $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetFolderLists'; + $request = $this->getFolderListsRequest($folderId, $limit, $offset, $sort); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getFolderLists' + * + * @param int $folderId Id of the folder (required) + * @param int $limit Number of documents per page (optional, default to 10) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getFolderListsRequest($folderId, $limit = '10', $offset = '0', $sort = 'desc') + { + // verify the required parameter 'folderId' is set + if ($folderId === null || (is_array($folderId) && count($folderId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $folderId when calling getFolderLists' + ); + } + if ($limit !== null && $limit > 50) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling ListsApi.getFolderLists, must be smaller than or equal to 50.'); + } + + + $resourcePath = '/contacts/folders/{folderId}/lists'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); + } + + // path params + if ($folderId !== null) { + $resourcePath = str_replace( + '{' . 'folderId' . '}', + ObjectSerializer::toPathValue($folderId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getList + * + * Get a list's details + * + * @param int $listId Id of the list (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetExtendedList + */ + public function getList($listId) + { + list($response) = $this->getListWithHttpInfo($listId); + return $response; + } + + /** + * Operation getListWithHttpInfo + * + * Get a list's details + * + * @param int $listId Id of the list (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetExtendedList, HTTP status code, HTTP response headers (array of strings) + */ + public function getListWithHttpInfo($listId) + { + $returnType = '\Brevo\Client\Model\GetExtendedList'; + $request = $this->getListRequest($listId); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetExtendedList', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getListAsync + * + * Get a list's details + * + * @param int $listId Id of the list (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getListAsync($listId) + { + return $this->getListAsyncWithHttpInfo($listId) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getListAsyncWithHttpInfo + * + * Get a list's details + * + * @param int $listId Id of the list (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getListAsyncWithHttpInfo($listId) + { + $returnType = '\Brevo\Client\Model\GetExtendedList'; + $request = $this->getListRequest($listId); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getList' + * + * @param int $listId Id of the list (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getListRequest($listId) + { + // verify the required parameter 'listId' is set + if ($listId === null || (is_array($listId) && count($listId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $listId when calling getList' + ); + } + + $resourcePath = '/contacts/lists/{listId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($listId !== null) { + $resourcePath = str_replace( + '{' . 'listId' . '}', + ObjectSerializer::toPathValue($listId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getLists + * + * Get all the lists + * + * @param int $limit Number of documents per page (optional, default to 10) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetLists + */ + public function getLists($limit = '10', $offset = '0', $sort = 'desc') + { + list($response) = $this->getListsWithHttpInfo($limit, $offset, $sort); + return $response; + } + + /** + * Operation getListsWithHttpInfo + * + * Get all the lists + * + * @param int $limit Number of documents per page (optional, default to 10) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetLists, HTTP status code, HTTP response headers (array of strings) + */ + public function getListsWithHttpInfo($limit = '10', $offset = '0', $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetLists'; + $request = $this->getListsRequest($limit, $offset, $sort); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetLists', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getListsAsync + * + * Get all the lists + * + * @param int $limit Number of documents per page (optional, default to 10) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getListsAsync($limit = '10', $offset = '0', $sort = 'desc') + { + return $this->getListsAsyncWithHttpInfo($limit, $offset, $sort) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getListsAsyncWithHttpInfo + * + * Get all the lists + * + * @param int $limit Number of documents per page (optional, default to 10) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getListsAsyncWithHttpInfo($limit = '10', $offset = '0', $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetLists'; + $request = $this->getListsRequest($limit, $offset, $sort); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getLists' + * + * @param int $limit Number of documents per page (optional, default to 10) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getListsRequest($limit = '10', $offset = '0', $sort = 'desc') + { + if ($limit !== null && $limit > 50) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling ListsApi.getLists, must be smaller than or equal to 50.'); + } + + + $resourcePath = '/contacts/lists'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation removeContactFromList + * + * Delete a contact from a list + * + * @param int $listId Id of the list (required) + * @param \Brevo\Client\Model\RemoveContactFromList $contactEmails Emails addresses OR IDs of the contacts (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\PostContactInfo + */ + public function removeContactFromList($listId, $contactEmails) + { + list($response) = $this->removeContactFromListWithHttpInfo($listId, $contactEmails); + return $response; + } + + /** + * Operation removeContactFromListWithHttpInfo + * + * Delete a contact from a list + * + * @param int $listId Id of the list (required) + * @param \Brevo\Client\Model\RemoveContactFromList $contactEmails Emails addresses OR IDs of the contacts (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\PostContactInfo, HTTP status code, HTTP response headers (array of strings) + */ + public function removeContactFromListWithHttpInfo($listId, $contactEmails) + { + $returnType = '\Brevo\Client\Model\PostContactInfo'; + $request = $this->removeContactFromListRequest($listId, $contactEmails); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\PostContactInfo', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation removeContactFromListAsync + * + * Delete a contact from a list + * + * @param int $listId Id of the list (required) + * @param \Brevo\Client\Model\RemoveContactFromList $contactEmails Emails addresses OR IDs of the contacts (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function removeContactFromListAsync($listId, $contactEmails) + { + return $this->removeContactFromListAsyncWithHttpInfo($listId, $contactEmails) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation removeContactFromListAsyncWithHttpInfo + * + * Delete a contact from a list + * + * @param int $listId Id of the list (required) + * @param \Brevo\Client\Model\RemoveContactFromList $contactEmails Emails addresses OR IDs of the contacts (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function removeContactFromListAsyncWithHttpInfo($listId, $contactEmails) + { + $returnType = '\Brevo\Client\Model\PostContactInfo'; + $request = $this->removeContactFromListRequest($listId, $contactEmails); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'removeContactFromList' + * + * @param int $listId Id of the list (required) + * @param \Brevo\Client\Model\RemoveContactFromList $contactEmails Emails addresses OR IDs of the contacts (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function removeContactFromListRequest($listId, $contactEmails) + { + // verify the required parameter 'listId' is set + if ($listId === null || (is_array($listId) && count($listId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $listId when calling removeContactFromList' + ); + } + // verify the required parameter 'contactEmails' is set + if ($contactEmails === null || (is_array($contactEmails) && count($contactEmails) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $contactEmails when calling removeContactFromList' + ); + } + + $resourcePath = '/contacts/lists/{listId}/contacts/remove'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($listId !== null) { + $resourcePath = str_replace( + '{' . 'listId' . '}', + ObjectSerializer::toPathValue($listId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($contactEmails)) { + $_tempBody = $contactEmails; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation updateList + * + * Update a list + * + * @param int $listId Id of the list (required) + * @param \Brevo\Client\Model\UpdateList $updateList Values to update a list (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function updateList($listId, $updateList) + { + $this->updateListWithHttpInfo($listId, $updateList); + } + + /** + * Operation updateListWithHttpInfo + * + * Update a list + * + * @param int $listId Id of the list (required) + * @param \Brevo\Client\Model\UpdateList $updateList Values to update a list (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function updateListWithHttpInfo($listId, $updateList) + { + $returnType = ''; + $request = $this->updateListRequest($listId, $updateList); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation updateListAsync + * + * Update a list + * + * @param int $listId Id of the list (required) + * @param \Brevo\Client\Model\UpdateList $updateList Values to update a list (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateListAsync($listId, $updateList) + { + return $this->updateListAsyncWithHttpInfo($listId, $updateList) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateListAsyncWithHttpInfo + * + * Update a list + * + * @param int $listId Id of the list (required) + * @param \Brevo\Client\Model\UpdateList $updateList Values to update a list (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateListAsyncWithHttpInfo($listId, $updateList) + { + $returnType = ''; + $request = $this->updateListRequest($listId, $updateList); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'updateList' + * + * @param int $listId Id of the list (required) + * @param \Brevo\Client\Model\UpdateList $updateList Values to update a list (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function updateListRequest($listId, $updateList) + { + // verify the required parameter 'listId' is set + if ($listId === null || (is_array($listId) && count($listId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $listId when calling updateList' + ); + } + // verify the required parameter 'updateList' is set + if ($updateList === null || (is_array($updateList) && count($updateList) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $updateList when calling updateList' + ); + } + + $resourcePath = '/contacts/lists/{listId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($listId !== null) { + $resourcePath = str_replace( + '{' . 'listId' . '}', + ObjectSerializer::toPathValue($listId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($updateList)) { + $_tempBody = $updateList; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/vendor/getbrevo/brevo-php/lib/Api/MasterAccountApi.php b/vendor/getbrevo/brevo-php/lib/Api/MasterAccountApi.php new file mode 100644 index 0000000..8de81eb --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Api/MasterAccountApi.php @@ -0,0 +1,4518 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation corporateGroupIdPut + * + * Update a group of sub-accounts + * + * @param string $id Id of the group (required) + * @param \Brevo\Client\Model\Body1 $body Group details to be updated. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function corporateGroupIdPut($id, $body) + { + $this->corporateGroupIdPutWithHttpInfo($id, $body); + } + + /** + * Operation corporateGroupIdPutWithHttpInfo + * + * Update a group of sub-accounts + * + * @param string $id Id of the group (required) + * @param \Brevo\Client\Model\Body1 $body Group details to be updated. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function corporateGroupIdPutWithHttpInfo($id, $body) + { + $returnType = ''; + $request = $this->corporateGroupIdPutRequest($id, $body); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation corporateGroupIdPutAsync + * + * Update a group of sub-accounts + * + * @param string $id Id of the group (required) + * @param \Brevo\Client\Model\Body1 $body Group details to be updated. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function corporateGroupIdPutAsync($id, $body) + { + return $this->corporateGroupIdPutAsyncWithHttpInfo($id, $body) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation corporateGroupIdPutAsyncWithHttpInfo + * + * Update a group of sub-accounts + * + * @param string $id Id of the group (required) + * @param \Brevo\Client\Model\Body1 $body Group details to be updated. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function corporateGroupIdPutAsyncWithHttpInfo($id, $body) + { + $returnType = ''; + $request = $this->corporateGroupIdPutRequest($id, $body); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'corporateGroupIdPut' + * + * @param string $id Id of the group (required) + * @param \Brevo\Client\Model\Body1 $body Group details to be updated. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function corporateGroupIdPutRequest($id, $body) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling corporateGroupIdPut' + ); + } + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $body when calling corporateGroupIdPut' + ); + } + + $resourcePath = '/corporate/group/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation corporateGroupPost + * + * Create a new group of sub-accounts + * + * @param \Brevo\Client\Model\Body $body Group details to be created. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\InlineResponse201 + */ + public function corporateGroupPost($body) + { + list($response) = $this->corporateGroupPostWithHttpInfo($body); + return $response; + } + + /** + * Operation corporateGroupPostWithHttpInfo + * + * Create a new group of sub-accounts + * + * @param \Brevo\Client\Model\Body $body Group details to be created. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\InlineResponse201, HTTP status code, HTTP response headers (array of strings) + */ + public function corporateGroupPostWithHttpInfo($body) + { + $returnType = '\Brevo\Client\Model\InlineResponse201'; + $request = $this->corporateGroupPostRequest($body); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\InlineResponse201', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation corporateGroupPostAsync + * + * Create a new group of sub-accounts + * + * @param \Brevo\Client\Model\Body $body Group details to be created. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function corporateGroupPostAsync($body) + { + return $this->corporateGroupPostAsyncWithHttpInfo($body) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation corporateGroupPostAsyncWithHttpInfo + * + * Create a new group of sub-accounts + * + * @param \Brevo\Client\Model\Body $body Group details to be created. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function corporateGroupPostAsyncWithHttpInfo($body) + { + $returnType = '\Brevo\Client\Model\InlineResponse201'; + $request = $this->corporateGroupPostRequest($body); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'corporateGroupPost' + * + * @param \Brevo\Client\Model\Body $body Group details to be created. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function corporateGroupPostRequest($body) + { + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $body when calling corporateGroupPost' + ); + } + + $resourcePath = '/corporate/group'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation corporateMasterAccountGet + * + * Get the details of requested master account + * + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\MasterDetailsResponse + */ + public function corporateMasterAccountGet() + { + list($response) = $this->corporateMasterAccountGetWithHttpInfo(); + return $response; + } + + /** + * Operation corporateMasterAccountGetWithHttpInfo + * + * Get the details of requested master account + * + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\MasterDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function corporateMasterAccountGetWithHttpInfo() + { + $returnType = '\Brevo\Client\Model\MasterDetailsResponse'; + $request = $this->corporateMasterAccountGetRequest(); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\MasterDetailsResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation corporateMasterAccountGetAsync + * + * Get the details of requested master account + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function corporateMasterAccountGetAsync() + { + return $this->corporateMasterAccountGetAsyncWithHttpInfo() + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation corporateMasterAccountGetAsyncWithHttpInfo + * + * Get the details of requested master account + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function corporateMasterAccountGetAsyncWithHttpInfo() + { + $returnType = '\Brevo\Client\Model\MasterDetailsResponse'; + $request = $this->corporateMasterAccountGetRequest(); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'corporateMasterAccountGet' + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function corporateMasterAccountGetRequest() + { + + $resourcePath = '/corporate/masterAccount'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation corporateSubAccountGet + * + * Get the list of all the sub-accounts of the master account. + * + * @param int $offset Index of the first sub-account in the page (required) + * @param int $limit Number of sub-accounts to be displayed on each page (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\SubAccountsResponse + */ + public function corporateSubAccountGet($offset, $limit) + { + list($response) = $this->corporateSubAccountGetWithHttpInfo($offset, $limit); + return $response; + } + + /** + * Operation corporateSubAccountGetWithHttpInfo + * + * Get the list of all the sub-accounts of the master account. + * + * @param int $offset Index of the first sub-account in the page (required) + * @param int $limit Number of sub-accounts to be displayed on each page (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\SubAccountsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function corporateSubAccountGetWithHttpInfo($offset, $limit) + { + $returnType = '\Brevo\Client\Model\SubAccountsResponse'; + $request = $this->corporateSubAccountGetRequest($offset, $limit); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\SubAccountsResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation corporateSubAccountGetAsync + * + * Get the list of all the sub-accounts of the master account. + * + * @param int $offset Index of the first sub-account in the page (required) + * @param int $limit Number of sub-accounts to be displayed on each page (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function corporateSubAccountGetAsync($offset, $limit) + { + return $this->corporateSubAccountGetAsyncWithHttpInfo($offset, $limit) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation corporateSubAccountGetAsyncWithHttpInfo + * + * Get the list of all the sub-accounts of the master account. + * + * @param int $offset Index of the first sub-account in the page (required) + * @param int $limit Number of sub-accounts to be displayed on each page (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function corporateSubAccountGetAsyncWithHttpInfo($offset, $limit) + { + $returnType = '\Brevo\Client\Model\SubAccountsResponse'; + $request = $this->corporateSubAccountGetRequest($offset, $limit); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'corporateSubAccountGet' + * + * @param int $offset Index of the first sub-account in the page (required) + * @param int $limit Number of sub-accounts to be displayed on each page (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function corporateSubAccountGetRequest($offset, $limit) + { + // verify the required parameter 'offset' is set + if ($offset === null || (is_array($offset) && count($offset) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $offset when calling corporateSubAccountGet' + ); + } + // verify the required parameter 'limit' is set + if ($limit === null || (is_array($limit) && count($limit) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $limit when calling corporateSubAccountGet' + ); + } + + $resourcePath = '/corporate/subAccount'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation corporateSubAccountIdApplicationsTogglePut + * + * Enable/disable sub-account application(s) + * + * @param int $id Id of the sub-account organization (mandatory) (required) + * @param \Brevo\Client\Model\SubAccountAppsToggleRequest $toggleApplications List of applications to activate or deactivate on a sub-account (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function corporateSubAccountIdApplicationsTogglePut($id, $toggleApplications) + { + $this->corporateSubAccountIdApplicationsTogglePutWithHttpInfo($id, $toggleApplications); + } + + /** + * Operation corporateSubAccountIdApplicationsTogglePutWithHttpInfo + * + * Enable/disable sub-account application(s) + * + * @param int $id Id of the sub-account organization (mandatory) (required) + * @param \Brevo\Client\Model\SubAccountAppsToggleRequest $toggleApplications List of applications to activate or deactivate on a sub-account (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function corporateSubAccountIdApplicationsTogglePutWithHttpInfo($id, $toggleApplications) + { + $returnType = ''; + $request = $this->corporateSubAccountIdApplicationsTogglePutRequest($id, $toggleApplications); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation corporateSubAccountIdApplicationsTogglePutAsync + * + * Enable/disable sub-account application(s) + * + * @param int $id Id of the sub-account organization (mandatory) (required) + * @param \Brevo\Client\Model\SubAccountAppsToggleRequest $toggleApplications List of applications to activate or deactivate on a sub-account (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function corporateSubAccountIdApplicationsTogglePutAsync($id, $toggleApplications) + { + return $this->corporateSubAccountIdApplicationsTogglePutAsyncWithHttpInfo($id, $toggleApplications) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation corporateSubAccountIdApplicationsTogglePutAsyncWithHttpInfo + * + * Enable/disable sub-account application(s) + * + * @param int $id Id of the sub-account organization (mandatory) (required) + * @param \Brevo\Client\Model\SubAccountAppsToggleRequest $toggleApplications List of applications to activate or deactivate on a sub-account (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function corporateSubAccountIdApplicationsTogglePutAsyncWithHttpInfo($id, $toggleApplications) + { + $returnType = ''; + $request = $this->corporateSubAccountIdApplicationsTogglePutRequest($id, $toggleApplications); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'corporateSubAccountIdApplicationsTogglePut' + * + * @param int $id Id of the sub-account organization (mandatory) (required) + * @param \Brevo\Client\Model\SubAccountAppsToggleRequest $toggleApplications List of applications to activate or deactivate on a sub-account (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function corporateSubAccountIdApplicationsTogglePutRequest($id, $toggleApplications) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling corporateSubAccountIdApplicationsTogglePut' + ); + } + // verify the required parameter 'toggleApplications' is set + if ($toggleApplications === null || (is_array($toggleApplications) && count($toggleApplications) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $toggleApplications when calling corporateSubAccountIdApplicationsTogglePut' + ); + } + + $resourcePath = '/corporate/subAccount/{id}/applications/toggle'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($toggleApplications)) { + $_tempBody = $toggleApplications; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation corporateSubAccountIdDelete + * + * Delete a sub-account + * + * @param int $id Id of the sub-account organization to be deleted (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function corporateSubAccountIdDelete($id) + { + $this->corporateSubAccountIdDeleteWithHttpInfo($id); + } + + /** + * Operation corporateSubAccountIdDeleteWithHttpInfo + * + * Delete a sub-account + * + * @param int $id Id of the sub-account organization to be deleted (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function corporateSubAccountIdDeleteWithHttpInfo($id) + { + $returnType = ''; + $request = $this->corporateSubAccountIdDeleteRequest($id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + } + throw $e; + } + } + + /** + * Operation corporateSubAccountIdDeleteAsync + * + * Delete a sub-account + * + * @param int $id Id of the sub-account organization to be deleted (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function corporateSubAccountIdDeleteAsync($id) + { + return $this->corporateSubAccountIdDeleteAsyncWithHttpInfo($id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation corporateSubAccountIdDeleteAsyncWithHttpInfo + * + * Delete a sub-account + * + * @param int $id Id of the sub-account organization to be deleted (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function corporateSubAccountIdDeleteAsyncWithHttpInfo($id) + { + $returnType = ''; + $request = $this->corporateSubAccountIdDeleteRequest($id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'corporateSubAccountIdDelete' + * + * @param int $id Id of the sub-account organization to be deleted (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function corporateSubAccountIdDeleteRequest($id) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling corporateSubAccountIdDelete' + ); + } + + $resourcePath = '/corporate/subAccount/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation corporateSubAccountIdGet + * + * Get sub-account details + * + * @param int $id Id of the sub-account organization (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\SubAccountDetailsResponse + */ + public function corporateSubAccountIdGet($id) + { + list($response) = $this->corporateSubAccountIdGetWithHttpInfo($id); + return $response; + } + + /** + * Operation corporateSubAccountIdGetWithHttpInfo + * + * Get sub-account details + * + * @param int $id Id of the sub-account organization (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\SubAccountDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function corporateSubAccountIdGetWithHttpInfo($id) + { + $returnType = '\Brevo\Client\Model\SubAccountDetailsResponse'; + $request = $this->corporateSubAccountIdGetRequest($id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\SubAccountDetailsResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation corporateSubAccountIdGetAsync + * + * Get sub-account details + * + * @param int $id Id of the sub-account organization (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function corporateSubAccountIdGetAsync($id) + { + return $this->corporateSubAccountIdGetAsyncWithHttpInfo($id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation corporateSubAccountIdGetAsyncWithHttpInfo + * + * Get sub-account details + * + * @param int $id Id of the sub-account organization (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function corporateSubAccountIdGetAsyncWithHttpInfo($id) + { + $returnType = '\Brevo\Client\Model\SubAccountDetailsResponse'; + $request = $this->corporateSubAccountIdGetRequest($id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'corporateSubAccountIdGet' + * + * @param int $id Id of the sub-account organization (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function corporateSubAccountIdGetRequest($id) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling corporateSubAccountIdGet' + ); + } + + $resourcePath = '/corporate/subAccount/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation corporateSubAccountIdPlanPut + * + * Update sub-account plan + * + * @param int $id Id of the sub-account organization (required) + * @param \Brevo\Client\Model\SubAccountUpdatePlanRequest $updatePlanDetails Values to update a sub-account plan (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function corporateSubAccountIdPlanPut($id, $updatePlanDetails) + { + $this->corporateSubAccountIdPlanPutWithHttpInfo($id, $updatePlanDetails); + } + + /** + * Operation corporateSubAccountIdPlanPutWithHttpInfo + * + * Update sub-account plan + * + * @param int $id Id of the sub-account organization (required) + * @param \Brevo\Client\Model\SubAccountUpdatePlanRequest $updatePlanDetails Values to update a sub-account plan (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function corporateSubAccountIdPlanPutWithHttpInfo($id, $updatePlanDetails) + { + $returnType = ''; + $request = $this->corporateSubAccountIdPlanPutRequest($id, $updatePlanDetails); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation corporateSubAccountIdPlanPutAsync + * + * Update sub-account plan + * + * @param int $id Id of the sub-account organization (required) + * @param \Brevo\Client\Model\SubAccountUpdatePlanRequest $updatePlanDetails Values to update a sub-account plan (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function corporateSubAccountIdPlanPutAsync($id, $updatePlanDetails) + { + return $this->corporateSubAccountIdPlanPutAsyncWithHttpInfo($id, $updatePlanDetails) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation corporateSubAccountIdPlanPutAsyncWithHttpInfo + * + * Update sub-account plan + * + * @param int $id Id of the sub-account organization (required) + * @param \Brevo\Client\Model\SubAccountUpdatePlanRequest $updatePlanDetails Values to update a sub-account plan (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function corporateSubAccountIdPlanPutAsyncWithHttpInfo($id, $updatePlanDetails) + { + $returnType = ''; + $request = $this->corporateSubAccountIdPlanPutRequest($id, $updatePlanDetails); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'corporateSubAccountIdPlanPut' + * + * @param int $id Id of the sub-account organization (required) + * @param \Brevo\Client\Model\SubAccountUpdatePlanRequest $updatePlanDetails Values to update a sub-account plan (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function corporateSubAccountIdPlanPutRequest($id, $updatePlanDetails) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling corporateSubAccountIdPlanPut' + ); + } + // verify the required parameter 'updatePlanDetails' is set + if ($updatePlanDetails === null || (is_array($updatePlanDetails) && count($updatePlanDetails) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $updatePlanDetails when calling corporateSubAccountIdPlanPut' + ); + } + + $resourcePath = '/corporate/subAccount/{id}/plan'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($updatePlanDetails)) { + $_tempBody = $updatePlanDetails; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation corporateSubAccountKeyPost + * + * Create an API key for a sub-account + * + * @param \Brevo\Client\Model\CreateApiKeyRequest $createApiKeyRequest Values to generate API key for sub-account (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\CreateApiKeyResponse + */ + public function corporateSubAccountKeyPost($createApiKeyRequest) + { + list($response) = $this->corporateSubAccountKeyPostWithHttpInfo($createApiKeyRequest); + return $response; + } + + /** + * Operation corporateSubAccountKeyPostWithHttpInfo + * + * Create an API key for a sub-account + * + * @param \Brevo\Client\Model\CreateApiKeyRequest $createApiKeyRequest Values to generate API key for sub-account (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\CreateApiKeyResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function corporateSubAccountKeyPostWithHttpInfo($createApiKeyRequest) + { + $returnType = '\Brevo\Client\Model\CreateApiKeyResponse'; + $request = $this->corporateSubAccountKeyPostRequest($createApiKeyRequest); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\CreateApiKeyResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation corporateSubAccountKeyPostAsync + * + * Create an API key for a sub-account + * + * @param \Brevo\Client\Model\CreateApiKeyRequest $createApiKeyRequest Values to generate API key for sub-account (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function corporateSubAccountKeyPostAsync($createApiKeyRequest) + { + return $this->corporateSubAccountKeyPostAsyncWithHttpInfo($createApiKeyRequest) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation corporateSubAccountKeyPostAsyncWithHttpInfo + * + * Create an API key for a sub-account + * + * @param \Brevo\Client\Model\CreateApiKeyRequest $createApiKeyRequest Values to generate API key for sub-account (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function corporateSubAccountKeyPostAsyncWithHttpInfo($createApiKeyRequest) + { + $returnType = '\Brevo\Client\Model\CreateApiKeyResponse'; + $request = $this->corporateSubAccountKeyPostRequest($createApiKeyRequest); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'corporateSubAccountKeyPost' + * + * @param \Brevo\Client\Model\CreateApiKeyRequest $createApiKeyRequest Values to generate API key for sub-account (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function corporateSubAccountKeyPostRequest($createApiKeyRequest) + { + // verify the required parameter 'createApiKeyRequest' is set + if ($createApiKeyRequest === null || (is_array($createApiKeyRequest) && count($createApiKeyRequest) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $createApiKeyRequest when calling corporateSubAccountKeyPost' + ); + } + + $resourcePath = '/corporate/subAccount/key'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($createApiKeyRequest)) { + $_tempBody = $createApiKeyRequest; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation corporateSubAccountPost + * + * Create a new sub-account under a master account. + * + * @param \Brevo\Client\Model\CreateSubAccount $subAccountCreate values to create new sub-account (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\CreateSubAccountResponse + */ + public function corporateSubAccountPost($subAccountCreate) + { + list($response) = $this->corporateSubAccountPostWithHttpInfo($subAccountCreate); + return $response; + } + + /** + * Operation corporateSubAccountPostWithHttpInfo + * + * Create a new sub-account under a master account. + * + * @param \Brevo\Client\Model\CreateSubAccount $subAccountCreate values to create new sub-account (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\CreateSubAccountResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function corporateSubAccountPostWithHttpInfo($subAccountCreate) + { + $returnType = '\Brevo\Client\Model\CreateSubAccountResponse'; + $request = $this->corporateSubAccountPostRequest($subAccountCreate); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\CreateSubAccountResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation corporateSubAccountPostAsync + * + * Create a new sub-account under a master account. + * + * @param \Brevo\Client\Model\CreateSubAccount $subAccountCreate values to create new sub-account (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function corporateSubAccountPostAsync($subAccountCreate) + { + return $this->corporateSubAccountPostAsyncWithHttpInfo($subAccountCreate) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation corporateSubAccountPostAsyncWithHttpInfo + * + * Create a new sub-account under a master account. + * + * @param \Brevo\Client\Model\CreateSubAccount $subAccountCreate values to create new sub-account (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function corporateSubAccountPostAsyncWithHttpInfo($subAccountCreate) + { + $returnType = '\Brevo\Client\Model\CreateSubAccountResponse'; + $request = $this->corporateSubAccountPostRequest($subAccountCreate); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'corporateSubAccountPost' + * + * @param \Brevo\Client\Model\CreateSubAccount $subAccountCreate values to create new sub-account (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function corporateSubAccountPostRequest($subAccountCreate) + { + // verify the required parameter 'subAccountCreate' is set + if ($subAccountCreate === null || (is_array($subAccountCreate) && count($subAccountCreate) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $subAccountCreate when calling corporateSubAccountPost' + ); + } + + $resourcePath = '/corporate/subAccount'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($subAccountCreate)) { + $_tempBody = $subAccountCreate; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation corporateSubAccountSsoTokenPost + * + * Generate SSO token to access Brevo + * + * @param \Brevo\Client\Model\SsoTokenRequest $ssoTokenRequest Values to generate SSO token for sub-account (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetSsoToken + */ + public function corporateSubAccountSsoTokenPost($ssoTokenRequest) + { + list($response) = $this->corporateSubAccountSsoTokenPostWithHttpInfo($ssoTokenRequest); + return $response; + } + + /** + * Operation corporateSubAccountSsoTokenPostWithHttpInfo + * + * Generate SSO token to access Brevo + * + * @param \Brevo\Client\Model\SsoTokenRequest $ssoTokenRequest Values to generate SSO token for sub-account (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetSsoToken, HTTP status code, HTTP response headers (array of strings) + */ + public function corporateSubAccountSsoTokenPostWithHttpInfo($ssoTokenRequest) + { + $returnType = '\Brevo\Client\Model\GetSsoToken'; + $request = $this->corporateSubAccountSsoTokenPostRequest($ssoTokenRequest); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetSsoToken', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation corporateSubAccountSsoTokenPostAsync + * + * Generate SSO token to access Brevo + * + * @param \Brevo\Client\Model\SsoTokenRequest $ssoTokenRequest Values to generate SSO token for sub-account (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function corporateSubAccountSsoTokenPostAsync($ssoTokenRequest) + { + return $this->corporateSubAccountSsoTokenPostAsyncWithHttpInfo($ssoTokenRequest) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation corporateSubAccountSsoTokenPostAsyncWithHttpInfo + * + * Generate SSO token to access Brevo + * + * @param \Brevo\Client\Model\SsoTokenRequest $ssoTokenRequest Values to generate SSO token for sub-account (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function corporateSubAccountSsoTokenPostAsyncWithHttpInfo($ssoTokenRequest) + { + $returnType = '\Brevo\Client\Model\GetSsoToken'; + $request = $this->corporateSubAccountSsoTokenPostRequest($ssoTokenRequest); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'corporateSubAccountSsoTokenPost' + * + * @param \Brevo\Client\Model\SsoTokenRequest $ssoTokenRequest Values to generate SSO token for sub-account (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function corporateSubAccountSsoTokenPostRequest($ssoTokenRequest) + { + // verify the required parameter 'ssoTokenRequest' is set + if ($ssoTokenRequest === null || (is_array($ssoTokenRequest) && count($ssoTokenRequest) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $ssoTokenRequest when calling corporateSubAccountSsoTokenPost' + ); + } + + $resourcePath = '/corporate/subAccount/ssoToken'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($ssoTokenRequest)) { + $_tempBody = $ssoTokenRequest; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation corporateUserRevokeEmailDelete + * + * Revoke an admin user + * + * @param string $email Email of the invited user (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function corporateUserRevokeEmailDelete($email) + { + $this->corporateUserRevokeEmailDeleteWithHttpInfo($email); + } + + /** + * Operation corporateUserRevokeEmailDeleteWithHttpInfo + * + * Revoke an admin user + * + * @param string $email Email of the invited user (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function corporateUserRevokeEmailDeleteWithHttpInfo($email) + { + $returnType = ''; + $request = $this->corporateUserRevokeEmailDeleteRequest($email); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation corporateUserRevokeEmailDeleteAsync + * + * Revoke an admin user + * + * @param string $email Email of the invited user (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function corporateUserRevokeEmailDeleteAsync($email) + { + return $this->corporateUserRevokeEmailDeleteAsyncWithHttpInfo($email) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation corporateUserRevokeEmailDeleteAsyncWithHttpInfo + * + * Revoke an admin user + * + * @param string $email Email of the invited user (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function corporateUserRevokeEmailDeleteAsyncWithHttpInfo($email) + { + $returnType = ''; + $request = $this->corporateUserRevokeEmailDeleteRequest($email); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'corporateUserRevokeEmailDelete' + * + * @param string $email Email of the invited user (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function corporateUserRevokeEmailDeleteRequest($email) + { + // verify the required parameter 'email' is set + if ($email === null || (is_array($email) && count($email) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $email when calling corporateUserRevokeEmailDelete' + ); + } + + $resourcePath = '/corporate/user/revoke/{email}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($email !== null) { + $resourcePath = str_replace( + '{' . 'email' . '}', + ObjectSerializer::toPathValue($email), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getAccountActivity + * + * Get user activity logs + * + * @param string $startDate Mandatory if endDate is used. Enter start date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. Additionally, you can retrieve activity logs from the past 12 months from the date of your search. (optional) + * @param string $endDate Mandatory if startDate is used. Enter end date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. (optional) + * @param int $limit Number of documents per page (optional, default to 10) + * @param int $offset Index of the first document in the page. (optional, default to 0) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetAccountActivity + */ + public function getAccountActivity($startDate = null, $endDate = null, $limit = '10', $offset = '0') + { + list($response) = $this->getAccountActivityWithHttpInfo($startDate, $endDate, $limit, $offset); + return $response; + } + + /** + * Operation getAccountActivityWithHttpInfo + * + * Get user activity logs + * + * @param string $startDate Mandatory if endDate is used. Enter start date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. Additionally, you can retrieve activity logs from the past 12 months from the date of your search. (optional) + * @param string $endDate Mandatory if startDate is used. Enter end date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. (optional) + * @param int $limit Number of documents per page (optional, default to 10) + * @param int $offset Index of the first document in the page. (optional, default to 0) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetAccountActivity, HTTP status code, HTTP response headers (array of strings) + */ + public function getAccountActivityWithHttpInfo($startDate = null, $endDate = null, $limit = '10', $offset = '0') + { + $returnType = '\Brevo\Client\Model\GetAccountActivity'; + $request = $this->getAccountActivityRequest($startDate, $endDate, $limit, $offset); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetAccountActivity', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getAccountActivityAsync + * + * Get user activity logs + * + * @param string $startDate Mandatory if endDate is used. Enter start date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. Additionally, you can retrieve activity logs from the past 12 months from the date of your search. (optional) + * @param string $endDate Mandatory if startDate is used. Enter end date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. (optional) + * @param int $limit Number of documents per page (optional, default to 10) + * @param int $offset Index of the first document in the page. (optional, default to 0) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getAccountActivityAsync($startDate = null, $endDate = null, $limit = '10', $offset = '0') + { + return $this->getAccountActivityAsyncWithHttpInfo($startDate, $endDate, $limit, $offset) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getAccountActivityAsyncWithHttpInfo + * + * Get user activity logs + * + * @param string $startDate Mandatory if endDate is used. Enter start date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. Additionally, you can retrieve activity logs from the past 12 months from the date of your search. (optional) + * @param string $endDate Mandatory if startDate is used. Enter end date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. (optional) + * @param int $limit Number of documents per page (optional, default to 10) + * @param int $offset Index of the first document in the page. (optional, default to 0) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getAccountActivityAsyncWithHttpInfo($startDate = null, $endDate = null, $limit = '10', $offset = '0') + { + $returnType = '\Brevo\Client\Model\GetAccountActivity'; + $request = $this->getAccountActivityRequest($startDate, $endDate, $limit, $offset); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getAccountActivity' + * + * @param string $startDate Mandatory if endDate is used. Enter start date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. Additionally, you can retrieve activity logs from the past 12 months from the date of your search. (optional) + * @param string $endDate Mandatory if startDate is used. Enter end date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. (optional) + * @param int $limit Number of documents per page (optional, default to 10) + * @param int $offset Index of the first document in the page. (optional, default to 0) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getAccountActivityRequest($startDate = null, $endDate = null, $limit = '10', $offset = '0') + { + if ($limit !== null && $limit > 100) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling MasterAccountApi.getAccountActivity, must be smaller than or equal to 100.'); + } + if ($limit !== null && $limit < 1) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling MasterAccountApi.getAccountActivity, must be bigger than or equal to 1.'); + } + + + $resourcePath = '/organization/activities'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($startDate !== null) { + $queryParams['startDate'] = ObjectSerializer::toQueryValue($startDate); + } + // query params + if ($endDate !== null) { + $queryParams['endDate'] = ObjectSerializer::toQueryValue($endDate); + } + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getCorporateInvitedUsersList + * + * Get the list of all admin users + * + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetCorporateInvitedUsersList + */ + public function getCorporateInvitedUsersList() + { + list($response) = $this->getCorporateInvitedUsersListWithHttpInfo(); + return $response; + } + + /** + * Operation getCorporateInvitedUsersListWithHttpInfo + * + * Get the list of all admin users + * + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetCorporateInvitedUsersList, HTTP status code, HTTP response headers (array of strings) + */ + public function getCorporateInvitedUsersListWithHttpInfo() + { + $returnType = '\Brevo\Client\Model\GetCorporateInvitedUsersList'; + $request = $this->getCorporateInvitedUsersListRequest(); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetCorporateInvitedUsersList', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getCorporateInvitedUsersListAsync + * + * Get the list of all admin users + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getCorporateInvitedUsersListAsync() + { + return $this->getCorporateInvitedUsersListAsyncWithHttpInfo() + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getCorporateInvitedUsersListAsyncWithHttpInfo + * + * Get the list of all admin users + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getCorporateInvitedUsersListAsyncWithHttpInfo() + { + $returnType = '\Brevo\Client\Model\GetCorporateInvitedUsersList'; + $request = $this->getCorporateInvitedUsersListRequest(); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getCorporateInvitedUsersList' + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getCorporateInvitedUsersListRequest() + { + + $resourcePath = '/corporate/invited/users'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getSubAccountGroups + * + * Get the list of groups + * + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\InlineResponse200[] + */ + public function getSubAccountGroups() + { + list($response) = $this->getSubAccountGroupsWithHttpInfo(); + return $response; + } + + /** + * Operation getSubAccountGroupsWithHttpInfo + * + * Get the list of groups + * + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\InlineResponse200[], HTTP status code, HTTP response headers (array of strings) + */ + public function getSubAccountGroupsWithHttpInfo() + { + $returnType = '\Brevo\Client\Model\InlineResponse200[]'; + $request = $this->getSubAccountGroupsRequest(); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\InlineResponse200[]', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getSubAccountGroupsAsync + * + * Get the list of groups + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getSubAccountGroupsAsync() + { + return $this->getSubAccountGroupsAsyncWithHttpInfo() + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getSubAccountGroupsAsyncWithHttpInfo + * + * Get the list of groups + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getSubAccountGroupsAsyncWithHttpInfo() + { + $returnType = '\Brevo\Client\Model\InlineResponse200[]'; + $request = $this->getSubAccountGroupsRequest(); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getSubAccountGroups' + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getSubAccountGroupsRequest() + { + + $resourcePath = '/corporate/groups'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation inviteAdminUser + * + * Send invitation to an admin user + * + * @param \Brevo\Client\Model\InviteAdminUser $sendInvitation Payload to send an invitation (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\InviteAdminUser + */ + public function inviteAdminUser($sendInvitation) + { + list($response) = $this->inviteAdminUserWithHttpInfo($sendInvitation); + return $response; + } + + /** + * Operation inviteAdminUserWithHttpInfo + * + * Send invitation to an admin user + * + * @param \Brevo\Client\Model\InviteAdminUser $sendInvitation Payload to send an invitation (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\InviteAdminUser, HTTP status code, HTTP response headers (array of strings) + */ + public function inviteAdminUserWithHttpInfo($sendInvitation) + { + $returnType = '\Brevo\Client\Model\InviteAdminUser'; + $request = $this->inviteAdminUserRequest($sendInvitation); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\InviteAdminUser', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation inviteAdminUserAsync + * + * Send invitation to an admin user + * + * @param \Brevo\Client\Model\InviteAdminUser $sendInvitation Payload to send an invitation (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function inviteAdminUserAsync($sendInvitation) + { + return $this->inviteAdminUserAsyncWithHttpInfo($sendInvitation) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation inviteAdminUserAsyncWithHttpInfo + * + * Send invitation to an admin user + * + * @param \Brevo\Client\Model\InviteAdminUser $sendInvitation Payload to send an invitation (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function inviteAdminUserAsyncWithHttpInfo($sendInvitation) + { + $returnType = '\Brevo\Client\Model\InviteAdminUser'; + $request = $this->inviteAdminUserRequest($sendInvitation); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'inviteAdminUser' + * + * @param \Brevo\Client\Model\InviteAdminUser $sendInvitation Payload to send an invitation (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function inviteAdminUserRequest($sendInvitation) + { + // verify the required parameter 'sendInvitation' is set + if ($sendInvitation === null || (is_array($sendInvitation) && count($sendInvitation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $sendInvitation when calling inviteAdminUser' + ); + } + + $resourcePath = '/corporate/user/invitation/send'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($sendInvitation)) { + $_tempBody = $sendInvitation; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/vendor/getbrevo/brevo-php/lib/Api/NotesApi.php b/vendor/getbrevo/brevo-php/lib/Api/NotesApi.php new file mode 100644 index 0000000..16e235d --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Api/NotesApi.php @@ -0,0 +1,1562 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation crmNotesGet + * + * Get all notes + * + * @param string $entity Filter by note entity type (optional) + * @param string $entityIds Filter by note entity IDs (optional) + * @param int $dateFrom dateFrom to date range filter type (timestamp in milliseconds) (optional) + * @param int $dateTo dateTo to date range filter type (timestamp in milliseconds) (optional) + * @param int $offset Index of the first document of the page (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\NoteList + */ + public function crmNotesGet($entity = null, $entityIds = null, $dateFrom = null, $dateTo = null, $offset = null, $limit = '50', $sort = null) + { + list($response) = $this->crmNotesGetWithHttpInfo($entity, $entityIds, $dateFrom, $dateTo, $offset, $limit, $sort); + return $response; + } + + /** + * Operation crmNotesGetWithHttpInfo + * + * Get all notes + * + * @param string $entity Filter by note entity type (optional) + * @param string $entityIds Filter by note entity IDs (optional) + * @param int $dateFrom dateFrom to date range filter type (timestamp in milliseconds) (optional) + * @param int $dateTo dateTo to date range filter type (timestamp in milliseconds) (optional) + * @param int $offset Index of the first document of the page (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\NoteList, HTTP status code, HTTP response headers (array of strings) + */ + public function crmNotesGetWithHttpInfo($entity = null, $entityIds = null, $dateFrom = null, $dateTo = null, $offset = null, $limit = '50', $sort = null) + { + $returnType = '\Brevo\Client\Model\NoteList'; + $request = $this->crmNotesGetRequest($entity, $entityIds, $dateFrom, $dateTo, $offset, $limit, $sort); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\NoteList', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation crmNotesGetAsync + * + * Get all notes + * + * @param string $entity Filter by note entity type (optional) + * @param string $entityIds Filter by note entity IDs (optional) + * @param int $dateFrom dateFrom to date range filter type (timestamp in milliseconds) (optional) + * @param int $dateTo dateTo to date range filter type (timestamp in milliseconds) (optional) + * @param int $offset Index of the first document of the page (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmNotesGetAsync($entity = null, $entityIds = null, $dateFrom = null, $dateTo = null, $offset = null, $limit = '50', $sort = null) + { + return $this->crmNotesGetAsyncWithHttpInfo($entity, $entityIds, $dateFrom, $dateTo, $offset, $limit, $sort) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation crmNotesGetAsyncWithHttpInfo + * + * Get all notes + * + * @param string $entity Filter by note entity type (optional) + * @param string $entityIds Filter by note entity IDs (optional) + * @param int $dateFrom dateFrom to date range filter type (timestamp in milliseconds) (optional) + * @param int $dateTo dateTo to date range filter type (timestamp in milliseconds) (optional) + * @param int $offset Index of the first document of the page (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmNotesGetAsyncWithHttpInfo($entity = null, $entityIds = null, $dateFrom = null, $dateTo = null, $offset = null, $limit = '50', $sort = null) + { + $returnType = '\Brevo\Client\Model\NoteList'; + $request = $this->crmNotesGetRequest($entity, $entityIds, $dateFrom, $dateTo, $offset, $limit, $sort); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'crmNotesGet' + * + * @param string $entity Filter by note entity type (optional) + * @param string $entityIds Filter by note entity IDs (optional) + * @param int $dateFrom dateFrom to date range filter type (timestamp in milliseconds) (optional) + * @param int $dateTo dateTo to date range filter type (timestamp in milliseconds) (optional) + * @param int $offset Index of the first document of the page (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function crmNotesGetRequest($entity = null, $entityIds = null, $dateFrom = null, $dateTo = null, $offset = null, $limit = '50', $sort = null) + { + + $resourcePath = '/crm/notes'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($entity !== null) { + $queryParams['entity'] = ObjectSerializer::toQueryValue($entity); + } + // query params + if ($entityIds !== null) { + $queryParams['entityIds'] = ObjectSerializer::toQueryValue($entityIds); + } + // query params + if ($dateFrom !== null) { + $queryParams['dateFrom'] = ObjectSerializer::toQueryValue($dateFrom); + } + // query params + if ($dateTo !== null) { + $queryParams['dateTo'] = ObjectSerializer::toQueryValue($dateTo); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation crmNotesIdDelete + * + * Delete a note + * + * @param string $id Note ID to delete (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function crmNotesIdDelete($id) + { + $this->crmNotesIdDeleteWithHttpInfo($id); + } + + /** + * Operation crmNotesIdDeleteWithHttpInfo + * + * Delete a note + * + * @param string $id Note ID to delete (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function crmNotesIdDeleteWithHttpInfo($id) + { + $returnType = ''; + $request = $this->crmNotesIdDeleteRequest($id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation crmNotesIdDeleteAsync + * + * Delete a note + * + * @param string $id Note ID to delete (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmNotesIdDeleteAsync($id) + { + return $this->crmNotesIdDeleteAsyncWithHttpInfo($id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation crmNotesIdDeleteAsyncWithHttpInfo + * + * Delete a note + * + * @param string $id Note ID to delete (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmNotesIdDeleteAsyncWithHttpInfo($id) + { + $returnType = ''; + $request = $this->crmNotesIdDeleteRequest($id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'crmNotesIdDelete' + * + * @param string $id Note ID to delete (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function crmNotesIdDeleteRequest($id) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling crmNotesIdDelete' + ); + } + + $resourcePath = '/crm/notes/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation crmNotesIdGet + * + * Get a note + * + * @param string $id Note ID to get (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\Note + */ + public function crmNotesIdGet($id) + { + list($response) = $this->crmNotesIdGetWithHttpInfo($id); + return $response; + } + + /** + * Operation crmNotesIdGetWithHttpInfo + * + * Get a note + * + * @param string $id Note ID to get (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\Note, HTTP status code, HTTP response headers (array of strings) + */ + public function crmNotesIdGetWithHttpInfo($id) + { + $returnType = '\Brevo\Client\Model\Note'; + $request = $this->crmNotesIdGetRequest($id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\Note', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation crmNotesIdGetAsync + * + * Get a note + * + * @param string $id Note ID to get (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmNotesIdGetAsync($id) + { + return $this->crmNotesIdGetAsyncWithHttpInfo($id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation crmNotesIdGetAsyncWithHttpInfo + * + * Get a note + * + * @param string $id Note ID to get (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmNotesIdGetAsyncWithHttpInfo($id) + { + $returnType = '\Brevo\Client\Model\Note'; + $request = $this->crmNotesIdGetRequest($id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'crmNotesIdGet' + * + * @param string $id Note ID to get (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function crmNotesIdGetRequest($id) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling crmNotesIdGet' + ); + } + + $resourcePath = '/crm/notes/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation crmNotesIdPatch + * + * Update a note + * + * @param string $id Note ID to update (required) + * @param \Brevo\Client\Model\NoteData $body Note data to update a note (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function crmNotesIdPatch($id, $body) + { + $this->crmNotesIdPatchWithHttpInfo($id, $body); + } + + /** + * Operation crmNotesIdPatchWithHttpInfo + * + * Update a note + * + * @param string $id Note ID to update (required) + * @param \Brevo\Client\Model\NoteData $body Note data to update a note (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function crmNotesIdPatchWithHttpInfo($id, $body) + { + $returnType = ''; + $request = $this->crmNotesIdPatchRequest($id, $body); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation crmNotesIdPatchAsync + * + * Update a note + * + * @param string $id Note ID to update (required) + * @param \Brevo\Client\Model\NoteData $body Note data to update a note (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmNotesIdPatchAsync($id, $body) + { + return $this->crmNotesIdPatchAsyncWithHttpInfo($id, $body) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation crmNotesIdPatchAsyncWithHttpInfo + * + * Update a note + * + * @param string $id Note ID to update (required) + * @param \Brevo\Client\Model\NoteData $body Note data to update a note (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmNotesIdPatchAsyncWithHttpInfo($id, $body) + { + $returnType = ''; + $request = $this->crmNotesIdPatchRequest($id, $body); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'crmNotesIdPatch' + * + * @param string $id Note ID to update (required) + * @param \Brevo\Client\Model\NoteData $body Note data to update a note (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function crmNotesIdPatchRequest($id, $body) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling crmNotesIdPatch' + ); + } + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $body when calling crmNotesIdPatch' + ); + } + + $resourcePath = '/crm/notes/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PATCH', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation crmNotesPost + * + * Create a note + * + * @param \Brevo\Client\Model\NoteData $body Note data to create a note. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\NoteId + */ + public function crmNotesPost($body) + { + list($response) = $this->crmNotesPostWithHttpInfo($body); + return $response; + } + + /** + * Operation crmNotesPostWithHttpInfo + * + * Create a note + * + * @param \Brevo\Client\Model\NoteData $body Note data to create a note. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\NoteId, HTTP status code, HTTP response headers (array of strings) + */ + public function crmNotesPostWithHttpInfo($body) + { + $returnType = '\Brevo\Client\Model\NoteId'; + $request = $this->crmNotesPostRequest($body); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\NoteId', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation crmNotesPostAsync + * + * Create a note + * + * @param \Brevo\Client\Model\NoteData $body Note data to create a note. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmNotesPostAsync($body) + { + return $this->crmNotesPostAsyncWithHttpInfo($body) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation crmNotesPostAsyncWithHttpInfo + * + * Create a note + * + * @param \Brevo\Client\Model\NoteData $body Note data to create a note. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmNotesPostAsyncWithHttpInfo($body) + { + $returnType = '\Brevo\Client\Model\NoteId'; + $request = $this->crmNotesPostRequest($body); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'crmNotesPost' + * + * @param \Brevo\Client\Model\NoteData $body Note data to create a note. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function crmNotesPostRequest($body) + { + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $body when calling crmNotesPost' + ); + } + + $resourcePath = '/crm/notes'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/vendor/getbrevo/brevo-php/lib/Api/ProcessApi.php b/vendor/getbrevo/brevo-php/lib/Api/ProcessApi.php new file mode 100644 index 0000000..7e38628 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Api/ProcessApi.php @@ -0,0 +1,705 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation getProcess + * + * Return the informations for a process + * + * @param int $processId Id of the process (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetProcess + */ + public function getProcess($processId) + { + list($response) = $this->getProcessWithHttpInfo($processId); + return $response; + } + + /** + * Operation getProcessWithHttpInfo + * + * Return the informations for a process + * + * @param int $processId Id of the process (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetProcess, HTTP status code, HTTP response headers (array of strings) + */ + public function getProcessWithHttpInfo($processId) + { + $returnType = '\Brevo\Client\Model\GetProcess'; + $request = $this->getProcessRequest($processId); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetProcess', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getProcessAsync + * + * Return the informations for a process + * + * @param int $processId Id of the process (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getProcessAsync($processId) + { + return $this->getProcessAsyncWithHttpInfo($processId) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getProcessAsyncWithHttpInfo + * + * Return the informations for a process + * + * @param int $processId Id of the process (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getProcessAsyncWithHttpInfo($processId) + { + $returnType = '\Brevo\Client\Model\GetProcess'; + $request = $this->getProcessRequest($processId); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getProcess' + * + * @param int $processId Id of the process (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getProcessRequest($processId) + { + // verify the required parameter 'processId' is set + if ($processId === null || (is_array($processId) && count($processId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $processId when calling getProcess' + ); + } + + $resourcePath = '/processes/{processId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($processId !== null) { + $resourcePath = str_replace( + '{' . 'processId' . '}', + ObjectSerializer::toPathValue($processId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getProcesses + * + * Return all the processes for your account + * + * @param int $limit Number limitation for the result returned (optional, default to 10) + * @param int $offset Beginning point in the list to retrieve from. (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetProcesses + */ + public function getProcesses($limit = '10', $offset = '0', $sort = 'desc') + { + list($response) = $this->getProcessesWithHttpInfo($limit, $offset, $sort); + return $response; + } + + /** + * Operation getProcessesWithHttpInfo + * + * Return all the processes for your account + * + * @param int $limit Number limitation for the result returned (optional, default to 10) + * @param int $offset Beginning point in the list to retrieve from. (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetProcesses, HTTP status code, HTTP response headers (array of strings) + */ + public function getProcessesWithHttpInfo($limit = '10', $offset = '0', $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetProcesses'; + $request = $this->getProcessesRequest($limit, $offset, $sort); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetProcesses', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getProcessesAsync + * + * Return all the processes for your account + * + * @param int $limit Number limitation for the result returned (optional, default to 10) + * @param int $offset Beginning point in the list to retrieve from. (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getProcessesAsync($limit = '10', $offset = '0', $sort = 'desc') + { + return $this->getProcessesAsyncWithHttpInfo($limit, $offset, $sort) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getProcessesAsyncWithHttpInfo + * + * Return all the processes for your account + * + * @param int $limit Number limitation for the result returned (optional, default to 10) + * @param int $offset Beginning point in the list to retrieve from. (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getProcessesAsyncWithHttpInfo($limit = '10', $offset = '0', $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetProcesses'; + $request = $this->getProcessesRequest($limit, $offset, $sort); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getProcesses' + * + * @param int $limit Number limitation for the result returned (optional, default to 10) + * @param int $offset Beginning point in the list to retrieve from. (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getProcessesRequest($limit = '10', $offset = '0', $sort = 'desc') + { + if ($limit !== null && $limit > 50) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling ProcessApi.getProcesses, must be smaller than or equal to 50.'); + } + if ($limit !== null && $limit < 0) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling ProcessApi.getProcesses, must be bigger than or equal to 0.'); + } + + + $resourcePath = '/processes'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/vendor/getbrevo/brevo-php/lib/Api/ResellerApi.php b/vendor/getbrevo/brevo-php/lib/Api/ResellerApi.php new file mode 100644 index 0000000..410a8c5 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Api/ResellerApi.php @@ -0,0 +1,4765 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation addCredits + * + * Add Email and/or SMS credits to a specific child account + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param \Brevo\Client\Model\AddCredits $addCredits Values to post to add credit to a specific child account (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\RemainingCreditModel + */ + public function addCredits($childIdentifier, $addCredits) + { + list($response) = $this->addCreditsWithHttpInfo($childIdentifier, $addCredits); + return $response; + } + + /** + * Operation addCreditsWithHttpInfo + * + * Add Email and/or SMS credits to a specific child account + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param \Brevo\Client\Model\AddCredits $addCredits Values to post to add credit to a specific child account (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\RemainingCreditModel, HTTP status code, HTTP response headers (array of strings) + */ + public function addCreditsWithHttpInfo($childIdentifier, $addCredits) + { + $returnType = '\Brevo\Client\Model\RemainingCreditModel'; + $request = $this->addCreditsRequest($childIdentifier, $addCredits); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\RemainingCreditModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation addCreditsAsync + * + * Add Email and/or SMS credits to a specific child account + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param \Brevo\Client\Model\AddCredits $addCredits Values to post to add credit to a specific child account (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function addCreditsAsync($childIdentifier, $addCredits) + { + return $this->addCreditsAsyncWithHttpInfo($childIdentifier, $addCredits) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation addCreditsAsyncWithHttpInfo + * + * Add Email and/or SMS credits to a specific child account + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param \Brevo\Client\Model\AddCredits $addCredits Values to post to add credit to a specific child account (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function addCreditsAsyncWithHttpInfo($childIdentifier, $addCredits) + { + $returnType = '\Brevo\Client\Model\RemainingCreditModel'; + $request = $this->addCreditsRequest($childIdentifier, $addCredits); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'addCredits' + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param \Brevo\Client\Model\AddCredits $addCredits Values to post to add credit to a specific child account (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function addCreditsRequest($childIdentifier, $addCredits) + { + // verify the required parameter 'childIdentifier' is set + if ($childIdentifier === null || (is_array($childIdentifier) && count($childIdentifier) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $childIdentifier when calling addCredits' + ); + } + // verify the required parameter 'addCredits' is set + if ($addCredits === null || (is_array($addCredits) && count($addCredits) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $addCredits when calling addCredits' + ); + } + + $resourcePath = '/reseller/children/{childIdentifier}/credits/add'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($childIdentifier !== null) { + $resourcePath = str_replace( + '{' . 'childIdentifier' . '}', + ObjectSerializer::toPathValue($childIdentifier), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($addCredits)) { + $_tempBody = $addCredits; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation associateIpToChild + * + * Associate a dedicated IP to the child + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param \Brevo\Client\Model\ManageIp $ip IP to associate (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function associateIpToChild($childIdentifier, $ip) + { + $this->associateIpToChildWithHttpInfo($childIdentifier, $ip); + } + + /** + * Operation associateIpToChildWithHttpInfo + * + * Associate a dedicated IP to the child + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param \Brevo\Client\Model\ManageIp $ip IP to associate (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function associateIpToChildWithHttpInfo($childIdentifier, $ip) + { + $returnType = ''; + $request = $this->associateIpToChildRequest($childIdentifier, $ip); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation associateIpToChildAsync + * + * Associate a dedicated IP to the child + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param \Brevo\Client\Model\ManageIp $ip IP to associate (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function associateIpToChildAsync($childIdentifier, $ip) + { + return $this->associateIpToChildAsyncWithHttpInfo($childIdentifier, $ip) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation associateIpToChildAsyncWithHttpInfo + * + * Associate a dedicated IP to the child + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param \Brevo\Client\Model\ManageIp $ip IP to associate (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function associateIpToChildAsyncWithHttpInfo($childIdentifier, $ip) + { + $returnType = ''; + $request = $this->associateIpToChildRequest($childIdentifier, $ip); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'associateIpToChild' + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param \Brevo\Client\Model\ManageIp $ip IP to associate (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function associateIpToChildRequest($childIdentifier, $ip) + { + // verify the required parameter 'childIdentifier' is set + if ($childIdentifier === null || (is_array($childIdentifier) && count($childIdentifier) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $childIdentifier when calling associateIpToChild' + ); + } + // verify the required parameter 'ip' is set + if ($ip === null || (is_array($ip) && count($ip) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $ip when calling associateIpToChild' + ); + } + + $resourcePath = '/reseller/children/{childIdentifier}/ips/associate'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($childIdentifier !== null) { + $resourcePath = str_replace( + '{' . 'childIdentifier' . '}', + ObjectSerializer::toPathValue($childIdentifier), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($ip)) { + $_tempBody = $ip; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation createChildDomain + * + * Create a domain for a child account + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param \Brevo\Client\Model\AddChildDomain $addChildDomain Sender domain to add for a specific child account. This will not be displayed to the parent account. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function createChildDomain($childIdentifier, $addChildDomain) + { + $this->createChildDomainWithHttpInfo($childIdentifier, $addChildDomain); + } + + /** + * Operation createChildDomainWithHttpInfo + * + * Create a domain for a child account + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param \Brevo\Client\Model\AddChildDomain $addChildDomain Sender domain to add for a specific child account. This will not be displayed to the parent account. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function createChildDomainWithHttpInfo($childIdentifier, $addChildDomain) + { + $returnType = ''; + $request = $this->createChildDomainRequest($childIdentifier, $addChildDomain); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation createChildDomainAsync + * + * Create a domain for a child account + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param \Brevo\Client\Model\AddChildDomain $addChildDomain Sender domain to add for a specific child account. This will not be displayed to the parent account. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createChildDomainAsync($childIdentifier, $addChildDomain) + { + return $this->createChildDomainAsyncWithHttpInfo($childIdentifier, $addChildDomain) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createChildDomainAsyncWithHttpInfo + * + * Create a domain for a child account + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param \Brevo\Client\Model\AddChildDomain $addChildDomain Sender domain to add for a specific child account. This will not be displayed to the parent account. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createChildDomainAsyncWithHttpInfo($childIdentifier, $addChildDomain) + { + $returnType = ''; + $request = $this->createChildDomainRequest($childIdentifier, $addChildDomain); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createChildDomain' + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param \Brevo\Client\Model\AddChildDomain $addChildDomain Sender domain to add for a specific child account. This will not be displayed to the parent account. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function createChildDomainRequest($childIdentifier, $addChildDomain) + { + // verify the required parameter 'childIdentifier' is set + if ($childIdentifier === null || (is_array($childIdentifier) && count($childIdentifier) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $childIdentifier when calling createChildDomain' + ); + } + // verify the required parameter 'addChildDomain' is set + if ($addChildDomain === null || (is_array($addChildDomain) && count($addChildDomain) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $addChildDomain when calling createChildDomain' + ); + } + + $resourcePath = '/reseller/children/{childIdentifier}/domains'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($childIdentifier !== null) { + $resourcePath = str_replace( + '{' . 'childIdentifier' . '}', + ObjectSerializer::toPathValue($childIdentifier), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($addChildDomain)) { + $_tempBody = $addChildDomain; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation createResellerChild + * + * Creates a reseller child + * + * @param \Brevo\Client\Model\CreateChild $resellerChild reseller child to add (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\CreateReseller + */ + public function createResellerChild($resellerChild = null) + { + list($response) = $this->createResellerChildWithHttpInfo($resellerChild); + return $response; + } + + /** + * Operation createResellerChildWithHttpInfo + * + * Creates a reseller child + * + * @param \Brevo\Client\Model\CreateChild $resellerChild reseller child to add (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\CreateReseller, HTTP status code, HTTP response headers (array of strings) + */ + public function createResellerChildWithHttpInfo($resellerChild = null) + { + $returnType = '\Brevo\Client\Model\CreateReseller'; + $request = $this->createResellerChildRequest($resellerChild); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\CreateReseller', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation createResellerChildAsync + * + * Creates a reseller child + * + * @param \Brevo\Client\Model\CreateChild $resellerChild reseller child to add (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createResellerChildAsync($resellerChild = null) + { + return $this->createResellerChildAsyncWithHttpInfo($resellerChild) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createResellerChildAsyncWithHttpInfo + * + * Creates a reseller child + * + * @param \Brevo\Client\Model\CreateChild $resellerChild reseller child to add (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createResellerChildAsyncWithHttpInfo($resellerChild = null) + { + $returnType = '\Brevo\Client\Model\CreateReseller'; + $request = $this->createResellerChildRequest($resellerChild); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createResellerChild' + * + * @param \Brevo\Client\Model\CreateChild $resellerChild reseller child to add (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function createResellerChildRequest($resellerChild = null) + { + + $resourcePath = '/reseller/children'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($resellerChild)) { + $_tempBody = $resellerChild; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation deleteChildDomain + * + * Delete the sender domain of the reseller child based on the childIdentifier and domainName passed + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param string $domainName Pass the existing domain that needs to be deleted (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function deleteChildDomain($childIdentifier, $domainName) + { + $this->deleteChildDomainWithHttpInfo($childIdentifier, $domainName); + } + + /** + * Operation deleteChildDomainWithHttpInfo + * + * Delete the sender domain of the reseller child based on the childIdentifier and domainName passed + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param string $domainName Pass the existing domain that needs to be deleted (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteChildDomainWithHttpInfo($childIdentifier, $domainName) + { + $returnType = ''; + $request = $this->deleteChildDomainRequest($childIdentifier, $domainName); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation deleteChildDomainAsync + * + * Delete the sender domain of the reseller child based on the childIdentifier and domainName passed + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param string $domainName Pass the existing domain that needs to be deleted (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteChildDomainAsync($childIdentifier, $domainName) + { + return $this->deleteChildDomainAsyncWithHttpInfo($childIdentifier, $domainName) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteChildDomainAsyncWithHttpInfo + * + * Delete the sender domain of the reseller child based on the childIdentifier and domainName passed + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param string $domainName Pass the existing domain that needs to be deleted (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteChildDomainAsyncWithHttpInfo($childIdentifier, $domainName) + { + $returnType = ''; + $request = $this->deleteChildDomainRequest($childIdentifier, $domainName); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'deleteChildDomain' + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param string $domainName Pass the existing domain that needs to be deleted (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function deleteChildDomainRequest($childIdentifier, $domainName) + { + // verify the required parameter 'childIdentifier' is set + if ($childIdentifier === null || (is_array($childIdentifier) && count($childIdentifier) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $childIdentifier when calling deleteChildDomain' + ); + } + // verify the required parameter 'domainName' is set + if ($domainName === null || (is_array($domainName) && count($domainName) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $domainName when calling deleteChildDomain' + ); + } + + $resourcePath = '/reseller/children/{childIdentifier}/domains/{domainName}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($childIdentifier !== null) { + $resourcePath = str_replace( + '{' . 'childIdentifier' . '}', + ObjectSerializer::toPathValue($childIdentifier), + $resourcePath + ); + } + // path params + if ($domainName !== null) { + $resourcePath = str_replace( + '{' . 'domainName' . '}', + ObjectSerializer::toPathValue($domainName), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation deleteResellerChild + * + * Delete a single reseller child based on the child identifier supplied + * + * @param string $childIdentifier Either auth key or child id of reseller's child (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function deleteResellerChild($childIdentifier) + { + $this->deleteResellerChildWithHttpInfo($childIdentifier); + } + + /** + * Operation deleteResellerChildWithHttpInfo + * + * Delete a single reseller child based on the child identifier supplied + * + * @param string $childIdentifier Either auth key or child id of reseller's child (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteResellerChildWithHttpInfo($childIdentifier) + { + $returnType = ''; + $request = $this->deleteResellerChildRequest($childIdentifier); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation deleteResellerChildAsync + * + * Delete a single reseller child based on the child identifier supplied + * + * @param string $childIdentifier Either auth key or child id of reseller's child (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteResellerChildAsync($childIdentifier) + { + return $this->deleteResellerChildAsyncWithHttpInfo($childIdentifier) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteResellerChildAsyncWithHttpInfo + * + * Delete a single reseller child based on the child identifier supplied + * + * @param string $childIdentifier Either auth key or child id of reseller's child (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteResellerChildAsyncWithHttpInfo($childIdentifier) + { + $returnType = ''; + $request = $this->deleteResellerChildRequest($childIdentifier); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'deleteResellerChild' + * + * @param string $childIdentifier Either auth key or child id of reseller's child (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function deleteResellerChildRequest($childIdentifier) + { + // verify the required parameter 'childIdentifier' is set + if ($childIdentifier === null || (is_array($childIdentifier) && count($childIdentifier) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $childIdentifier when calling deleteResellerChild' + ); + } + + $resourcePath = '/reseller/children/{childIdentifier}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($childIdentifier !== null) { + $resourcePath = str_replace( + '{' . 'childIdentifier' . '}', + ObjectSerializer::toPathValue($childIdentifier), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation dissociateIpFromChild + * + * Dissociate a dedicated IP to the child + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param \Brevo\Client\Model\ManageIp $ip IP to dissociate (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function dissociateIpFromChild($childIdentifier, $ip) + { + $this->dissociateIpFromChildWithHttpInfo($childIdentifier, $ip); + } + + /** + * Operation dissociateIpFromChildWithHttpInfo + * + * Dissociate a dedicated IP to the child + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param \Brevo\Client\Model\ManageIp $ip IP to dissociate (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function dissociateIpFromChildWithHttpInfo($childIdentifier, $ip) + { + $returnType = ''; + $request = $this->dissociateIpFromChildRequest($childIdentifier, $ip); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation dissociateIpFromChildAsync + * + * Dissociate a dedicated IP to the child + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param \Brevo\Client\Model\ManageIp $ip IP to dissociate (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function dissociateIpFromChildAsync($childIdentifier, $ip) + { + return $this->dissociateIpFromChildAsyncWithHttpInfo($childIdentifier, $ip) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation dissociateIpFromChildAsyncWithHttpInfo + * + * Dissociate a dedicated IP to the child + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param \Brevo\Client\Model\ManageIp $ip IP to dissociate (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function dissociateIpFromChildAsyncWithHttpInfo($childIdentifier, $ip) + { + $returnType = ''; + $request = $this->dissociateIpFromChildRequest($childIdentifier, $ip); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'dissociateIpFromChild' + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param \Brevo\Client\Model\ManageIp $ip IP to dissociate (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function dissociateIpFromChildRequest($childIdentifier, $ip) + { + // verify the required parameter 'childIdentifier' is set + if ($childIdentifier === null || (is_array($childIdentifier) && count($childIdentifier) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $childIdentifier when calling dissociateIpFromChild' + ); + } + // verify the required parameter 'ip' is set + if ($ip === null || (is_array($ip) && count($ip) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $ip when calling dissociateIpFromChild' + ); + } + + $resourcePath = '/reseller/children/{childIdentifier}/ips/dissociate'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($childIdentifier !== null) { + $resourcePath = str_replace( + '{' . 'childIdentifier' . '}', + ObjectSerializer::toPathValue($childIdentifier), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($ip)) { + $_tempBody = $ip; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getChildAccountCreationStatus + * + * Get the status of a reseller's child account creation, whether it is successfully created (exists) or not based on the identifier supplied + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetChildAccountCreationStatus + */ + public function getChildAccountCreationStatus($childIdentifier) + { + list($response) = $this->getChildAccountCreationStatusWithHttpInfo($childIdentifier); + return $response; + } + + /** + * Operation getChildAccountCreationStatusWithHttpInfo + * + * Get the status of a reseller's child account creation, whether it is successfully created (exists) or not based on the identifier supplied + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetChildAccountCreationStatus, HTTP status code, HTTP response headers (array of strings) + */ + public function getChildAccountCreationStatusWithHttpInfo($childIdentifier) + { + $returnType = '\Brevo\Client\Model\GetChildAccountCreationStatus'; + $request = $this->getChildAccountCreationStatusRequest($childIdentifier); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetChildAccountCreationStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getChildAccountCreationStatusAsync + * + * Get the status of a reseller's child account creation, whether it is successfully created (exists) or not based on the identifier supplied + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getChildAccountCreationStatusAsync($childIdentifier) + { + return $this->getChildAccountCreationStatusAsyncWithHttpInfo($childIdentifier) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getChildAccountCreationStatusAsyncWithHttpInfo + * + * Get the status of a reseller's child account creation, whether it is successfully created (exists) or not based on the identifier supplied + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getChildAccountCreationStatusAsyncWithHttpInfo($childIdentifier) + { + $returnType = '\Brevo\Client\Model\GetChildAccountCreationStatus'; + $request = $this->getChildAccountCreationStatusRequest($childIdentifier); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getChildAccountCreationStatus' + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getChildAccountCreationStatusRequest($childIdentifier) + { + // verify the required parameter 'childIdentifier' is set + if ($childIdentifier === null || (is_array($childIdentifier) && count($childIdentifier) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $childIdentifier when calling getChildAccountCreationStatus' + ); + } + + $resourcePath = '/reseller/children/{childIdentifier}/accountCreationStatus'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($childIdentifier !== null) { + $resourcePath = str_replace( + '{' . 'childIdentifier' . '}', + ObjectSerializer::toPathValue($childIdentifier), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getChildDomains + * + * Get all sender domains for a specific child account + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetChildDomains + */ + public function getChildDomains($childIdentifier) + { + list($response) = $this->getChildDomainsWithHttpInfo($childIdentifier); + return $response; + } + + /** + * Operation getChildDomainsWithHttpInfo + * + * Get all sender domains for a specific child account + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetChildDomains, HTTP status code, HTTP response headers (array of strings) + */ + public function getChildDomainsWithHttpInfo($childIdentifier) + { + $returnType = '\Brevo\Client\Model\GetChildDomains'; + $request = $this->getChildDomainsRequest($childIdentifier); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetChildDomains', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getChildDomainsAsync + * + * Get all sender domains for a specific child account + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getChildDomainsAsync($childIdentifier) + { + return $this->getChildDomainsAsyncWithHttpInfo($childIdentifier) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getChildDomainsAsyncWithHttpInfo + * + * Get all sender domains for a specific child account + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getChildDomainsAsyncWithHttpInfo($childIdentifier) + { + $returnType = '\Brevo\Client\Model\GetChildDomains'; + $request = $this->getChildDomainsRequest($childIdentifier); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getChildDomains' + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getChildDomainsRequest($childIdentifier) + { + // verify the required parameter 'childIdentifier' is set + if ($childIdentifier === null || (is_array($childIdentifier) && count($childIdentifier) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $childIdentifier when calling getChildDomains' + ); + } + + $resourcePath = '/reseller/children/{childIdentifier}/domains'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($childIdentifier !== null) { + $resourcePath = str_replace( + '{' . 'childIdentifier' . '}', + ObjectSerializer::toPathValue($childIdentifier), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getChildInfo + * + * Get a child account's details + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetChildInfo + */ + public function getChildInfo($childIdentifier) + { + list($response) = $this->getChildInfoWithHttpInfo($childIdentifier); + return $response; + } + + /** + * Operation getChildInfoWithHttpInfo + * + * Get a child account's details + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetChildInfo, HTTP status code, HTTP response headers (array of strings) + */ + public function getChildInfoWithHttpInfo($childIdentifier) + { + $returnType = '\Brevo\Client\Model\GetChildInfo'; + $request = $this->getChildInfoRequest($childIdentifier); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetChildInfo', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getChildInfoAsync + * + * Get a child account's details + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getChildInfoAsync($childIdentifier) + { + return $this->getChildInfoAsyncWithHttpInfo($childIdentifier) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getChildInfoAsyncWithHttpInfo + * + * Get a child account's details + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getChildInfoAsyncWithHttpInfo($childIdentifier) + { + $returnType = '\Brevo\Client\Model\GetChildInfo'; + $request = $this->getChildInfoRequest($childIdentifier); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getChildInfo' + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getChildInfoRequest($childIdentifier) + { + // verify the required parameter 'childIdentifier' is set + if ($childIdentifier === null || (is_array($childIdentifier) && count($childIdentifier) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $childIdentifier when calling getChildInfo' + ); + } + + $resourcePath = '/reseller/children/{childIdentifier}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($childIdentifier !== null) { + $resourcePath = str_replace( + '{' . 'childIdentifier' . '}', + ObjectSerializer::toPathValue($childIdentifier), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getResellerChilds + * + * Get the list of all children accounts + * + * @param int $limit Number of documents for child accounts information per page (optional, default to 10) + * @param int $offset Index of the first document in the page (optional, default to 0) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetChildrenList + */ + public function getResellerChilds($limit = '10', $offset = '0') + { + list($response) = $this->getResellerChildsWithHttpInfo($limit, $offset); + return $response; + } + + /** + * Operation getResellerChildsWithHttpInfo + * + * Get the list of all children accounts + * + * @param int $limit Number of documents for child accounts information per page (optional, default to 10) + * @param int $offset Index of the first document in the page (optional, default to 0) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetChildrenList, HTTP status code, HTTP response headers (array of strings) + */ + public function getResellerChildsWithHttpInfo($limit = '10', $offset = '0') + { + $returnType = '\Brevo\Client\Model\GetChildrenList'; + $request = $this->getResellerChildsRequest($limit, $offset); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetChildrenList', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getResellerChildsAsync + * + * Get the list of all children accounts + * + * @param int $limit Number of documents for child accounts information per page (optional, default to 10) + * @param int $offset Index of the first document in the page (optional, default to 0) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getResellerChildsAsync($limit = '10', $offset = '0') + { + return $this->getResellerChildsAsyncWithHttpInfo($limit, $offset) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getResellerChildsAsyncWithHttpInfo + * + * Get the list of all children accounts + * + * @param int $limit Number of documents for child accounts information per page (optional, default to 10) + * @param int $offset Index of the first document in the page (optional, default to 0) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getResellerChildsAsyncWithHttpInfo($limit = '10', $offset = '0') + { + $returnType = '\Brevo\Client\Model\GetChildrenList'; + $request = $this->getResellerChildsRequest($limit, $offset); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getResellerChilds' + * + * @param int $limit Number of documents for child accounts information per page (optional, default to 10) + * @param int $offset Index of the first document in the page (optional, default to 0) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getResellerChildsRequest($limit = '10', $offset = '0') + { + if ($limit !== null && $limit > 20) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling ResellerApi.getResellerChilds, must be smaller than or equal to 20.'); + } + if ($limit !== null && $limit < 0) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling ResellerApi.getResellerChilds, must be bigger than or equal to 0.'); + } + + + $resourcePath = '/reseller/children'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getSsoToken + * + * Get session token to access Brevo (SSO) + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetSsoToken + */ + public function getSsoToken($childIdentifier) + { + list($response) = $this->getSsoTokenWithHttpInfo($childIdentifier); + return $response; + } + + /** + * Operation getSsoTokenWithHttpInfo + * + * Get session token to access Brevo (SSO) + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetSsoToken, HTTP status code, HTTP response headers (array of strings) + */ + public function getSsoTokenWithHttpInfo($childIdentifier) + { + $returnType = '\Brevo\Client\Model\GetSsoToken'; + $request = $this->getSsoTokenRequest($childIdentifier); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetSsoToken', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getSsoTokenAsync + * + * Get session token to access Brevo (SSO) + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getSsoTokenAsync($childIdentifier) + { + return $this->getSsoTokenAsyncWithHttpInfo($childIdentifier) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getSsoTokenAsyncWithHttpInfo + * + * Get session token to access Brevo (SSO) + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getSsoTokenAsyncWithHttpInfo($childIdentifier) + { + $returnType = '\Brevo\Client\Model\GetSsoToken'; + $request = $this->getSsoTokenRequest($childIdentifier); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getSsoToken' + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getSsoTokenRequest($childIdentifier) + { + // verify the required parameter 'childIdentifier' is set + if ($childIdentifier === null || (is_array($childIdentifier) && count($childIdentifier) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $childIdentifier when calling getSsoToken' + ); + } + + $resourcePath = '/reseller/children/{childIdentifier}/auth'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($childIdentifier !== null) { + $resourcePath = str_replace( + '{' . 'childIdentifier' . '}', + ObjectSerializer::toPathValue($childIdentifier), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation removeCredits + * + * Remove Email and/or SMS credits from a specific child account + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param \Brevo\Client\Model\RemoveCredits $removeCredits Values to post to remove email or SMS credits from a specific child account (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\RemainingCreditModel + */ + public function removeCredits($childIdentifier, $removeCredits) + { + list($response) = $this->removeCreditsWithHttpInfo($childIdentifier, $removeCredits); + return $response; + } + + /** + * Operation removeCreditsWithHttpInfo + * + * Remove Email and/or SMS credits from a specific child account + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param \Brevo\Client\Model\RemoveCredits $removeCredits Values to post to remove email or SMS credits from a specific child account (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\RemainingCreditModel, HTTP status code, HTTP response headers (array of strings) + */ + public function removeCreditsWithHttpInfo($childIdentifier, $removeCredits) + { + $returnType = '\Brevo\Client\Model\RemainingCreditModel'; + $request = $this->removeCreditsRequest($childIdentifier, $removeCredits); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\RemainingCreditModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation removeCreditsAsync + * + * Remove Email and/or SMS credits from a specific child account + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param \Brevo\Client\Model\RemoveCredits $removeCredits Values to post to remove email or SMS credits from a specific child account (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function removeCreditsAsync($childIdentifier, $removeCredits) + { + return $this->removeCreditsAsyncWithHttpInfo($childIdentifier, $removeCredits) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation removeCreditsAsyncWithHttpInfo + * + * Remove Email and/or SMS credits from a specific child account + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param \Brevo\Client\Model\RemoveCredits $removeCredits Values to post to remove email or SMS credits from a specific child account (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function removeCreditsAsyncWithHttpInfo($childIdentifier, $removeCredits) + { + $returnType = '\Brevo\Client\Model\RemainingCreditModel'; + $request = $this->removeCreditsRequest($childIdentifier, $removeCredits); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'removeCredits' + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param \Brevo\Client\Model\RemoveCredits $removeCredits Values to post to remove email or SMS credits from a specific child account (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function removeCreditsRequest($childIdentifier, $removeCredits) + { + // verify the required parameter 'childIdentifier' is set + if ($childIdentifier === null || (is_array($childIdentifier) && count($childIdentifier) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $childIdentifier when calling removeCredits' + ); + } + // verify the required parameter 'removeCredits' is set + if ($removeCredits === null || (is_array($removeCredits) && count($removeCredits) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $removeCredits when calling removeCredits' + ); + } + + $resourcePath = '/reseller/children/{childIdentifier}/credits/remove'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($childIdentifier !== null) { + $resourcePath = str_replace( + '{' . 'childIdentifier' . '}', + ObjectSerializer::toPathValue($childIdentifier), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($removeCredits)) { + $_tempBody = $removeCredits; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation updateChildAccountStatus + * + * Update info of reseller's child account status based on the childIdentifier supplied + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param \Brevo\Client\Model\UpdateChildAccountStatus $updateChildAccountStatus values to update in child account status (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function updateChildAccountStatus($childIdentifier, $updateChildAccountStatus) + { + $this->updateChildAccountStatusWithHttpInfo($childIdentifier, $updateChildAccountStatus); + } + + /** + * Operation updateChildAccountStatusWithHttpInfo + * + * Update info of reseller's child account status based on the childIdentifier supplied + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param \Brevo\Client\Model\UpdateChildAccountStatus $updateChildAccountStatus values to update in child account status (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function updateChildAccountStatusWithHttpInfo($childIdentifier, $updateChildAccountStatus) + { + $returnType = ''; + $request = $this->updateChildAccountStatusRequest($childIdentifier, $updateChildAccountStatus); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation updateChildAccountStatusAsync + * + * Update info of reseller's child account status based on the childIdentifier supplied + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param \Brevo\Client\Model\UpdateChildAccountStatus $updateChildAccountStatus values to update in child account status (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateChildAccountStatusAsync($childIdentifier, $updateChildAccountStatus) + { + return $this->updateChildAccountStatusAsyncWithHttpInfo($childIdentifier, $updateChildAccountStatus) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateChildAccountStatusAsyncWithHttpInfo + * + * Update info of reseller's child account status based on the childIdentifier supplied + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param \Brevo\Client\Model\UpdateChildAccountStatus $updateChildAccountStatus values to update in child account status (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateChildAccountStatusAsyncWithHttpInfo($childIdentifier, $updateChildAccountStatus) + { + $returnType = ''; + $request = $this->updateChildAccountStatusRequest($childIdentifier, $updateChildAccountStatus); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'updateChildAccountStatus' + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param \Brevo\Client\Model\UpdateChildAccountStatus $updateChildAccountStatus values to update in child account status (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function updateChildAccountStatusRequest($childIdentifier, $updateChildAccountStatus) + { + // verify the required parameter 'childIdentifier' is set + if ($childIdentifier === null || (is_array($childIdentifier) && count($childIdentifier) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $childIdentifier when calling updateChildAccountStatus' + ); + } + // verify the required parameter 'updateChildAccountStatus' is set + if ($updateChildAccountStatus === null || (is_array($updateChildAccountStatus) && count($updateChildAccountStatus) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $updateChildAccountStatus when calling updateChildAccountStatus' + ); + } + + $resourcePath = '/reseller/children/{childIdentifier}/accountStatus'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($childIdentifier !== null) { + $resourcePath = str_replace( + '{' . 'childIdentifier' . '}', + ObjectSerializer::toPathValue($childIdentifier), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($updateChildAccountStatus)) { + $_tempBody = $updateChildAccountStatus; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation updateChildDomain + * + * Update the sender domain of reseller's child based on the childIdentifier and domainName passed + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param string $domainName Pass the existing domain that needs to be updated (required) + * @param \Brevo\Client\Model\UpdateChildDomain $updateChildDomain value to update for sender domain (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function updateChildDomain($childIdentifier, $domainName, $updateChildDomain) + { + $this->updateChildDomainWithHttpInfo($childIdentifier, $domainName, $updateChildDomain); + } + + /** + * Operation updateChildDomainWithHttpInfo + * + * Update the sender domain of reseller's child based on the childIdentifier and domainName passed + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param string $domainName Pass the existing domain that needs to be updated (required) + * @param \Brevo\Client\Model\UpdateChildDomain $updateChildDomain value to update for sender domain (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function updateChildDomainWithHttpInfo($childIdentifier, $domainName, $updateChildDomain) + { + $returnType = ''; + $request = $this->updateChildDomainRequest($childIdentifier, $domainName, $updateChildDomain); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation updateChildDomainAsync + * + * Update the sender domain of reseller's child based on the childIdentifier and domainName passed + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param string $domainName Pass the existing domain that needs to be updated (required) + * @param \Brevo\Client\Model\UpdateChildDomain $updateChildDomain value to update for sender domain (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateChildDomainAsync($childIdentifier, $domainName, $updateChildDomain) + { + return $this->updateChildDomainAsyncWithHttpInfo($childIdentifier, $domainName, $updateChildDomain) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateChildDomainAsyncWithHttpInfo + * + * Update the sender domain of reseller's child based on the childIdentifier and domainName passed + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param string $domainName Pass the existing domain that needs to be updated (required) + * @param \Brevo\Client\Model\UpdateChildDomain $updateChildDomain value to update for sender domain (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateChildDomainAsyncWithHttpInfo($childIdentifier, $domainName, $updateChildDomain) + { + $returnType = ''; + $request = $this->updateChildDomainRequest($childIdentifier, $domainName, $updateChildDomain); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'updateChildDomain' + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param string $domainName Pass the existing domain that needs to be updated (required) + * @param \Brevo\Client\Model\UpdateChildDomain $updateChildDomain value to update for sender domain (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function updateChildDomainRequest($childIdentifier, $domainName, $updateChildDomain) + { + // verify the required parameter 'childIdentifier' is set + if ($childIdentifier === null || (is_array($childIdentifier) && count($childIdentifier) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $childIdentifier when calling updateChildDomain' + ); + } + // verify the required parameter 'domainName' is set + if ($domainName === null || (is_array($domainName) && count($domainName) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $domainName when calling updateChildDomain' + ); + } + // verify the required parameter 'updateChildDomain' is set + if ($updateChildDomain === null || (is_array($updateChildDomain) && count($updateChildDomain) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $updateChildDomain when calling updateChildDomain' + ); + } + + $resourcePath = '/reseller/children/{childIdentifier}/domains/{domainName}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($childIdentifier !== null) { + $resourcePath = str_replace( + '{' . 'childIdentifier' . '}', + ObjectSerializer::toPathValue($childIdentifier), + $resourcePath + ); + } + // path params + if ($domainName !== null) { + $resourcePath = str_replace( + '{' . 'domainName' . '}', + ObjectSerializer::toPathValue($domainName), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($updateChildDomain)) { + $_tempBody = $updateChildDomain; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation updateResellerChild + * + * Update info of reseller's child based on the child identifier supplied + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param \Brevo\Client\Model\UpdateChild $resellerChild values to update in child profile (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function updateResellerChild($childIdentifier, $resellerChild) + { + $this->updateResellerChildWithHttpInfo($childIdentifier, $resellerChild); + } + + /** + * Operation updateResellerChildWithHttpInfo + * + * Update info of reseller's child based on the child identifier supplied + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param \Brevo\Client\Model\UpdateChild $resellerChild values to update in child profile (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function updateResellerChildWithHttpInfo($childIdentifier, $resellerChild) + { + $returnType = ''; + $request = $this->updateResellerChildRequest($childIdentifier, $resellerChild); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation updateResellerChildAsync + * + * Update info of reseller's child based on the child identifier supplied + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param \Brevo\Client\Model\UpdateChild $resellerChild values to update in child profile (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateResellerChildAsync($childIdentifier, $resellerChild) + { + return $this->updateResellerChildAsyncWithHttpInfo($childIdentifier, $resellerChild) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateResellerChildAsyncWithHttpInfo + * + * Update info of reseller's child based on the child identifier supplied + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param \Brevo\Client\Model\UpdateChild $resellerChild values to update in child profile (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateResellerChildAsyncWithHttpInfo($childIdentifier, $resellerChild) + { + $returnType = ''; + $request = $this->updateResellerChildRequest($childIdentifier, $resellerChild); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'updateResellerChild' + * + * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param \Brevo\Client\Model\UpdateChild $resellerChild values to update in child profile (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function updateResellerChildRequest($childIdentifier, $resellerChild) + { + // verify the required parameter 'childIdentifier' is set + if ($childIdentifier === null || (is_array($childIdentifier) && count($childIdentifier) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $childIdentifier when calling updateResellerChild' + ); + } + // verify the required parameter 'resellerChild' is set + if ($resellerChild === null || (is_array($resellerChild) && count($resellerChild) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $resellerChild when calling updateResellerChild' + ); + } + + $resourcePath = '/reseller/children/{childIdentifier}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($childIdentifier !== null) { + $resourcePath = str_replace( + '{' . 'childIdentifier' . '}', + ObjectSerializer::toPathValue($childIdentifier), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($resellerChild)) { + $_tempBody = $resellerChild; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/vendor/getbrevo/brevo-php/lib/Api/SMSCampaignsApi.php b/vendor/getbrevo/brevo-php/lib/Api/SMSCampaignsApi.php new file mode 100644 index 0000000..f01c678 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Api/SMSCampaignsApi.php @@ -0,0 +1,2929 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation createSmsCampaign + * + * Creates an SMS campaign + * + * @param \Brevo\Client\Model\CreateSmsCampaign $createSmsCampaign Values to create an SMS Campaign (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\CreateModel + */ + public function createSmsCampaign($createSmsCampaign) + { + list($response) = $this->createSmsCampaignWithHttpInfo($createSmsCampaign); + return $response; + } + + /** + * Operation createSmsCampaignWithHttpInfo + * + * Creates an SMS campaign + * + * @param \Brevo\Client\Model\CreateSmsCampaign $createSmsCampaign Values to create an SMS Campaign (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\CreateModel, HTTP status code, HTTP response headers (array of strings) + */ + public function createSmsCampaignWithHttpInfo($createSmsCampaign) + { + $returnType = '\Brevo\Client\Model\CreateModel'; + $request = $this->createSmsCampaignRequest($createSmsCampaign); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\CreateModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation createSmsCampaignAsync + * + * Creates an SMS campaign + * + * @param \Brevo\Client\Model\CreateSmsCampaign $createSmsCampaign Values to create an SMS Campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createSmsCampaignAsync($createSmsCampaign) + { + return $this->createSmsCampaignAsyncWithHttpInfo($createSmsCampaign) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createSmsCampaignAsyncWithHttpInfo + * + * Creates an SMS campaign + * + * @param \Brevo\Client\Model\CreateSmsCampaign $createSmsCampaign Values to create an SMS Campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createSmsCampaignAsyncWithHttpInfo($createSmsCampaign) + { + $returnType = '\Brevo\Client\Model\CreateModel'; + $request = $this->createSmsCampaignRequest($createSmsCampaign); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createSmsCampaign' + * + * @param \Brevo\Client\Model\CreateSmsCampaign $createSmsCampaign Values to create an SMS Campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function createSmsCampaignRequest($createSmsCampaign) + { + // verify the required parameter 'createSmsCampaign' is set + if ($createSmsCampaign === null || (is_array($createSmsCampaign) && count($createSmsCampaign) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $createSmsCampaign when calling createSmsCampaign' + ); + } + + $resourcePath = '/smsCampaigns'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($createSmsCampaign)) { + $_tempBody = $createSmsCampaign; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation deleteSmsCampaign + * + * Delete an SMS campaign + * + * @param int $campaignId id of the SMS campaign (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function deleteSmsCampaign($campaignId) + { + $this->deleteSmsCampaignWithHttpInfo($campaignId); + } + + /** + * Operation deleteSmsCampaignWithHttpInfo + * + * Delete an SMS campaign + * + * @param int $campaignId id of the SMS campaign (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteSmsCampaignWithHttpInfo($campaignId) + { + $returnType = ''; + $request = $this->deleteSmsCampaignRequest($campaignId); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation deleteSmsCampaignAsync + * + * Delete an SMS campaign + * + * @param int $campaignId id of the SMS campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteSmsCampaignAsync($campaignId) + { + return $this->deleteSmsCampaignAsyncWithHttpInfo($campaignId) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteSmsCampaignAsyncWithHttpInfo + * + * Delete an SMS campaign + * + * @param int $campaignId id of the SMS campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteSmsCampaignAsyncWithHttpInfo($campaignId) + { + $returnType = ''; + $request = $this->deleteSmsCampaignRequest($campaignId); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'deleteSmsCampaign' + * + * @param int $campaignId id of the SMS campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function deleteSmsCampaignRequest($campaignId) + { + // verify the required parameter 'campaignId' is set + if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $campaignId when calling deleteSmsCampaign' + ); + } + + $resourcePath = '/smsCampaigns/{campaignId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($campaignId !== null) { + $resourcePath = str_replace( + '{' . 'campaignId' . '}', + ObjectSerializer::toPathValue($campaignId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getSmsCampaign + * + * Get an SMS campaign + * + * @param int $campaignId id of the SMS campaign (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetSmsCampaign + */ + public function getSmsCampaign($campaignId) + { + list($response) = $this->getSmsCampaignWithHttpInfo($campaignId); + return $response; + } + + /** + * Operation getSmsCampaignWithHttpInfo + * + * Get an SMS campaign + * + * @param int $campaignId id of the SMS campaign (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetSmsCampaign, HTTP status code, HTTP response headers (array of strings) + */ + public function getSmsCampaignWithHttpInfo($campaignId) + { + $returnType = '\Brevo\Client\Model\GetSmsCampaign'; + $request = $this->getSmsCampaignRequest($campaignId); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetSmsCampaign', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getSmsCampaignAsync + * + * Get an SMS campaign + * + * @param int $campaignId id of the SMS campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getSmsCampaignAsync($campaignId) + { + return $this->getSmsCampaignAsyncWithHttpInfo($campaignId) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getSmsCampaignAsyncWithHttpInfo + * + * Get an SMS campaign + * + * @param int $campaignId id of the SMS campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getSmsCampaignAsyncWithHttpInfo($campaignId) + { + $returnType = '\Brevo\Client\Model\GetSmsCampaign'; + $request = $this->getSmsCampaignRequest($campaignId); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getSmsCampaign' + * + * @param int $campaignId id of the SMS campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getSmsCampaignRequest($campaignId) + { + // verify the required parameter 'campaignId' is set + if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $campaignId when calling getSmsCampaign' + ); + } + + $resourcePath = '/smsCampaigns/{campaignId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($campaignId !== null) { + $resourcePath = str_replace( + '{' . 'campaignId' . '}', + ObjectSerializer::toPathValue($campaignId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getSmsCampaigns + * + * Returns the information for all your created SMS campaigns + * + * @param string $status Status of campaign. (optional) + * @param string $startDate Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param string $endDate Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param int $limit Number limitation for the result returned (optional, default to 500) + * @param int $offset Beginning point in the list to retrieve from. (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetSmsCampaigns + */ + public function getSmsCampaigns($status = null, $startDate = null, $endDate = null, $limit = '500', $offset = '0', $sort = 'desc') + { + list($response) = $this->getSmsCampaignsWithHttpInfo($status, $startDate, $endDate, $limit, $offset, $sort); + return $response; + } + + /** + * Operation getSmsCampaignsWithHttpInfo + * + * Returns the information for all your created SMS campaigns + * + * @param string $status Status of campaign. (optional) + * @param string $startDate Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param string $endDate Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param int $limit Number limitation for the result returned (optional, default to 500) + * @param int $offset Beginning point in the list to retrieve from. (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetSmsCampaigns, HTTP status code, HTTP response headers (array of strings) + */ + public function getSmsCampaignsWithHttpInfo($status = null, $startDate = null, $endDate = null, $limit = '500', $offset = '0', $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetSmsCampaigns'; + $request = $this->getSmsCampaignsRequest($status, $startDate, $endDate, $limit, $offset, $sort); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetSmsCampaigns', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getSmsCampaignsAsync + * + * Returns the information for all your created SMS campaigns + * + * @param string $status Status of campaign. (optional) + * @param string $startDate Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param string $endDate Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param int $limit Number limitation for the result returned (optional, default to 500) + * @param int $offset Beginning point in the list to retrieve from. (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getSmsCampaignsAsync($status = null, $startDate = null, $endDate = null, $limit = '500', $offset = '0', $sort = 'desc') + { + return $this->getSmsCampaignsAsyncWithHttpInfo($status, $startDate, $endDate, $limit, $offset, $sort) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getSmsCampaignsAsyncWithHttpInfo + * + * Returns the information for all your created SMS campaigns + * + * @param string $status Status of campaign. (optional) + * @param string $startDate Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param string $endDate Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param int $limit Number limitation for the result returned (optional, default to 500) + * @param int $offset Beginning point in the list to retrieve from. (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getSmsCampaignsAsyncWithHttpInfo($status = null, $startDate = null, $endDate = null, $limit = '500', $offset = '0', $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetSmsCampaigns'; + $request = $this->getSmsCampaignsRequest($status, $startDate, $endDate, $limit, $offset, $sort); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getSmsCampaigns' + * + * @param string $status Status of campaign. (optional) + * @param string $startDate Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param string $endDate Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param int $limit Number limitation for the result returned (optional, default to 500) + * @param int $offset Beginning point in the list to retrieve from. (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getSmsCampaignsRequest($status = null, $startDate = null, $endDate = null, $limit = '500', $offset = '0', $sort = 'desc') + { + if ($limit !== null && $limit > 1000) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling SMSCampaignsApi.getSmsCampaigns, must be smaller than or equal to 1000.'); + } + if ($limit !== null && $limit < 0) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling SMSCampaignsApi.getSmsCampaigns, must be bigger than or equal to 0.'); + } + + + $resourcePath = '/smsCampaigns'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($status !== null) { + $queryParams['status'] = ObjectSerializer::toQueryValue($status); + } + // query params + if ($startDate !== null) { + $queryParams['startDate'] = ObjectSerializer::toQueryValue($startDate); + } + // query params + if ($endDate !== null) { + $queryParams['endDate'] = ObjectSerializer::toQueryValue($endDate); + } + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation requestSmsRecipientExport + * + * Export an SMS campaign's recipients + * + * @param int $campaignId id of the campaign (required) + * @param \Brevo\Client\Model\RequestSmsRecipientExport $recipientExport Values to send for a recipient export request (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\CreatedProcessId + */ + public function requestSmsRecipientExport($campaignId, $recipientExport = null) + { + list($response) = $this->requestSmsRecipientExportWithHttpInfo($campaignId, $recipientExport); + return $response; + } + + /** + * Operation requestSmsRecipientExportWithHttpInfo + * + * Export an SMS campaign's recipients + * + * @param int $campaignId id of the campaign (required) + * @param \Brevo\Client\Model\RequestSmsRecipientExport $recipientExport Values to send for a recipient export request (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\CreatedProcessId, HTTP status code, HTTP response headers (array of strings) + */ + public function requestSmsRecipientExportWithHttpInfo($campaignId, $recipientExport = null) + { + $returnType = '\Brevo\Client\Model\CreatedProcessId'; + $request = $this->requestSmsRecipientExportRequest($campaignId, $recipientExport); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 202: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\CreatedProcessId', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation requestSmsRecipientExportAsync + * + * Export an SMS campaign's recipients + * + * @param int $campaignId id of the campaign (required) + * @param \Brevo\Client\Model\RequestSmsRecipientExport $recipientExport Values to send for a recipient export request (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function requestSmsRecipientExportAsync($campaignId, $recipientExport = null) + { + return $this->requestSmsRecipientExportAsyncWithHttpInfo($campaignId, $recipientExport) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation requestSmsRecipientExportAsyncWithHttpInfo + * + * Export an SMS campaign's recipients + * + * @param int $campaignId id of the campaign (required) + * @param \Brevo\Client\Model\RequestSmsRecipientExport $recipientExport Values to send for a recipient export request (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function requestSmsRecipientExportAsyncWithHttpInfo($campaignId, $recipientExport = null) + { + $returnType = '\Brevo\Client\Model\CreatedProcessId'; + $request = $this->requestSmsRecipientExportRequest($campaignId, $recipientExport); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'requestSmsRecipientExport' + * + * @param int $campaignId id of the campaign (required) + * @param \Brevo\Client\Model\RequestSmsRecipientExport $recipientExport Values to send for a recipient export request (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function requestSmsRecipientExportRequest($campaignId, $recipientExport = null) + { + // verify the required parameter 'campaignId' is set + if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $campaignId when calling requestSmsRecipientExport' + ); + } + + $resourcePath = '/smsCampaigns/{campaignId}/exportRecipients'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($campaignId !== null) { + $resourcePath = str_replace( + '{' . 'campaignId' . '}', + ObjectSerializer::toPathValue($campaignId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($recipientExport)) { + $_tempBody = $recipientExport; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation sendSmsCampaignNow + * + * Send your SMS campaign immediately + * + * @param int $campaignId id of the campaign (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function sendSmsCampaignNow($campaignId) + { + $this->sendSmsCampaignNowWithHttpInfo($campaignId); + } + + /** + * Operation sendSmsCampaignNowWithHttpInfo + * + * Send your SMS campaign immediately + * + * @param int $campaignId id of the campaign (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function sendSmsCampaignNowWithHttpInfo($campaignId) + { + $returnType = ''; + $request = $this->sendSmsCampaignNowRequest($campaignId); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 402: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation sendSmsCampaignNowAsync + * + * Send your SMS campaign immediately + * + * @param int $campaignId id of the campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function sendSmsCampaignNowAsync($campaignId) + { + return $this->sendSmsCampaignNowAsyncWithHttpInfo($campaignId) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation sendSmsCampaignNowAsyncWithHttpInfo + * + * Send your SMS campaign immediately + * + * @param int $campaignId id of the campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function sendSmsCampaignNowAsyncWithHttpInfo($campaignId) + { + $returnType = ''; + $request = $this->sendSmsCampaignNowRequest($campaignId); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'sendSmsCampaignNow' + * + * @param int $campaignId id of the campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function sendSmsCampaignNowRequest($campaignId) + { + // verify the required parameter 'campaignId' is set + if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $campaignId when calling sendSmsCampaignNow' + ); + } + + $resourcePath = '/smsCampaigns/{campaignId}/sendNow'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($campaignId !== null) { + $resourcePath = str_replace( + '{' . 'campaignId' . '}', + ObjectSerializer::toPathValue($campaignId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation sendSmsReport + * + * Send an SMS campaign's report + * + * @param int $campaignId id of the campaign (required) + * @param \Brevo\Client\Model\SendReport $sendReport Values for send a report (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function sendSmsReport($campaignId, $sendReport) + { + $this->sendSmsReportWithHttpInfo($campaignId, $sendReport); + } + + /** + * Operation sendSmsReportWithHttpInfo + * + * Send an SMS campaign's report + * + * @param int $campaignId id of the campaign (required) + * @param \Brevo\Client\Model\SendReport $sendReport Values for send a report (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function sendSmsReportWithHttpInfo($campaignId, $sendReport) + { + $returnType = ''; + $request = $this->sendSmsReportRequest($campaignId, $sendReport); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation sendSmsReportAsync + * + * Send an SMS campaign's report + * + * @param int $campaignId id of the campaign (required) + * @param \Brevo\Client\Model\SendReport $sendReport Values for send a report (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function sendSmsReportAsync($campaignId, $sendReport) + { + return $this->sendSmsReportAsyncWithHttpInfo($campaignId, $sendReport) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation sendSmsReportAsyncWithHttpInfo + * + * Send an SMS campaign's report + * + * @param int $campaignId id of the campaign (required) + * @param \Brevo\Client\Model\SendReport $sendReport Values for send a report (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function sendSmsReportAsyncWithHttpInfo($campaignId, $sendReport) + { + $returnType = ''; + $request = $this->sendSmsReportRequest($campaignId, $sendReport); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'sendSmsReport' + * + * @param int $campaignId id of the campaign (required) + * @param \Brevo\Client\Model\SendReport $sendReport Values for send a report (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function sendSmsReportRequest($campaignId, $sendReport) + { + // verify the required parameter 'campaignId' is set + if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $campaignId when calling sendSmsReport' + ); + } + // verify the required parameter 'sendReport' is set + if ($sendReport === null || (is_array($sendReport) && count($sendReport) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $sendReport when calling sendSmsReport' + ); + } + + $resourcePath = '/smsCampaigns/{campaignId}/sendReport'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($campaignId !== null) { + $resourcePath = str_replace( + '{' . 'campaignId' . '}', + ObjectSerializer::toPathValue($campaignId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($sendReport)) { + $_tempBody = $sendReport; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation sendTestSms + * + * Send a test SMS campaign + * + * @param int $campaignId Id of the SMS campaign (required) + * @param \Brevo\Client\Model\SendTestSms $phoneNumber Mobile number of the recipient with the country code. This number must belong to one of your contacts in Brevo account and must not be blacklisted (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function sendTestSms($campaignId, $phoneNumber) + { + $this->sendTestSmsWithHttpInfo($campaignId, $phoneNumber); + } + + /** + * Operation sendTestSmsWithHttpInfo + * + * Send a test SMS campaign + * + * @param int $campaignId Id of the SMS campaign (required) + * @param \Brevo\Client\Model\SendTestSms $phoneNumber Mobile number of the recipient with the country code. This number must belong to one of your contacts in Brevo account and must not be blacklisted (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function sendTestSmsWithHttpInfo($campaignId, $phoneNumber) + { + $returnType = ''; + $request = $this->sendTestSmsRequest($campaignId, $phoneNumber); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\PostSendSmsTestFailed', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation sendTestSmsAsync + * + * Send a test SMS campaign + * + * @param int $campaignId Id of the SMS campaign (required) + * @param \Brevo\Client\Model\SendTestSms $phoneNumber Mobile number of the recipient with the country code. This number must belong to one of your contacts in Brevo account and must not be blacklisted (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function sendTestSmsAsync($campaignId, $phoneNumber) + { + return $this->sendTestSmsAsyncWithHttpInfo($campaignId, $phoneNumber) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation sendTestSmsAsyncWithHttpInfo + * + * Send a test SMS campaign + * + * @param int $campaignId Id of the SMS campaign (required) + * @param \Brevo\Client\Model\SendTestSms $phoneNumber Mobile number of the recipient with the country code. This number must belong to one of your contacts in Brevo account and must not be blacklisted (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function sendTestSmsAsyncWithHttpInfo($campaignId, $phoneNumber) + { + $returnType = ''; + $request = $this->sendTestSmsRequest($campaignId, $phoneNumber); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'sendTestSms' + * + * @param int $campaignId Id of the SMS campaign (required) + * @param \Brevo\Client\Model\SendTestSms $phoneNumber Mobile number of the recipient with the country code. This number must belong to one of your contacts in Brevo account and must not be blacklisted (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function sendTestSmsRequest($campaignId, $phoneNumber) + { + // verify the required parameter 'campaignId' is set + if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $campaignId when calling sendTestSms' + ); + } + // verify the required parameter 'phoneNumber' is set + if ($phoneNumber === null || (is_array($phoneNumber) && count($phoneNumber) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $phoneNumber when calling sendTestSms' + ); + } + + $resourcePath = '/smsCampaigns/{campaignId}/sendTest'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($campaignId !== null) { + $resourcePath = str_replace( + '{' . 'campaignId' . '}', + ObjectSerializer::toPathValue($campaignId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($phoneNumber)) { + $_tempBody = $phoneNumber; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation updateSmsCampaign + * + * Update an SMS campaign + * + * @param int $campaignId id of the SMS campaign (required) + * @param \Brevo\Client\Model\UpdateSmsCampaign $updateSmsCampaign Values to update an SMS Campaign (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function updateSmsCampaign($campaignId, $updateSmsCampaign) + { + $this->updateSmsCampaignWithHttpInfo($campaignId, $updateSmsCampaign); + } + + /** + * Operation updateSmsCampaignWithHttpInfo + * + * Update an SMS campaign + * + * @param int $campaignId id of the SMS campaign (required) + * @param \Brevo\Client\Model\UpdateSmsCampaign $updateSmsCampaign Values to update an SMS Campaign (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function updateSmsCampaignWithHttpInfo($campaignId, $updateSmsCampaign) + { + $returnType = ''; + $request = $this->updateSmsCampaignRequest($campaignId, $updateSmsCampaign); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation updateSmsCampaignAsync + * + * Update an SMS campaign + * + * @param int $campaignId id of the SMS campaign (required) + * @param \Brevo\Client\Model\UpdateSmsCampaign $updateSmsCampaign Values to update an SMS Campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateSmsCampaignAsync($campaignId, $updateSmsCampaign) + { + return $this->updateSmsCampaignAsyncWithHttpInfo($campaignId, $updateSmsCampaign) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateSmsCampaignAsyncWithHttpInfo + * + * Update an SMS campaign + * + * @param int $campaignId id of the SMS campaign (required) + * @param \Brevo\Client\Model\UpdateSmsCampaign $updateSmsCampaign Values to update an SMS Campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateSmsCampaignAsyncWithHttpInfo($campaignId, $updateSmsCampaign) + { + $returnType = ''; + $request = $this->updateSmsCampaignRequest($campaignId, $updateSmsCampaign); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'updateSmsCampaign' + * + * @param int $campaignId id of the SMS campaign (required) + * @param \Brevo\Client\Model\UpdateSmsCampaign $updateSmsCampaign Values to update an SMS Campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function updateSmsCampaignRequest($campaignId, $updateSmsCampaign) + { + // verify the required parameter 'campaignId' is set + if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $campaignId when calling updateSmsCampaign' + ); + } + // verify the required parameter 'updateSmsCampaign' is set + if ($updateSmsCampaign === null || (is_array($updateSmsCampaign) && count($updateSmsCampaign) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $updateSmsCampaign when calling updateSmsCampaign' + ); + } + + $resourcePath = '/smsCampaigns/{campaignId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($campaignId !== null) { + $resourcePath = str_replace( + '{' . 'campaignId' . '}', + ObjectSerializer::toPathValue($campaignId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($updateSmsCampaign)) { + $_tempBody = $updateSmsCampaign; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation updateSmsCampaignStatus + * + * Update a campaign's status + * + * @param int $campaignId id of the campaign (required) + * @param \Brevo\Client\Model\UpdateCampaignStatus $status Status of the campaign. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function updateSmsCampaignStatus($campaignId, $status) + { + $this->updateSmsCampaignStatusWithHttpInfo($campaignId, $status); + } + + /** + * Operation updateSmsCampaignStatusWithHttpInfo + * + * Update a campaign's status + * + * @param int $campaignId id of the campaign (required) + * @param \Brevo\Client\Model\UpdateCampaignStatus $status Status of the campaign. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function updateSmsCampaignStatusWithHttpInfo($campaignId, $status) + { + $returnType = ''; + $request = $this->updateSmsCampaignStatusRequest($campaignId, $status); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation updateSmsCampaignStatusAsync + * + * Update a campaign's status + * + * @param int $campaignId id of the campaign (required) + * @param \Brevo\Client\Model\UpdateCampaignStatus $status Status of the campaign. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateSmsCampaignStatusAsync($campaignId, $status) + { + return $this->updateSmsCampaignStatusAsyncWithHttpInfo($campaignId, $status) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateSmsCampaignStatusAsyncWithHttpInfo + * + * Update a campaign's status + * + * @param int $campaignId id of the campaign (required) + * @param \Brevo\Client\Model\UpdateCampaignStatus $status Status of the campaign. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateSmsCampaignStatusAsyncWithHttpInfo($campaignId, $status) + { + $returnType = ''; + $request = $this->updateSmsCampaignStatusRequest($campaignId, $status); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'updateSmsCampaignStatus' + * + * @param int $campaignId id of the campaign (required) + * @param \Brevo\Client\Model\UpdateCampaignStatus $status Status of the campaign. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function updateSmsCampaignStatusRequest($campaignId, $status) + { + // verify the required parameter 'campaignId' is set + if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $campaignId when calling updateSmsCampaignStatus' + ); + } + // verify the required parameter 'status' is set + if ($status === null || (is_array($status) && count($status) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $status when calling updateSmsCampaignStatus' + ); + } + + $resourcePath = '/smsCampaigns/{campaignId}/status'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($campaignId !== null) { + $resourcePath = str_replace( + '{' . 'campaignId' . '}', + ObjectSerializer::toPathValue($campaignId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($status)) { + $_tempBody = $status; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/vendor/getbrevo/brevo-php/lib/Api/SendersApi.php b/vendor/getbrevo/brevo-php/lib/Api/SendersApi.php new file mode 100644 index 0000000..8da7a97 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Api/SendersApi.php @@ -0,0 +1,2015 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation createSender + * + * Create a new sender + * + * @param \Brevo\Client\Model\CreateSender $sender sender's name (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\CreateSenderModel + */ + public function createSender($sender = null) + { + list($response) = $this->createSenderWithHttpInfo($sender); + return $response; + } + + /** + * Operation createSenderWithHttpInfo + * + * Create a new sender + * + * @param \Brevo\Client\Model\CreateSender $sender sender's name (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\CreateSenderModel, HTTP status code, HTTP response headers (array of strings) + */ + public function createSenderWithHttpInfo($sender = null) + { + $returnType = '\Brevo\Client\Model\CreateSenderModel'; + $request = $this->createSenderRequest($sender); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\CreateSenderModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation createSenderAsync + * + * Create a new sender + * + * @param \Brevo\Client\Model\CreateSender $sender sender's name (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createSenderAsync($sender = null) + { + return $this->createSenderAsyncWithHttpInfo($sender) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createSenderAsyncWithHttpInfo + * + * Create a new sender + * + * @param \Brevo\Client\Model\CreateSender $sender sender's name (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createSenderAsyncWithHttpInfo($sender = null) + { + $returnType = '\Brevo\Client\Model\CreateSenderModel'; + $request = $this->createSenderRequest($sender); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createSender' + * + * @param \Brevo\Client\Model\CreateSender $sender sender's name (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function createSenderRequest($sender = null) + { + + $resourcePath = '/senders'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($sender)) { + $_tempBody = $sender; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation deleteSender + * + * Delete a sender + * + * @param int $senderId Id of the sender (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function deleteSender($senderId) + { + $this->deleteSenderWithHttpInfo($senderId); + } + + /** + * Operation deleteSenderWithHttpInfo + * + * Delete a sender + * + * @param int $senderId Id of the sender (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteSenderWithHttpInfo($senderId) + { + $returnType = ''; + $request = $this->deleteSenderRequest($senderId); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation deleteSenderAsync + * + * Delete a sender + * + * @param int $senderId Id of the sender (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteSenderAsync($senderId) + { + return $this->deleteSenderAsyncWithHttpInfo($senderId) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteSenderAsyncWithHttpInfo + * + * Delete a sender + * + * @param int $senderId Id of the sender (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteSenderAsyncWithHttpInfo($senderId) + { + $returnType = ''; + $request = $this->deleteSenderRequest($senderId); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'deleteSender' + * + * @param int $senderId Id of the sender (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function deleteSenderRequest($senderId) + { + // verify the required parameter 'senderId' is set + if ($senderId === null || (is_array($senderId) && count($senderId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $senderId when calling deleteSender' + ); + } + + $resourcePath = '/senders/{senderId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($senderId !== null) { + $resourcePath = str_replace( + '{' . 'senderId' . '}', + ObjectSerializer::toPathValue($senderId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getIps + * + * Get all the dedicated IPs for your account + * + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetIps + */ + public function getIps() + { + list($response) = $this->getIpsWithHttpInfo(); + return $response; + } + + /** + * Operation getIpsWithHttpInfo + * + * Get all the dedicated IPs for your account + * + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetIps, HTTP status code, HTTP response headers (array of strings) + */ + public function getIpsWithHttpInfo() + { + $returnType = '\Brevo\Client\Model\GetIps'; + $request = $this->getIpsRequest(); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetIps', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getIpsAsync + * + * Get all the dedicated IPs for your account + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getIpsAsync() + { + return $this->getIpsAsyncWithHttpInfo() + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getIpsAsyncWithHttpInfo + * + * Get all the dedicated IPs for your account + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getIpsAsyncWithHttpInfo() + { + $returnType = '\Brevo\Client\Model\GetIps'; + $request = $this->getIpsRequest(); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getIps' + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getIpsRequest() + { + + $resourcePath = '/senders/ips'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getIpsFromSender + * + * Get all the dedicated IPs for a sender + * + * @param int $senderId Id of the sender (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetIpsFromSender + */ + public function getIpsFromSender($senderId) + { + list($response) = $this->getIpsFromSenderWithHttpInfo($senderId); + return $response; + } + + /** + * Operation getIpsFromSenderWithHttpInfo + * + * Get all the dedicated IPs for a sender + * + * @param int $senderId Id of the sender (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetIpsFromSender, HTTP status code, HTTP response headers (array of strings) + */ + public function getIpsFromSenderWithHttpInfo($senderId) + { + $returnType = '\Brevo\Client\Model\GetIpsFromSender'; + $request = $this->getIpsFromSenderRequest($senderId); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetIpsFromSender', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getIpsFromSenderAsync + * + * Get all the dedicated IPs for a sender + * + * @param int $senderId Id of the sender (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getIpsFromSenderAsync($senderId) + { + return $this->getIpsFromSenderAsyncWithHttpInfo($senderId) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getIpsFromSenderAsyncWithHttpInfo + * + * Get all the dedicated IPs for a sender + * + * @param int $senderId Id of the sender (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getIpsFromSenderAsyncWithHttpInfo($senderId) + { + $returnType = '\Brevo\Client\Model\GetIpsFromSender'; + $request = $this->getIpsFromSenderRequest($senderId); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getIpsFromSender' + * + * @param int $senderId Id of the sender (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getIpsFromSenderRequest($senderId) + { + // verify the required parameter 'senderId' is set + if ($senderId === null || (is_array($senderId) && count($senderId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $senderId when calling getIpsFromSender' + ); + } + + $resourcePath = '/senders/{senderId}/ips'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($senderId !== null) { + $resourcePath = str_replace( + '{' . 'senderId' . '}', + ObjectSerializer::toPathValue($senderId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getSenders + * + * Get the list of all your senders + * + * @param string $ip Filter your senders for a specific ip (available for dedicated IP usage only) (optional) + * @param string $domain Filter your senders for a specific domain (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetSendersList + */ + public function getSenders($ip = null, $domain = null) + { + list($response) = $this->getSendersWithHttpInfo($ip, $domain); + return $response; + } + + /** + * Operation getSendersWithHttpInfo + * + * Get the list of all your senders + * + * @param string $ip Filter your senders for a specific ip (available for dedicated IP usage only) (optional) + * @param string $domain Filter your senders for a specific domain (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetSendersList, HTTP status code, HTTP response headers (array of strings) + */ + public function getSendersWithHttpInfo($ip = null, $domain = null) + { + $returnType = '\Brevo\Client\Model\GetSendersList'; + $request = $this->getSendersRequest($ip, $domain); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetSendersList', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getSendersAsync + * + * Get the list of all your senders + * + * @param string $ip Filter your senders for a specific ip (available for dedicated IP usage only) (optional) + * @param string $domain Filter your senders for a specific domain (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getSendersAsync($ip = null, $domain = null) + { + return $this->getSendersAsyncWithHttpInfo($ip, $domain) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getSendersAsyncWithHttpInfo + * + * Get the list of all your senders + * + * @param string $ip Filter your senders for a specific ip (available for dedicated IP usage only) (optional) + * @param string $domain Filter your senders for a specific domain (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getSendersAsyncWithHttpInfo($ip = null, $domain = null) + { + $returnType = '\Brevo\Client\Model\GetSendersList'; + $request = $this->getSendersRequest($ip, $domain); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getSenders' + * + * @param string $ip Filter your senders for a specific ip (available for dedicated IP usage only) (optional) + * @param string $domain Filter your senders for a specific domain (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getSendersRequest($ip = null, $domain = null) + { + + $resourcePath = '/senders'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($ip !== null) { + $queryParams['ip'] = ObjectSerializer::toQueryValue($ip); + } + // query params + if ($domain !== null) { + $queryParams['domain'] = ObjectSerializer::toQueryValue($domain); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation updateSender + * + * Update a sender + * + * @param int $senderId Id of the sender (required) + * @param \Brevo\Client\Model\UpdateSender $sender sender's name (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function updateSender($senderId, $sender = null) + { + $this->updateSenderWithHttpInfo($senderId, $sender); + } + + /** + * Operation updateSenderWithHttpInfo + * + * Update a sender + * + * @param int $senderId Id of the sender (required) + * @param \Brevo\Client\Model\UpdateSender $sender sender's name (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function updateSenderWithHttpInfo($senderId, $sender = null) + { + $returnType = ''; + $request = $this->updateSenderRequest($senderId, $sender); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation updateSenderAsync + * + * Update a sender + * + * @param int $senderId Id of the sender (required) + * @param \Brevo\Client\Model\UpdateSender $sender sender's name (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateSenderAsync($senderId, $sender = null) + { + return $this->updateSenderAsyncWithHttpInfo($senderId, $sender) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateSenderAsyncWithHttpInfo + * + * Update a sender + * + * @param int $senderId Id of the sender (required) + * @param \Brevo\Client\Model\UpdateSender $sender sender's name (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateSenderAsyncWithHttpInfo($senderId, $sender = null) + { + $returnType = ''; + $request = $this->updateSenderRequest($senderId, $sender); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'updateSender' + * + * @param int $senderId Id of the sender (required) + * @param \Brevo\Client\Model\UpdateSender $sender sender's name (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function updateSenderRequest($senderId, $sender = null) + { + // verify the required parameter 'senderId' is set + if ($senderId === null || (is_array($senderId) && count($senderId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $senderId when calling updateSender' + ); + } + + $resourcePath = '/senders/{senderId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($senderId !== null) { + $resourcePath = str_replace( + '{' . 'senderId' . '}', + ObjectSerializer::toPathValue($senderId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($sender)) { + $_tempBody = $sender; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation validateSenderByOTP + * + * Update a sender + * + * @param int $senderId Id of the sender (required) + * @param \Brevo\Client\Model\Otp $otp otp (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function validateSenderByOTP($senderId, $otp = null) + { + $this->validateSenderByOTPWithHttpInfo($senderId, $otp); + } + + /** + * Operation validateSenderByOTPWithHttpInfo + * + * Update a sender + * + * @param int $senderId Id of the sender (required) + * @param \Brevo\Client\Model\Otp $otp otp (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function validateSenderByOTPWithHttpInfo($senderId, $otp = null) + { + $returnType = ''; + $request = $this->validateSenderByOTPRequest($senderId, $otp); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation validateSenderByOTPAsync + * + * Update a sender + * + * @param int $senderId Id of the sender (required) + * @param \Brevo\Client\Model\Otp $otp otp (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function validateSenderByOTPAsync($senderId, $otp = null) + { + return $this->validateSenderByOTPAsyncWithHttpInfo($senderId, $otp) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation validateSenderByOTPAsyncWithHttpInfo + * + * Update a sender + * + * @param int $senderId Id of the sender (required) + * @param \Brevo\Client\Model\Otp $otp otp (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function validateSenderByOTPAsyncWithHttpInfo($senderId, $otp = null) + { + $returnType = ''; + $request = $this->validateSenderByOTPRequest($senderId, $otp); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'validateSenderByOTP' + * + * @param int $senderId Id of the sender (required) + * @param \Brevo\Client\Model\Otp $otp otp (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function validateSenderByOTPRequest($senderId, $otp = null) + { + // verify the required parameter 'senderId' is set + if ($senderId === null || (is_array($senderId) && count($senderId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $senderId when calling validateSenderByOTP' + ); + } + + $resourcePath = '/senders/{senderId}/validate'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($senderId !== null) { + $resourcePath = str_replace( + '{' . 'senderId' . '}', + ObjectSerializer::toPathValue($senderId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($otp)) { + $_tempBody = $otp; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/vendor/getbrevo/brevo-php/lib/Api/TasksApi.php b/vendor/getbrevo/brevo-php/lib/Api/TasksApi.php new file mode 100644 index 0000000..259ce0f --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Api/TasksApi.php @@ -0,0 +1,1852 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation crmTasksGet + * + * Get all tasks + * + * @param string $filterType Filter by task type (ID) (optional) + * @param string $filterStatus Filter by task status (optional) + * @param string $filterDate Filter by date (optional) + * @param string $filterAssignTo Filter by assignTo id (optional) + * @param string $filterContacts Filter by contact ids (optional) + * @param string $filterDeals Filter by deals ids (optional) + * @param string $filterCompanies Filter by companies ids (optional) + * @param int $dateFrom dateFrom to date range filter type (timestamp in milliseconds) (optional) + * @param int $dateTo dateTo to date range filter type (timestamp in milliseconds) (optional) + * @param int $offset Index of the first document of the page (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) + * @param string $sortBy The field used to sort field names. (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\TaskList + */ + public function crmTasksGet($filterType = null, $filterStatus = null, $filterDate = null, $filterAssignTo = null, $filterContacts = null, $filterDeals = null, $filterCompanies = null, $dateFrom = null, $dateTo = null, $offset = null, $limit = '50', $sort = null, $sortBy = null) + { + list($response) = $this->crmTasksGetWithHttpInfo($filterType, $filterStatus, $filterDate, $filterAssignTo, $filterContacts, $filterDeals, $filterCompanies, $dateFrom, $dateTo, $offset, $limit, $sort, $sortBy); + return $response; + } + + /** + * Operation crmTasksGetWithHttpInfo + * + * Get all tasks + * + * @param string $filterType Filter by task type (ID) (optional) + * @param string $filterStatus Filter by task status (optional) + * @param string $filterDate Filter by date (optional) + * @param string $filterAssignTo Filter by assignTo id (optional) + * @param string $filterContacts Filter by contact ids (optional) + * @param string $filterDeals Filter by deals ids (optional) + * @param string $filterCompanies Filter by companies ids (optional) + * @param int $dateFrom dateFrom to date range filter type (timestamp in milliseconds) (optional) + * @param int $dateTo dateTo to date range filter type (timestamp in milliseconds) (optional) + * @param int $offset Index of the first document of the page (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) + * @param string $sortBy The field used to sort field names. (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\TaskList, HTTP status code, HTTP response headers (array of strings) + */ + public function crmTasksGetWithHttpInfo($filterType = null, $filterStatus = null, $filterDate = null, $filterAssignTo = null, $filterContacts = null, $filterDeals = null, $filterCompanies = null, $dateFrom = null, $dateTo = null, $offset = null, $limit = '50', $sort = null, $sortBy = null) + { + $returnType = '\Brevo\Client\Model\TaskList'; + $request = $this->crmTasksGetRequest($filterType, $filterStatus, $filterDate, $filterAssignTo, $filterContacts, $filterDeals, $filterCompanies, $dateFrom, $dateTo, $offset, $limit, $sort, $sortBy); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\TaskList', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation crmTasksGetAsync + * + * Get all tasks + * + * @param string $filterType Filter by task type (ID) (optional) + * @param string $filterStatus Filter by task status (optional) + * @param string $filterDate Filter by date (optional) + * @param string $filterAssignTo Filter by assignTo id (optional) + * @param string $filterContacts Filter by contact ids (optional) + * @param string $filterDeals Filter by deals ids (optional) + * @param string $filterCompanies Filter by companies ids (optional) + * @param int $dateFrom dateFrom to date range filter type (timestamp in milliseconds) (optional) + * @param int $dateTo dateTo to date range filter type (timestamp in milliseconds) (optional) + * @param int $offset Index of the first document of the page (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) + * @param string $sortBy The field used to sort field names. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmTasksGetAsync($filterType = null, $filterStatus = null, $filterDate = null, $filterAssignTo = null, $filterContacts = null, $filterDeals = null, $filterCompanies = null, $dateFrom = null, $dateTo = null, $offset = null, $limit = '50', $sort = null, $sortBy = null) + { + return $this->crmTasksGetAsyncWithHttpInfo($filterType, $filterStatus, $filterDate, $filterAssignTo, $filterContacts, $filterDeals, $filterCompanies, $dateFrom, $dateTo, $offset, $limit, $sort, $sortBy) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation crmTasksGetAsyncWithHttpInfo + * + * Get all tasks + * + * @param string $filterType Filter by task type (ID) (optional) + * @param string $filterStatus Filter by task status (optional) + * @param string $filterDate Filter by date (optional) + * @param string $filterAssignTo Filter by assignTo id (optional) + * @param string $filterContacts Filter by contact ids (optional) + * @param string $filterDeals Filter by deals ids (optional) + * @param string $filterCompanies Filter by companies ids (optional) + * @param int $dateFrom dateFrom to date range filter type (timestamp in milliseconds) (optional) + * @param int $dateTo dateTo to date range filter type (timestamp in milliseconds) (optional) + * @param int $offset Index of the first document of the page (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) + * @param string $sortBy The field used to sort field names. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmTasksGetAsyncWithHttpInfo($filterType = null, $filterStatus = null, $filterDate = null, $filterAssignTo = null, $filterContacts = null, $filterDeals = null, $filterCompanies = null, $dateFrom = null, $dateTo = null, $offset = null, $limit = '50', $sort = null, $sortBy = null) + { + $returnType = '\Brevo\Client\Model\TaskList'; + $request = $this->crmTasksGetRequest($filterType, $filterStatus, $filterDate, $filterAssignTo, $filterContacts, $filterDeals, $filterCompanies, $dateFrom, $dateTo, $offset, $limit, $sort, $sortBy); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'crmTasksGet' + * + * @param string $filterType Filter by task type (ID) (optional) + * @param string $filterStatus Filter by task status (optional) + * @param string $filterDate Filter by date (optional) + * @param string $filterAssignTo Filter by assignTo id (optional) + * @param string $filterContacts Filter by contact ids (optional) + * @param string $filterDeals Filter by deals ids (optional) + * @param string $filterCompanies Filter by companies ids (optional) + * @param int $dateFrom dateFrom to date range filter type (timestamp in milliseconds) (optional) + * @param int $dateTo dateTo to date range filter type (timestamp in milliseconds) (optional) + * @param int $offset Index of the first document of the page (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) + * @param string $sortBy The field used to sort field names. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function crmTasksGetRequest($filterType = null, $filterStatus = null, $filterDate = null, $filterAssignTo = null, $filterContacts = null, $filterDeals = null, $filterCompanies = null, $dateFrom = null, $dateTo = null, $offset = null, $limit = '50', $sort = null, $sortBy = null) + { + + $resourcePath = '/crm/tasks'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($filterType !== null) { + $queryParams['filter[type]'] = ObjectSerializer::toQueryValue($filterType); + } + // query params + if ($filterStatus !== null) { + $queryParams['filter[status]'] = ObjectSerializer::toQueryValue($filterStatus); + } + // query params + if ($filterDate !== null) { + $queryParams['filter[date]'] = ObjectSerializer::toQueryValue($filterDate); + } + // query params + if ($filterAssignTo !== null) { + $queryParams['filter[assignTo]'] = ObjectSerializer::toQueryValue($filterAssignTo); + } + // query params + if ($filterContacts !== null) { + $queryParams['filter[contacts]'] = ObjectSerializer::toQueryValue($filterContacts); + } + // query params + if ($filterDeals !== null) { + $queryParams['filter[deals]'] = ObjectSerializer::toQueryValue($filterDeals); + } + // query params + if ($filterCompanies !== null) { + $queryParams['filter[companies]'] = ObjectSerializer::toQueryValue($filterCompanies); + } + // query params + if ($dateFrom !== null) { + $queryParams['dateFrom'] = ObjectSerializer::toQueryValue($dateFrom); + } + // query params + if ($dateTo !== null) { + $queryParams['dateTo'] = ObjectSerializer::toQueryValue($dateTo); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); + } + // query params + if ($sortBy !== null) { + $queryParams['sortBy'] = ObjectSerializer::toQueryValue($sortBy); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation crmTasksIdDelete + * + * Delete a task + * + * @param string $id id (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function crmTasksIdDelete($id) + { + $this->crmTasksIdDeleteWithHttpInfo($id); + } + + /** + * Operation crmTasksIdDeleteWithHttpInfo + * + * Delete a task + * + * @param string $id (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function crmTasksIdDeleteWithHttpInfo($id) + { + $returnType = ''; + $request = $this->crmTasksIdDeleteRequest($id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation crmTasksIdDeleteAsync + * + * Delete a task + * + * @param string $id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmTasksIdDeleteAsync($id) + { + return $this->crmTasksIdDeleteAsyncWithHttpInfo($id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation crmTasksIdDeleteAsyncWithHttpInfo + * + * Delete a task + * + * @param string $id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmTasksIdDeleteAsyncWithHttpInfo($id) + { + $returnType = ''; + $request = $this->crmTasksIdDeleteRequest($id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'crmTasksIdDelete' + * + * @param string $id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function crmTasksIdDeleteRequest($id) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling crmTasksIdDelete' + ); + } + + $resourcePath = '/crm/tasks/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation crmTasksIdGet + * + * Get a task + * + * @param string $id id (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\Task + */ + public function crmTasksIdGet($id) + { + list($response) = $this->crmTasksIdGetWithHttpInfo($id); + return $response; + } + + /** + * Operation crmTasksIdGetWithHttpInfo + * + * Get a task + * + * @param string $id (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\Task, HTTP status code, HTTP response headers (array of strings) + */ + public function crmTasksIdGetWithHttpInfo($id) + { + $returnType = '\Brevo\Client\Model\Task'; + $request = $this->crmTasksIdGetRequest($id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\Task', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation crmTasksIdGetAsync + * + * Get a task + * + * @param string $id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmTasksIdGetAsync($id) + { + return $this->crmTasksIdGetAsyncWithHttpInfo($id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation crmTasksIdGetAsyncWithHttpInfo + * + * Get a task + * + * @param string $id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmTasksIdGetAsyncWithHttpInfo($id) + { + $returnType = '\Brevo\Client\Model\Task'; + $request = $this->crmTasksIdGetRequest($id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'crmTasksIdGet' + * + * @param string $id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function crmTasksIdGetRequest($id) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling crmTasksIdGet' + ); + } + + $resourcePath = '/crm/tasks/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation crmTasksIdPatch + * + * Update a task + * + * @param string $id id (required) + * @param \Brevo\Client\Model\Body9 $body Updated task details. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function crmTasksIdPatch($id, $body) + { + $this->crmTasksIdPatchWithHttpInfo($id, $body); + } + + /** + * Operation crmTasksIdPatchWithHttpInfo + * + * Update a task + * + * @param string $id (required) + * @param \Brevo\Client\Model\Body9 $body Updated task details. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function crmTasksIdPatchWithHttpInfo($id, $body) + { + $returnType = ''; + $request = $this->crmTasksIdPatchRequest($id, $body); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation crmTasksIdPatchAsync + * + * Update a task + * + * @param string $id (required) + * @param \Brevo\Client\Model\Body9 $body Updated task details. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmTasksIdPatchAsync($id, $body) + { + return $this->crmTasksIdPatchAsyncWithHttpInfo($id, $body) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation crmTasksIdPatchAsyncWithHttpInfo + * + * Update a task + * + * @param string $id (required) + * @param \Brevo\Client\Model\Body9 $body Updated task details. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmTasksIdPatchAsyncWithHttpInfo($id, $body) + { + $returnType = ''; + $request = $this->crmTasksIdPatchRequest($id, $body); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'crmTasksIdPatch' + * + * @param string $id (required) + * @param \Brevo\Client\Model\Body9 $body Updated task details. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function crmTasksIdPatchRequest($id, $body) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling crmTasksIdPatch' + ); + } + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $body when calling crmTasksIdPatch' + ); + } + + $resourcePath = '/crm/tasks/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PATCH', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation crmTasksPost + * + * Create a task + * + * @param \Brevo\Client\Model\Body8 $body Task name. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\InlineResponse2012 + */ + public function crmTasksPost($body) + { + list($response) = $this->crmTasksPostWithHttpInfo($body); + return $response; + } + + /** + * Operation crmTasksPostWithHttpInfo + * + * Create a task + * + * @param \Brevo\Client\Model\Body8 $body Task name. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\InlineResponse2012, HTTP status code, HTTP response headers (array of strings) + */ + public function crmTasksPostWithHttpInfo($body) + { + $returnType = '\Brevo\Client\Model\InlineResponse2012'; + $request = $this->crmTasksPostRequest($body); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\InlineResponse2012', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation crmTasksPostAsync + * + * Create a task + * + * @param \Brevo\Client\Model\Body8 $body Task name. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmTasksPostAsync($body) + { + return $this->crmTasksPostAsyncWithHttpInfo($body) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation crmTasksPostAsyncWithHttpInfo + * + * Create a task + * + * @param \Brevo\Client\Model\Body8 $body Task name. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmTasksPostAsyncWithHttpInfo($body) + { + $returnType = '\Brevo\Client\Model\InlineResponse2012'; + $request = $this->crmTasksPostRequest($body); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'crmTasksPost' + * + * @param \Brevo\Client\Model\Body8 $body Task name. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function crmTasksPostRequest($body) + { + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $body when calling crmTasksPost' + ); + } + + $resourcePath = '/crm/tasks'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation crmTasktypesGet + * + * Get all task types + * + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\TaskTypes + */ + public function crmTasktypesGet() + { + list($response) = $this->crmTasktypesGetWithHttpInfo(); + return $response; + } + + /** + * Operation crmTasktypesGetWithHttpInfo + * + * Get all task types + * + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\TaskTypes, HTTP status code, HTTP response headers (array of strings) + */ + public function crmTasktypesGetWithHttpInfo() + { + $returnType = '\Brevo\Client\Model\TaskTypes'; + $request = $this->crmTasktypesGetRequest(); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\TaskTypes', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation crmTasktypesGetAsync + * + * Get all task types + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmTasktypesGetAsync() + { + return $this->crmTasktypesGetAsyncWithHttpInfo() + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation crmTasktypesGetAsyncWithHttpInfo + * + * Get all task types + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmTasktypesGetAsyncWithHttpInfo() + { + $returnType = '\Brevo\Client\Model\TaskTypes'; + $request = $this->crmTasktypesGetRequest(); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'crmTasktypesGet' + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function crmTasktypesGetRequest() + { + + $resourcePath = '/crm/tasktypes'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/vendor/getbrevo/brevo-php/lib/Api/TransactionalEmailsApi.php b/vendor/getbrevo/brevo-php/lib/Api/TransactionalEmailsApi.php new file mode 100644 index 0000000..ceca9c1 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Api/TransactionalEmailsApi.php @@ -0,0 +1,6499 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation blockNewDomain + * + * Add a new domain to the list of blocked domains + * + * @param \Brevo\Client\Model\BlockDomain $blockDomain blockDomain (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function blockNewDomain($blockDomain) + { + $this->blockNewDomainWithHttpInfo($blockDomain); + } + + /** + * Operation blockNewDomainWithHttpInfo + * + * Add a new domain to the list of blocked domains + * + * @param \Brevo\Client\Model\BlockDomain $blockDomain (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function blockNewDomainWithHttpInfo($blockDomain) + { + $returnType = ''; + $request = $this->blockNewDomainRequest($blockDomain); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation blockNewDomainAsync + * + * Add a new domain to the list of blocked domains + * + * @param \Brevo\Client\Model\BlockDomain $blockDomain (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function blockNewDomainAsync($blockDomain) + { + return $this->blockNewDomainAsyncWithHttpInfo($blockDomain) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation blockNewDomainAsyncWithHttpInfo + * + * Add a new domain to the list of blocked domains + * + * @param \Brevo\Client\Model\BlockDomain $blockDomain (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function blockNewDomainAsyncWithHttpInfo($blockDomain) + { + $returnType = ''; + $request = $this->blockNewDomainRequest($blockDomain); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'blockNewDomain' + * + * @param \Brevo\Client\Model\BlockDomain $blockDomain (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function blockNewDomainRequest($blockDomain) + { + // verify the required parameter 'blockDomain' is set + if ($blockDomain === null || (is_array($blockDomain) && count($blockDomain) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $blockDomain when calling blockNewDomain' + ); + } + + $resourcePath = '/smtp/blockedDomains'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($blockDomain)) { + $_tempBody = $blockDomain; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation createSmtpTemplate + * + * Create an email template + * + * @param \Brevo\Client\Model\CreateSmtpTemplate $smtpTemplate values to update in transactional email template (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\CreateModel + */ + public function createSmtpTemplate($smtpTemplate) + { + list($response) = $this->createSmtpTemplateWithHttpInfo($smtpTemplate); + return $response; + } + + /** + * Operation createSmtpTemplateWithHttpInfo + * + * Create an email template + * + * @param \Brevo\Client\Model\CreateSmtpTemplate $smtpTemplate values to update in transactional email template (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\CreateModel, HTTP status code, HTTP response headers (array of strings) + */ + public function createSmtpTemplateWithHttpInfo($smtpTemplate) + { + $returnType = '\Brevo\Client\Model\CreateModel'; + $request = $this->createSmtpTemplateRequest($smtpTemplate); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\CreateModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation createSmtpTemplateAsync + * + * Create an email template + * + * @param \Brevo\Client\Model\CreateSmtpTemplate $smtpTemplate values to update in transactional email template (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createSmtpTemplateAsync($smtpTemplate) + { + return $this->createSmtpTemplateAsyncWithHttpInfo($smtpTemplate) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createSmtpTemplateAsyncWithHttpInfo + * + * Create an email template + * + * @param \Brevo\Client\Model\CreateSmtpTemplate $smtpTemplate values to update in transactional email template (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createSmtpTemplateAsyncWithHttpInfo($smtpTemplate) + { + $returnType = '\Brevo\Client\Model\CreateModel'; + $request = $this->createSmtpTemplateRequest($smtpTemplate); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createSmtpTemplate' + * + * @param \Brevo\Client\Model\CreateSmtpTemplate $smtpTemplate values to update in transactional email template (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function createSmtpTemplateRequest($smtpTemplate) + { + // verify the required parameter 'smtpTemplate' is set + if ($smtpTemplate === null || (is_array($smtpTemplate) && count($smtpTemplate) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $smtpTemplate when calling createSmtpTemplate' + ); + } + + $resourcePath = '/smtp/templates'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($smtpTemplate)) { + $_tempBody = $smtpTemplate; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation deleteBlockedDomain + * + * Unblock an existing domain from the list of blocked domains + * + * @param string $domain The name of the domain to be deleted (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function deleteBlockedDomain($domain) + { + $this->deleteBlockedDomainWithHttpInfo($domain); + } + + /** + * Operation deleteBlockedDomainWithHttpInfo + * + * Unblock an existing domain from the list of blocked domains + * + * @param string $domain The name of the domain to be deleted (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteBlockedDomainWithHttpInfo($domain) + { + $returnType = ''; + $request = $this->deleteBlockedDomainRequest($domain); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation deleteBlockedDomainAsync + * + * Unblock an existing domain from the list of blocked domains + * + * @param string $domain The name of the domain to be deleted (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteBlockedDomainAsync($domain) + { + return $this->deleteBlockedDomainAsyncWithHttpInfo($domain) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteBlockedDomainAsyncWithHttpInfo + * + * Unblock an existing domain from the list of blocked domains + * + * @param string $domain The name of the domain to be deleted (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteBlockedDomainAsyncWithHttpInfo($domain) + { + $returnType = ''; + $request = $this->deleteBlockedDomainRequest($domain); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'deleteBlockedDomain' + * + * @param string $domain The name of the domain to be deleted (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function deleteBlockedDomainRequest($domain) + { + // verify the required parameter 'domain' is set + if ($domain === null || (is_array($domain) && count($domain) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $domain when calling deleteBlockedDomain' + ); + } + + $resourcePath = '/smtp/blockedDomains/{domain}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($domain !== null) { + $resourcePath = str_replace( + '{' . 'domain' . '}', + ObjectSerializer::toPathValue($domain), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation deleteHardbounces + * + * Delete hardbounces + * + * @param \Brevo\Client\Model\DeleteHardbounces $deleteHardbounces values to delete hardbounces (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function deleteHardbounces($deleteHardbounces = null) + { + $this->deleteHardbouncesWithHttpInfo($deleteHardbounces); + } + + /** + * Operation deleteHardbouncesWithHttpInfo + * + * Delete hardbounces + * + * @param \Brevo\Client\Model\DeleteHardbounces $deleteHardbounces values to delete hardbounces (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteHardbouncesWithHttpInfo($deleteHardbounces = null) + { + $returnType = ''; + $request = $this->deleteHardbouncesRequest($deleteHardbounces); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation deleteHardbouncesAsync + * + * Delete hardbounces + * + * @param \Brevo\Client\Model\DeleteHardbounces $deleteHardbounces values to delete hardbounces (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteHardbouncesAsync($deleteHardbounces = null) + { + return $this->deleteHardbouncesAsyncWithHttpInfo($deleteHardbounces) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteHardbouncesAsyncWithHttpInfo + * + * Delete hardbounces + * + * @param \Brevo\Client\Model\DeleteHardbounces $deleteHardbounces values to delete hardbounces (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteHardbouncesAsyncWithHttpInfo($deleteHardbounces = null) + { + $returnType = ''; + $request = $this->deleteHardbouncesRequest($deleteHardbounces); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'deleteHardbounces' + * + * @param \Brevo\Client\Model\DeleteHardbounces $deleteHardbounces values to delete hardbounces (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function deleteHardbouncesRequest($deleteHardbounces = null) + { + + $resourcePath = '/smtp/deleteHardbounces'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($deleteHardbounces)) { + $_tempBody = $deleteHardbounces; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation deleteScheduledEmailById + * + * Delete scheduled emails by batchId or messageId + * + * @param string $identifier The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function deleteScheduledEmailById($identifier) + { + $this->deleteScheduledEmailByIdWithHttpInfo($identifier); + } + + /** + * Operation deleteScheduledEmailByIdWithHttpInfo + * + * Delete scheduled emails by batchId or messageId + * + * @param string $identifier The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteScheduledEmailByIdWithHttpInfo($identifier) + { + $returnType = ''; + $request = $this->deleteScheduledEmailByIdRequest($identifier); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation deleteScheduledEmailByIdAsync + * + * Delete scheduled emails by batchId or messageId + * + * @param string $identifier The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteScheduledEmailByIdAsync($identifier) + { + return $this->deleteScheduledEmailByIdAsyncWithHttpInfo($identifier) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteScheduledEmailByIdAsyncWithHttpInfo + * + * Delete scheduled emails by batchId or messageId + * + * @param string $identifier The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteScheduledEmailByIdAsyncWithHttpInfo($identifier) + { + $returnType = ''; + $request = $this->deleteScheduledEmailByIdRequest($identifier); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'deleteScheduledEmailById' + * + * @param string $identifier The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function deleteScheduledEmailByIdRequest($identifier) + { + // verify the required parameter 'identifier' is set + if ($identifier === null || (is_array($identifier) && count($identifier) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $identifier when calling deleteScheduledEmailById' + ); + } + + $resourcePath = '/smtp/email/{identifier}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($identifier !== null) { + $resourcePath = str_replace( + '{' . 'identifier' . '}', + ObjectSerializer::toPathValue($identifier), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation deleteSmtpTemplate + * + * Delete an inactive email template + * + * @param int $templateId id of the template (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function deleteSmtpTemplate($templateId) + { + $this->deleteSmtpTemplateWithHttpInfo($templateId); + } + + /** + * Operation deleteSmtpTemplateWithHttpInfo + * + * Delete an inactive email template + * + * @param int $templateId id of the template (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteSmtpTemplateWithHttpInfo($templateId) + { + $returnType = ''; + $request = $this->deleteSmtpTemplateRequest($templateId); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation deleteSmtpTemplateAsync + * + * Delete an inactive email template + * + * @param int $templateId id of the template (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteSmtpTemplateAsync($templateId) + { + return $this->deleteSmtpTemplateAsyncWithHttpInfo($templateId) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteSmtpTemplateAsyncWithHttpInfo + * + * Delete an inactive email template + * + * @param int $templateId id of the template (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteSmtpTemplateAsyncWithHttpInfo($templateId) + { + $returnType = ''; + $request = $this->deleteSmtpTemplateRequest($templateId); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'deleteSmtpTemplate' + * + * @param int $templateId id of the template (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function deleteSmtpTemplateRequest($templateId) + { + // verify the required parameter 'templateId' is set + if ($templateId === null || (is_array($templateId) && count($templateId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $templateId when calling deleteSmtpTemplate' + ); + } + + $resourcePath = '/smtp/templates/{templateId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($templateId !== null) { + $resourcePath = str_replace( + '{' . 'templateId' . '}', + ObjectSerializer::toPathValue($templateId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getAggregatedSmtpReport + * + * Get your transactional email activity aggregated over a period of time + * + * @param string $startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + * @param string $endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param string $tag Tag of the emails (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetAggregatedReport + */ + public function getAggregatedSmtpReport($startDate = null, $endDate = null, $days = null, $tag = null) + { + list($response) = $this->getAggregatedSmtpReportWithHttpInfo($startDate, $endDate, $days, $tag); + return $response; + } + + /** + * Operation getAggregatedSmtpReportWithHttpInfo + * + * Get your transactional email activity aggregated over a period of time + * + * @param string $startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + * @param string $endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param string $tag Tag of the emails (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetAggregatedReport, HTTP status code, HTTP response headers (array of strings) + */ + public function getAggregatedSmtpReportWithHttpInfo($startDate = null, $endDate = null, $days = null, $tag = null) + { + $returnType = '\Brevo\Client\Model\GetAggregatedReport'; + $request = $this->getAggregatedSmtpReportRequest($startDate, $endDate, $days, $tag); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetAggregatedReport', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getAggregatedSmtpReportAsync + * + * Get your transactional email activity aggregated over a period of time + * + * @param string $startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + * @param string $endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param string $tag Tag of the emails (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getAggregatedSmtpReportAsync($startDate = null, $endDate = null, $days = null, $tag = null) + { + return $this->getAggregatedSmtpReportAsyncWithHttpInfo($startDate, $endDate, $days, $tag) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getAggregatedSmtpReportAsyncWithHttpInfo + * + * Get your transactional email activity aggregated over a period of time + * + * @param string $startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + * @param string $endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param string $tag Tag of the emails (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getAggregatedSmtpReportAsyncWithHttpInfo($startDate = null, $endDate = null, $days = null, $tag = null) + { + $returnType = '\Brevo\Client\Model\GetAggregatedReport'; + $request = $this->getAggregatedSmtpReportRequest($startDate, $endDate, $days, $tag); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getAggregatedSmtpReport' + * + * @param string $startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + * @param string $endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param string $tag Tag of the emails (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getAggregatedSmtpReportRequest($startDate = null, $endDate = null, $days = null, $tag = null) + { + + $resourcePath = '/smtp/statistics/aggregatedReport'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($startDate !== null) { + $queryParams['startDate'] = ObjectSerializer::toQueryValue($startDate); + } + // query params + if ($endDate !== null) { + $queryParams['endDate'] = ObjectSerializer::toQueryValue($endDate); + } + // query params + if ($days !== null) { + $queryParams['days'] = ObjectSerializer::toQueryValue($days); + } + // query params + if ($tag !== null) { + $queryParams['tag'] = ObjectSerializer::toQueryValue($tag); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getBlockedDomains + * + * Get the list of blocked domains + * + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetBlockedDomains + */ + public function getBlockedDomains() + { + list($response) = $this->getBlockedDomainsWithHttpInfo(); + return $response; + } + + /** + * Operation getBlockedDomainsWithHttpInfo + * + * Get the list of blocked domains + * + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetBlockedDomains, HTTP status code, HTTP response headers (array of strings) + */ + public function getBlockedDomainsWithHttpInfo() + { + $returnType = '\Brevo\Client\Model\GetBlockedDomains'; + $request = $this->getBlockedDomainsRequest(); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetBlockedDomains', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getBlockedDomainsAsync + * + * Get the list of blocked domains + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getBlockedDomainsAsync() + { + return $this->getBlockedDomainsAsyncWithHttpInfo() + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getBlockedDomainsAsyncWithHttpInfo + * + * Get the list of blocked domains + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getBlockedDomainsAsyncWithHttpInfo() + { + $returnType = '\Brevo\Client\Model\GetBlockedDomains'; + $request = $this->getBlockedDomainsRequest(); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getBlockedDomains' + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getBlockedDomainsRequest() + { + + $resourcePath = '/smtp/blockedDomains'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getEmailEventReport + * + * Get all your transactional email activity (unaggregated events) + * + * @param int $limit Number limitation for the result returned (optional, default to 2500) + * @param int $offset Beginning point in the list to retrieve from. (optional, default to 0) + * @param string $startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + * @param string $endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param string $email Filter the report for a specific email addresses (optional) + * @param string $event Filter the report for a specific event type (optional) + * @param string $tags Filter the report for tags (serialized and urlencoded array) (optional) + * @param string $messageId Filter on a specific message id (optional) + * @param int $templateId Filter on a specific template id (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetEmailEventReport + */ + public function getEmailEventReport($limit = '2500', $offset = '0', $startDate = null, $endDate = null, $days = null, $email = null, $event = null, $tags = null, $messageId = null, $templateId = null, $sort = 'desc') + { + list($response) = $this->getEmailEventReportWithHttpInfo($limit, $offset, $startDate, $endDate, $days, $email, $event, $tags, $messageId, $templateId, $sort); + return $response; + } + + /** + * Operation getEmailEventReportWithHttpInfo + * + * Get all your transactional email activity (unaggregated events) + * + * @param int $limit Number limitation for the result returned (optional, default to 2500) + * @param int $offset Beginning point in the list to retrieve from. (optional, default to 0) + * @param string $startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + * @param string $endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param string $email Filter the report for a specific email addresses (optional) + * @param string $event Filter the report for a specific event type (optional) + * @param string $tags Filter the report for tags (serialized and urlencoded array) (optional) + * @param string $messageId Filter on a specific message id (optional) + * @param int $templateId Filter on a specific template id (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetEmailEventReport, HTTP status code, HTTP response headers (array of strings) + */ + public function getEmailEventReportWithHttpInfo($limit = '2500', $offset = '0', $startDate = null, $endDate = null, $days = null, $email = null, $event = null, $tags = null, $messageId = null, $templateId = null, $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetEmailEventReport'; + $request = $this->getEmailEventReportRequest($limit, $offset, $startDate, $endDate, $days, $email, $event, $tags, $messageId, $templateId, $sort); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetEmailEventReport', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getEmailEventReportAsync + * + * Get all your transactional email activity (unaggregated events) + * + * @param int $limit Number limitation for the result returned (optional, default to 2500) + * @param int $offset Beginning point in the list to retrieve from. (optional, default to 0) + * @param string $startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + * @param string $endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param string $email Filter the report for a specific email addresses (optional) + * @param string $event Filter the report for a specific event type (optional) + * @param string $tags Filter the report for tags (serialized and urlencoded array) (optional) + * @param string $messageId Filter on a specific message id (optional) + * @param int $templateId Filter on a specific template id (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getEmailEventReportAsync($limit = '2500', $offset = '0', $startDate = null, $endDate = null, $days = null, $email = null, $event = null, $tags = null, $messageId = null, $templateId = null, $sort = 'desc') + { + return $this->getEmailEventReportAsyncWithHttpInfo($limit, $offset, $startDate, $endDate, $days, $email, $event, $tags, $messageId, $templateId, $sort) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getEmailEventReportAsyncWithHttpInfo + * + * Get all your transactional email activity (unaggregated events) + * + * @param int $limit Number limitation for the result returned (optional, default to 2500) + * @param int $offset Beginning point in the list to retrieve from. (optional, default to 0) + * @param string $startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + * @param string $endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param string $email Filter the report for a specific email addresses (optional) + * @param string $event Filter the report for a specific event type (optional) + * @param string $tags Filter the report for tags (serialized and urlencoded array) (optional) + * @param string $messageId Filter on a specific message id (optional) + * @param int $templateId Filter on a specific template id (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getEmailEventReportAsyncWithHttpInfo($limit = '2500', $offset = '0', $startDate = null, $endDate = null, $days = null, $email = null, $event = null, $tags = null, $messageId = null, $templateId = null, $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetEmailEventReport'; + $request = $this->getEmailEventReportRequest($limit, $offset, $startDate, $endDate, $days, $email, $event, $tags, $messageId, $templateId, $sort); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getEmailEventReport' + * + * @param int $limit Number limitation for the result returned (optional, default to 2500) + * @param int $offset Beginning point in the list to retrieve from. (optional, default to 0) + * @param string $startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + * @param string $endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param string $email Filter the report for a specific email addresses (optional) + * @param string $event Filter the report for a specific event type (optional) + * @param string $tags Filter the report for tags (serialized and urlencoded array) (optional) + * @param string $messageId Filter on a specific message id (optional) + * @param int $templateId Filter on a specific template id (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getEmailEventReportRequest($limit = '2500', $offset = '0', $startDate = null, $endDate = null, $days = null, $email = null, $event = null, $tags = null, $messageId = null, $templateId = null, $sort = 'desc') + { + if ($limit !== null && $limit > 5000) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling TransactionalEmailsApi.getEmailEventReport, must be smaller than or equal to 5000.'); + } + if ($limit !== null && $limit < 0) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling TransactionalEmailsApi.getEmailEventReport, must be bigger than or equal to 0.'); + } + + + $resourcePath = '/smtp/statistics/events'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + // query params + if ($startDate !== null) { + $queryParams['startDate'] = ObjectSerializer::toQueryValue($startDate); + } + // query params + if ($endDate !== null) { + $queryParams['endDate'] = ObjectSerializer::toQueryValue($endDate); + } + // query params + if ($days !== null) { + $queryParams['days'] = ObjectSerializer::toQueryValue($days); + } + // query params + if ($email !== null) { + $queryParams['email'] = ObjectSerializer::toQueryValue($email); + } + // query params + if ($event !== null) { + $queryParams['event'] = ObjectSerializer::toQueryValue($event); + } + // query params + if ($tags !== null) { + $queryParams['tags'] = ObjectSerializer::toQueryValue($tags); + } + // query params + if ($messageId !== null) { + $queryParams['messageId'] = ObjectSerializer::toQueryValue($messageId); + } + // query params + if ($templateId !== null) { + $queryParams['templateId'] = ObjectSerializer::toQueryValue($templateId); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getScheduledEmailByBatchId + * + * Fetch scheduled emails by batchId + * + * @param string $batchId The batchId of scheduled emails batch (Should be a valid UUIDv4) (required) + * @param \DateTime $startDate Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. (optional) + * @param \DateTime $endDate Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $status Filter the records by `status` of the scheduled email batch or message. (optional) + * @param int $limit Number of documents returned per page (optional, default to 100) + * @param int $offset Index of the first document on the page (optional, default to 0) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetScheduledEmailByBatchId + */ + public function getScheduledEmailByBatchId($batchId, $startDate = null, $endDate = null, $sort = 'desc', $status = null, $limit = '100', $offset = '0') + { + list($response) = $this->getScheduledEmailByBatchIdWithHttpInfo($batchId, $startDate, $endDate, $sort, $status, $limit, $offset); + return $response; + } + + /** + * Operation getScheduledEmailByBatchIdWithHttpInfo + * + * Fetch scheduled emails by batchId + * + * @param string $batchId The batchId of scheduled emails batch (Should be a valid UUIDv4) (required) + * @param \DateTime $startDate Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. (optional) + * @param \DateTime $endDate Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $status Filter the records by `status` of the scheduled email batch or message. (optional) + * @param int $limit Number of documents returned per page (optional, default to 100) + * @param int $offset Index of the first document on the page (optional, default to 0) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetScheduledEmailByBatchId, HTTP status code, HTTP response headers (array of strings) + */ + public function getScheduledEmailByBatchIdWithHttpInfo($batchId, $startDate = null, $endDate = null, $sort = 'desc', $status = null, $limit = '100', $offset = '0') + { + $returnType = '\Brevo\Client\Model\GetScheduledEmailByBatchId'; + $request = $this->getScheduledEmailByBatchIdRequest($batchId, $startDate, $endDate, $sort, $status, $limit, $offset); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetScheduledEmailByBatchId', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getScheduledEmailByBatchIdAsync + * + * Fetch scheduled emails by batchId + * + * @param string $batchId The batchId of scheduled emails batch (Should be a valid UUIDv4) (required) + * @param \DateTime $startDate Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. (optional) + * @param \DateTime $endDate Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $status Filter the records by `status` of the scheduled email batch or message. (optional) + * @param int $limit Number of documents returned per page (optional, default to 100) + * @param int $offset Index of the first document on the page (optional, default to 0) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getScheduledEmailByBatchIdAsync($batchId, $startDate = null, $endDate = null, $sort = 'desc', $status = null, $limit = '100', $offset = '0') + { + return $this->getScheduledEmailByBatchIdAsyncWithHttpInfo($batchId, $startDate, $endDate, $sort, $status, $limit, $offset) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getScheduledEmailByBatchIdAsyncWithHttpInfo + * + * Fetch scheduled emails by batchId + * + * @param string $batchId The batchId of scheduled emails batch (Should be a valid UUIDv4) (required) + * @param \DateTime $startDate Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. (optional) + * @param \DateTime $endDate Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $status Filter the records by `status` of the scheduled email batch or message. (optional) + * @param int $limit Number of documents returned per page (optional, default to 100) + * @param int $offset Index of the first document on the page (optional, default to 0) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getScheduledEmailByBatchIdAsyncWithHttpInfo($batchId, $startDate = null, $endDate = null, $sort = 'desc', $status = null, $limit = '100', $offset = '0') + { + $returnType = '\Brevo\Client\Model\GetScheduledEmailByBatchId'; + $request = $this->getScheduledEmailByBatchIdRequest($batchId, $startDate, $endDate, $sort, $status, $limit, $offset); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getScheduledEmailByBatchId' + * + * @param string $batchId The batchId of scheduled emails batch (Should be a valid UUIDv4) (required) + * @param \DateTime $startDate Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. (optional) + * @param \DateTime $endDate Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $status Filter the records by `status` of the scheduled email batch or message. (optional) + * @param int $limit Number of documents returned per page (optional, default to 100) + * @param int $offset Index of the first document on the page (optional, default to 0) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getScheduledEmailByBatchIdRequest($batchId, $startDate = null, $endDate = null, $sort = 'desc', $status = null, $limit = '100', $offset = '0') + { + // verify the required parameter 'batchId' is set + if ($batchId === null || (is_array($batchId) && count($batchId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $batchId when calling getScheduledEmailByBatchId' + ); + } + if ($limit !== null && $limit > 500) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling TransactionalEmailsApi.getScheduledEmailByBatchId, must be smaller than or equal to 500.'); + } + if ($limit !== null && $limit < 0) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling TransactionalEmailsApi.getScheduledEmailByBatchId, must be bigger than or equal to 0.'); + } + + + $resourcePath = '/smtp/emailStatus/{batchId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($startDate !== null) { + $queryParams['startDate'] = ObjectSerializer::toQueryValue($startDate); + } + // query params + if ($endDate !== null) { + $queryParams['endDate'] = ObjectSerializer::toQueryValue($endDate); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); + } + // query params + if ($status !== null) { + $queryParams['status'] = ObjectSerializer::toQueryValue($status); + } + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + + // path params + if ($batchId !== null) { + $resourcePath = str_replace( + '{' . 'batchId' . '}', + ObjectSerializer::toPathValue($batchId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getScheduledEmailByMessageId + * + * Fetch scheduled email by messageId + * + * @param string $messageId The messageId of scheduled email (required) + * @param \DateTime $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. (optional) + * @param \DateTime $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetScheduledEmailByMessageId + */ + public function getScheduledEmailByMessageId($messageId, $startDate = null, $endDate = null) + { + list($response) = $this->getScheduledEmailByMessageIdWithHttpInfo($messageId, $startDate, $endDate); + return $response; + } + + /** + * Operation getScheduledEmailByMessageIdWithHttpInfo + * + * Fetch scheduled email by messageId + * + * @param string $messageId The messageId of scheduled email (required) + * @param \DateTime $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. (optional) + * @param \DateTime $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetScheduledEmailByMessageId, HTTP status code, HTTP response headers (array of strings) + */ + public function getScheduledEmailByMessageIdWithHttpInfo($messageId, $startDate = null, $endDate = null) + { + $returnType = '\Brevo\Client\Model\GetScheduledEmailByMessageId'; + $request = $this->getScheduledEmailByMessageIdRequest($messageId, $startDate, $endDate); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetScheduledEmailByMessageId', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getScheduledEmailByMessageIdAsync + * + * Fetch scheduled email by messageId + * + * @param string $messageId The messageId of scheduled email (required) + * @param \DateTime $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. (optional) + * @param \DateTime $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getScheduledEmailByMessageIdAsync($messageId, $startDate = null, $endDate = null) + { + return $this->getScheduledEmailByMessageIdAsyncWithHttpInfo($messageId, $startDate, $endDate) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getScheduledEmailByMessageIdAsyncWithHttpInfo + * + * Fetch scheduled email by messageId + * + * @param string $messageId The messageId of scheduled email (required) + * @param \DateTime $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. (optional) + * @param \DateTime $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getScheduledEmailByMessageIdAsyncWithHttpInfo($messageId, $startDate = null, $endDate = null) + { + $returnType = '\Brevo\Client\Model\GetScheduledEmailByMessageId'; + $request = $this->getScheduledEmailByMessageIdRequest($messageId, $startDate, $endDate); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getScheduledEmailByMessageId' + * + * @param string $messageId The messageId of scheduled email (required) + * @param \DateTime $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. (optional) + * @param \DateTime $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getScheduledEmailByMessageIdRequest($messageId, $startDate = null, $endDate = null) + { + // verify the required parameter 'messageId' is set + if ($messageId === null || (is_array($messageId) && count($messageId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $messageId when calling getScheduledEmailByMessageId' + ); + } + + $resourcePath = '/smtp/emailStatus/{messageId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($startDate !== null) { + $queryParams['startDate'] = ObjectSerializer::toQueryValue($startDate); + } + // query params + if ($endDate !== null) { + $queryParams['endDate'] = ObjectSerializer::toQueryValue($endDate); + } + + // path params + if ($messageId !== null) { + $resourcePath = str_replace( + '{' . 'messageId' . '}', + ObjectSerializer::toPathValue($messageId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getSmtpReport + * + * Get your transactional email activity aggregated per day + * + * @param int $limit Number of documents returned per page (optional, default to 10) + * @param int $offset Index of the first document on the page (optional, default to 0) + * @param string $startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD) (optional) + * @param string $endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD) (optional) + * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param string $tag Tag of the emails (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetReports + */ + public function getSmtpReport($limit = '10', $offset = '0', $startDate = null, $endDate = null, $days = null, $tag = null, $sort = 'desc') + { + list($response) = $this->getSmtpReportWithHttpInfo($limit, $offset, $startDate, $endDate, $days, $tag, $sort); + return $response; + } + + /** + * Operation getSmtpReportWithHttpInfo + * + * Get your transactional email activity aggregated per day + * + * @param int $limit Number of documents returned per page (optional, default to 10) + * @param int $offset Index of the first document on the page (optional, default to 0) + * @param string $startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD) (optional) + * @param string $endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD) (optional) + * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param string $tag Tag of the emails (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetReports, HTTP status code, HTTP response headers (array of strings) + */ + public function getSmtpReportWithHttpInfo($limit = '10', $offset = '0', $startDate = null, $endDate = null, $days = null, $tag = null, $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetReports'; + $request = $this->getSmtpReportRequest($limit, $offset, $startDate, $endDate, $days, $tag, $sort); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetReports', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getSmtpReportAsync + * + * Get your transactional email activity aggregated per day + * + * @param int $limit Number of documents returned per page (optional, default to 10) + * @param int $offset Index of the first document on the page (optional, default to 0) + * @param string $startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD) (optional) + * @param string $endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD) (optional) + * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param string $tag Tag of the emails (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getSmtpReportAsync($limit = '10', $offset = '0', $startDate = null, $endDate = null, $days = null, $tag = null, $sort = 'desc') + { + return $this->getSmtpReportAsyncWithHttpInfo($limit, $offset, $startDate, $endDate, $days, $tag, $sort) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getSmtpReportAsyncWithHttpInfo + * + * Get your transactional email activity aggregated per day + * + * @param int $limit Number of documents returned per page (optional, default to 10) + * @param int $offset Index of the first document on the page (optional, default to 0) + * @param string $startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD) (optional) + * @param string $endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD) (optional) + * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param string $tag Tag of the emails (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getSmtpReportAsyncWithHttpInfo($limit = '10', $offset = '0', $startDate = null, $endDate = null, $days = null, $tag = null, $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetReports'; + $request = $this->getSmtpReportRequest($limit, $offset, $startDate, $endDate, $days, $tag, $sort); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getSmtpReport' + * + * @param int $limit Number of documents returned per page (optional, default to 10) + * @param int $offset Index of the first document on the page (optional, default to 0) + * @param string $startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD) (optional) + * @param string $endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD) (optional) + * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param string $tag Tag of the emails (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getSmtpReportRequest($limit = '10', $offset = '0', $startDate = null, $endDate = null, $days = null, $tag = null, $sort = 'desc') + { + if ($limit !== null && $limit > 30) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling TransactionalEmailsApi.getSmtpReport, must be smaller than or equal to 30.'); + } + if ($limit !== null && $limit < 0) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling TransactionalEmailsApi.getSmtpReport, must be bigger than or equal to 0.'); + } + + + $resourcePath = '/smtp/statistics/reports'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + // query params + if ($startDate !== null) { + $queryParams['startDate'] = ObjectSerializer::toQueryValue($startDate); + } + // query params + if ($endDate !== null) { + $queryParams['endDate'] = ObjectSerializer::toQueryValue($endDate); + } + // query params + if ($days !== null) { + $queryParams['days'] = ObjectSerializer::toQueryValue($days); + } + // query params + if ($tag !== null) { + $queryParams['tag'] = ObjectSerializer::toQueryValue($tag); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getSmtpTemplate + * + * Returns the template information + * + * @param int $templateId id of the template (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetSmtpTemplateOverview + */ + public function getSmtpTemplate($templateId) + { + list($response) = $this->getSmtpTemplateWithHttpInfo($templateId); + return $response; + } + + /** + * Operation getSmtpTemplateWithHttpInfo + * + * Returns the template information + * + * @param int $templateId id of the template (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetSmtpTemplateOverview, HTTP status code, HTTP response headers (array of strings) + */ + public function getSmtpTemplateWithHttpInfo($templateId) + { + $returnType = '\Brevo\Client\Model\GetSmtpTemplateOverview'; + $request = $this->getSmtpTemplateRequest($templateId); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetSmtpTemplateOverview', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getSmtpTemplateAsync + * + * Returns the template information + * + * @param int $templateId id of the template (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getSmtpTemplateAsync($templateId) + { + return $this->getSmtpTemplateAsyncWithHttpInfo($templateId) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getSmtpTemplateAsyncWithHttpInfo + * + * Returns the template information + * + * @param int $templateId id of the template (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getSmtpTemplateAsyncWithHttpInfo($templateId) + { + $returnType = '\Brevo\Client\Model\GetSmtpTemplateOverview'; + $request = $this->getSmtpTemplateRequest($templateId); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getSmtpTemplate' + * + * @param int $templateId id of the template (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getSmtpTemplateRequest($templateId) + { + // verify the required parameter 'templateId' is set + if ($templateId === null || (is_array($templateId) && count($templateId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $templateId when calling getSmtpTemplate' + ); + } + + $resourcePath = '/smtp/templates/{templateId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($templateId !== null) { + $resourcePath = str_replace( + '{' . 'templateId' . '}', + ObjectSerializer::toPathValue($templateId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getSmtpTemplates + * + * Get the list of email templates + * + * @param bool $templateStatus Filter on the status of the template. Active = true, inactive = false (optional) + * @param int $limit Number of documents returned per page (optional, default to 50) + * @param int $offset Index of the first document in the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetSmtpTemplates + */ + public function getSmtpTemplates($templateStatus = null, $limit = '50', $offset = '0', $sort = 'desc') + { + list($response) = $this->getSmtpTemplatesWithHttpInfo($templateStatus, $limit, $offset, $sort); + return $response; + } + + /** + * Operation getSmtpTemplatesWithHttpInfo + * + * Get the list of email templates + * + * @param bool $templateStatus Filter on the status of the template. Active = true, inactive = false (optional) + * @param int $limit Number of documents returned per page (optional, default to 50) + * @param int $offset Index of the first document in the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetSmtpTemplates, HTTP status code, HTTP response headers (array of strings) + */ + public function getSmtpTemplatesWithHttpInfo($templateStatus = null, $limit = '50', $offset = '0', $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetSmtpTemplates'; + $request = $this->getSmtpTemplatesRequest($templateStatus, $limit, $offset, $sort); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetSmtpTemplates', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getSmtpTemplatesAsync + * + * Get the list of email templates + * + * @param bool $templateStatus Filter on the status of the template. Active = true, inactive = false (optional) + * @param int $limit Number of documents returned per page (optional, default to 50) + * @param int $offset Index of the first document in the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getSmtpTemplatesAsync($templateStatus = null, $limit = '50', $offset = '0', $sort = 'desc') + { + return $this->getSmtpTemplatesAsyncWithHttpInfo($templateStatus, $limit, $offset, $sort) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getSmtpTemplatesAsyncWithHttpInfo + * + * Get the list of email templates + * + * @param bool $templateStatus Filter on the status of the template. Active = true, inactive = false (optional) + * @param int $limit Number of documents returned per page (optional, default to 50) + * @param int $offset Index of the first document in the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getSmtpTemplatesAsyncWithHttpInfo($templateStatus = null, $limit = '50', $offset = '0', $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetSmtpTemplates'; + $request = $this->getSmtpTemplatesRequest($templateStatus, $limit, $offset, $sort); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getSmtpTemplates' + * + * @param bool $templateStatus Filter on the status of the template. Active = true, inactive = false (optional) + * @param int $limit Number of documents returned per page (optional, default to 50) + * @param int $offset Index of the first document in the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getSmtpTemplatesRequest($templateStatus = null, $limit = '50', $offset = '0', $sort = 'desc') + { + if ($limit !== null && $limit > 1000) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling TransactionalEmailsApi.getSmtpTemplates, must be smaller than or equal to 1000.'); + } + if ($limit !== null && $limit < 0) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling TransactionalEmailsApi.getSmtpTemplates, must be bigger than or equal to 0.'); + } + + + $resourcePath = '/smtp/templates'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($templateStatus !== null) { + $queryParams['templateStatus'] = ObjectSerializer::toQueryValue($templateStatus); + } + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getTransacBlockedContacts + * + * Get the list of blocked or unsubscribed transactional contacts + * + * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the blocked or unsubscribed contacts (optional) + * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the blocked or unsubscribed contacts (optional) + * @param int $limit Number of documents returned per page (optional, default to 50) + * @param int $offset Index of the first document on the page (optional, default to 0) + * @param string[] $senders Comma separated list of emails of the senders from which contacts are blocked or unsubscribed (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetTransacBlockedContacts + */ + public function getTransacBlockedContacts($startDate = null, $endDate = null, $limit = '50', $offset = '0', $senders = null, $sort = 'desc') + { + list($response) = $this->getTransacBlockedContactsWithHttpInfo($startDate, $endDate, $limit, $offset, $senders, $sort); + return $response; + } + + /** + * Operation getTransacBlockedContactsWithHttpInfo + * + * Get the list of blocked or unsubscribed transactional contacts + * + * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the blocked or unsubscribed contacts (optional) + * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the blocked or unsubscribed contacts (optional) + * @param int $limit Number of documents returned per page (optional, default to 50) + * @param int $offset Index of the first document on the page (optional, default to 0) + * @param string[] $senders Comma separated list of emails of the senders from which contacts are blocked or unsubscribed (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetTransacBlockedContacts, HTTP status code, HTTP response headers (array of strings) + */ + public function getTransacBlockedContactsWithHttpInfo($startDate = null, $endDate = null, $limit = '50', $offset = '0', $senders = null, $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetTransacBlockedContacts'; + $request = $this->getTransacBlockedContactsRequest($startDate, $endDate, $limit, $offset, $senders, $sort); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetTransacBlockedContacts', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getTransacBlockedContactsAsync + * + * Get the list of blocked or unsubscribed transactional contacts + * + * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the blocked or unsubscribed contacts (optional) + * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the blocked or unsubscribed contacts (optional) + * @param int $limit Number of documents returned per page (optional, default to 50) + * @param int $offset Index of the first document on the page (optional, default to 0) + * @param string[] $senders Comma separated list of emails of the senders from which contacts are blocked or unsubscribed (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getTransacBlockedContactsAsync($startDate = null, $endDate = null, $limit = '50', $offset = '0', $senders = null, $sort = 'desc') + { + return $this->getTransacBlockedContactsAsyncWithHttpInfo($startDate, $endDate, $limit, $offset, $senders, $sort) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getTransacBlockedContactsAsyncWithHttpInfo + * + * Get the list of blocked or unsubscribed transactional contacts + * + * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the blocked or unsubscribed contacts (optional) + * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the blocked or unsubscribed contacts (optional) + * @param int $limit Number of documents returned per page (optional, default to 50) + * @param int $offset Index of the first document on the page (optional, default to 0) + * @param string[] $senders Comma separated list of emails of the senders from which contacts are blocked or unsubscribed (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getTransacBlockedContactsAsyncWithHttpInfo($startDate = null, $endDate = null, $limit = '50', $offset = '0', $senders = null, $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetTransacBlockedContacts'; + $request = $this->getTransacBlockedContactsRequest($startDate, $endDate, $limit, $offset, $senders, $sort); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getTransacBlockedContacts' + * + * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the blocked or unsubscribed contacts (optional) + * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the blocked or unsubscribed contacts (optional) + * @param int $limit Number of documents returned per page (optional, default to 50) + * @param int $offset Index of the first document on the page (optional, default to 0) + * @param string[] $senders Comma separated list of emails of the senders from which contacts are blocked or unsubscribed (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getTransacBlockedContactsRequest($startDate = null, $endDate = null, $limit = '50', $offset = '0', $senders = null, $sort = 'desc') + { + if ($limit !== null && $limit > 100) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling TransactionalEmailsApi.getTransacBlockedContacts, must be smaller than or equal to 100.'); + } + if ($limit !== null && $limit < 0) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling TransactionalEmailsApi.getTransacBlockedContacts, must be bigger than or equal to 0.'); + } + + + $resourcePath = '/smtp/blockedContacts'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($startDate !== null) { + $queryParams['startDate'] = ObjectSerializer::toQueryValue($startDate); + } + // query params + if ($endDate !== null) { + $queryParams['endDate'] = ObjectSerializer::toQueryValue($endDate); + } + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + // query params + if (is_array($senders)) { + $queryParams['senders'] = $senders; + } else + if ($senders !== null) { + $queryParams['senders'] = ObjectSerializer::toQueryValue($senders); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getTransacEmailContent + * + * Get the personalized content of a sent transactional email + * + * @param string $uuid Unique id of the transactional email that has been sent to a particular contact (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetTransacEmailContent + */ + public function getTransacEmailContent($uuid) + { + list($response) = $this->getTransacEmailContentWithHttpInfo($uuid); + return $response; + } + + /** + * Operation getTransacEmailContentWithHttpInfo + * + * Get the personalized content of a sent transactional email + * + * @param string $uuid Unique id of the transactional email that has been sent to a particular contact (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetTransacEmailContent, HTTP status code, HTTP response headers (array of strings) + */ + public function getTransacEmailContentWithHttpInfo($uuid) + { + $returnType = '\Brevo\Client\Model\GetTransacEmailContent'; + $request = $this->getTransacEmailContentRequest($uuid); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetTransacEmailContent', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getTransacEmailContentAsync + * + * Get the personalized content of a sent transactional email + * + * @param string $uuid Unique id of the transactional email that has been sent to a particular contact (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getTransacEmailContentAsync($uuid) + { + return $this->getTransacEmailContentAsyncWithHttpInfo($uuid) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getTransacEmailContentAsyncWithHttpInfo + * + * Get the personalized content of a sent transactional email + * + * @param string $uuid Unique id of the transactional email that has been sent to a particular contact (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getTransacEmailContentAsyncWithHttpInfo($uuid) + { + $returnType = '\Brevo\Client\Model\GetTransacEmailContent'; + $request = $this->getTransacEmailContentRequest($uuid); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getTransacEmailContent' + * + * @param string $uuid Unique id of the transactional email that has been sent to a particular contact (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getTransacEmailContentRequest($uuid) + { + // verify the required parameter 'uuid' is set + if ($uuid === null || (is_array($uuid) && count($uuid) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $uuid when calling getTransacEmailContent' + ); + } + + $resourcePath = '/smtp/emails/{uuid}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($uuid !== null) { + $resourcePath = str_replace( + '{' . 'uuid' . '}', + ObjectSerializer::toPathValue($uuid), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getTransacEmailsList + * + * Get the list of transactional emails on the basis of allowed filters + * + * @param string $email Mandatory if templateId and messageId are not passed in query filters. Email address to which transactional email has been sent. (optional) + * @param int $templateId Mandatory if email and messageId are not passed in query filters. Id of the template that was used to compose transactional email. (optional) + * @param string $messageId Mandatory if templateId and email are not passed in query filters. Message ID of the transactional email sent. (optional) + * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param int $limit Number of documents returned per page (optional, default to 500) + * @param int $offset Index of the first document in the page (optional, default to 0) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetTransacEmailsList + */ + public function getTransacEmailsList($email = null, $templateId = null, $messageId = null, $startDate = null, $endDate = null, $sort = 'desc', $limit = '500', $offset = '0') + { + list($response) = $this->getTransacEmailsListWithHttpInfo($email, $templateId, $messageId, $startDate, $endDate, $sort, $limit, $offset); + return $response; + } + + /** + * Operation getTransacEmailsListWithHttpInfo + * + * Get the list of transactional emails on the basis of allowed filters + * + * @param string $email Mandatory if templateId and messageId are not passed in query filters. Email address to which transactional email has been sent. (optional) + * @param int $templateId Mandatory if email and messageId are not passed in query filters. Id of the template that was used to compose transactional email. (optional) + * @param string $messageId Mandatory if templateId and email are not passed in query filters. Message ID of the transactional email sent. (optional) + * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param int $limit Number of documents returned per page (optional, default to 500) + * @param int $offset Index of the first document in the page (optional, default to 0) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetTransacEmailsList, HTTP status code, HTTP response headers (array of strings) + */ + public function getTransacEmailsListWithHttpInfo($email = null, $templateId = null, $messageId = null, $startDate = null, $endDate = null, $sort = 'desc', $limit = '500', $offset = '0') + { + $returnType = '\Brevo\Client\Model\GetTransacEmailsList'; + $request = $this->getTransacEmailsListRequest($email, $templateId, $messageId, $startDate, $endDate, $sort, $limit, $offset); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetTransacEmailsList', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getTransacEmailsListAsync + * + * Get the list of transactional emails on the basis of allowed filters + * + * @param string $email Mandatory if templateId and messageId are not passed in query filters. Email address to which transactional email has been sent. (optional) + * @param int $templateId Mandatory if email and messageId are not passed in query filters. Id of the template that was used to compose transactional email. (optional) + * @param string $messageId Mandatory if templateId and email are not passed in query filters. Message ID of the transactional email sent. (optional) + * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param int $limit Number of documents returned per page (optional, default to 500) + * @param int $offset Index of the first document in the page (optional, default to 0) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getTransacEmailsListAsync($email = null, $templateId = null, $messageId = null, $startDate = null, $endDate = null, $sort = 'desc', $limit = '500', $offset = '0') + { + return $this->getTransacEmailsListAsyncWithHttpInfo($email, $templateId, $messageId, $startDate, $endDate, $sort, $limit, $offset) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getTransacEmailsListAsyncWithHttpInfo + * + * Get the list of transactional emails on the basis of allowed filters + * + * @param string $email Mandatory if templateId and messageId are not passed in query filters. Email address to which transactional email has been sent. (optional) + * @param int $templateId Mandatory if email and messageId are not passed in query filters. Id of the template that was used to compose transactional email. (optional) + * @param string $messageId Mandatory if templateId and email are not passed in query filters. Message ID of the transactional email sent. (optional) + * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param int $limit Number of documents returned per page (optional, default to 500) + * @param int $offset Index of the first document in the page (optional, default to 0) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getTransacEmailsListAsyncWithHttpInfo($email = null, $templateId = null, $messageId = null, $startDate = null, $endDate = null, $sort = 'desc', $limit = '500', $offset = '0') + { + $returnType = '\Brevo\Client\Model\GetTransacEmailsList'; + $request = $this->getTransacEmailsListRequest($email, $templateId, $messageId, $startDate, $endDate, $sort, $limit, $offset); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getTransacEmailsList' + * + * @param string $email Mandatory if templateId and messageId are not passed in query filters. Email address to which transactional email has been sent. (optional) + * @param int $templateId Mandatory if email and messageId are not passed in query filters. Id of the template that was used to compose transactional email. (optional) + * @param string $messageId Mandatory if templateId and email are not passed in query filters. Message ID of the transactional email sent. (optional) + * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param int $limit Number of documents returned per page (optional, default to 500) + * @param int $offset Index of the first document in the page (optional, default to 0) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getTransacEmailsListRequest($email = null, $templateId = null, $messageId = null, $startDate = null, $endDate = null, $sort = 'desc', $limit = '500', $offset = '0') + { + if ($limit !== null && $limit > 1000) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling TransactionalEmailsApi.getTransacEmailsList, must be smaller than or equal to 1000.'); + } + if ($limit !== null && $limit < 0) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling TransactionalEmailsApi.getTransacEmailsList, must be bigger than or equal to 0.'); + } + + + $resourcePath = '/smtp/emails'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($email !== null) { + $queryParams['email'] = ObjectSerializer::toQueryValue($email); + } + // query params + if ($templateId !== null) { + $queryParams['templateId'] = ObjectSerializer::toQueryValue($templateId); + } + // query params + if ($messageId !== null) { + $queryParams['messageId'] = ObjectSerializer::toQueryValue($messageId); + } + // query params + if ($startDate !== null) { + $queryParams['startDate'] = ObjectSerializer::toQueryValue($startDate); + } + // query params + if ($endDate !== null) { + $queryParams['endDate'] = ObjectSerializer::toQueryValue($endDate); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); + } + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation sendTestTemplate + * + * Send a template to your test list + * + * @param int $templateId Id of the template (required) + * @param \Brevo\Client\Model\SendTestEmail $sendTestEmail sendTestEmail (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function sendTestTemplate($templateId, $sendTestEmail) + { + $this->sendTestTemplateWithHttpInfo($templateId, $sendTestEmail); + } + + /** + * Operation sendTestTemplateWithHttpInfo + * + * Send a template to your test list + * + * @param int $templateId Id of the template (required) + * @param \Brevo\Client\Model\SendTestEmail $sendTestEmail (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function sendTestTemplateWithHttpInfo($templateId, $sendTestEmail) + { + $returnType = ''; + $request = $this->sendTestTemplateRequest($templateId, $sendTestEmail); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\PostSendFailed', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation sendTestTemplateAsync + * + * Send a template to your test list + * + * @param int $templateId Id of the template (required) + * @param \Brevo\Client\Model\SendTestEmail $sendTestEmail (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function sendTestTemplateAsync($templateId, $sendTestEmail) + { + return $this->sendTestTemplateAsyncWithHttpInfo($templateId, $sendTestEmail) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation sendTestTemplateAsyncWithHttpInfo + * + * Send a template to your test list + * + * @param int $templateId Id of the template (required) + * @param \Brevo\Client\Model\SendTestEmail $sendTestEmail (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function sendTestTemplateAsyncWithHttpInfo($templateId, $sendTestEmail) + { + $returnType = ''; + $request = $this->sendTestTemplateRequest($templateId, $sendTestEmail); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'sendTestTemplate' + * + * @param int $templateId Id of the template (required) + * @param \Brevo\Client\Model\SendTestEmail $sendTestEmail (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function sendTestTemplateRequest($templateId, $sendTestEmail) + { + // verify the required parameter 'templateId' is set + if ($templateId === null || (is_array($templateId) && count($templateId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $templateId when calling sendTestTemplate' + ); + } + // verify the required parameter 'sendTestEmail' is set + if ($sendTestEmail === null || (is_array($sendTestEmail) && count($sendTestEmail) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $sendTestEmail when calling sendTestTemplate' + ); + } + + $resourcePath = '/smtp/templates/{templateId}/sendTest'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($templateId !== null) { + $resourcePath = str_replace( + '{' . 'templateId' . '}', + ObjectSerializer::toPathValue($templateId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($sendTestEmail)) { + $_tempBody = $sendTestEmail; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation sendTransacEmail + * + * Send a transactional email + * + * @param \Brevo\Client\Model\SendSmtpEmail $sendSmtpEmail Values to send a transactional email (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\CreateSmtpEmail + */ + public function sendTransacEmail($sendSmtpEmail) + { + list($response) = $this->sendTransacEmailWithHttpInfo($sendSmtpEmail); + return $response; + } + + /** + * Operation sendTransacEmailWithHttpInfo + * + * Send a transactional email + * + * @param \Brevo\Client\Model\SendSmtpEmail $sendSmtpEmail Values to send a transactional email (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\CreateSmtpEmail, HTTP status code, HTTP response headers (array of strings) + */ + public function sendTransacEmailWithHttpInfo($sendSmtpEmail) + { + $returnType = '\Brevo\Client\Model\CreateSmtpEmail'; + $request = $this->sendTransacEmailRequest($sendSmtpEmail); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\CreateSmtpEmail', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 202: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ScheduleSmtpEmail', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation sendTransacEmailAsync + * + * Send a transactional email + * + * @param \Brevo\Client\Model\SendSmtpEmail $sendSmtpEmail Values to send a transactional email (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function sendTransacEmailAsync($sendSmtpEmail) + { + return $this->sendTransacEmailAsyncWithHttpInfo($sendSmtpEmail) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation sendTransacEmailAsyncWithHttpInfo + * + * Send a transactional email + * + * @param \Brevo\Client\Model\SendSmtpEmail $sendSmtpEmail Values to send a transactional email (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function sendTransacEmailAsyncWithHttpInfo($sendSmtpEmail) + { + $returnType = '\Brevo\Client\Model\CreateSmtpEmail'; + $request = $this->sendTransacEmailRequest($sendSmtpEmail); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'sendTransacEmail' + * + * @param \Brevo\Client\Model\SendSmtpEmail $sendSmtpEmail Values to send a transactional email (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function sendTransacEmailRequest($sendSmtpEmail) + { + // verify the required parameter 'sendSmtpEmail' is set + if ($sendSmtpEmail === null || (is_array($sendSmtpEmail) && count($sendSmtpEmail) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $sendSmtpEmail when calling sendTransacEmail' + ); + } + + $resourcePath = '/smtp/email'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($sendSmtpEmail)) { + $_tempBody = $sendSmtpEmail; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation smtpBlockedContactsEmailDelete + * + * Unblock or resubscribe a transactional contact + * + * @param string $email contact email (urlencoded) to unblock. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function smtpBlockedContactsEmailDelete($email) + { + $this->smtpBlockedContactsEmailDeleteWithHttpInfo($email); + } + + /** + * Operation smtpBlockedContactsEmailDeleteWithHttpInfo + * + * Unblock or resubscribe a transactional contact + * + * @param string $email contact email (urlencoded) to unblock. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function smtpBlockedContactsEmailDeleteWithHttpInfo($email) + { + $returnType = ''; + $request = $this->smtpBlockedContactsEmailDeleteRequest($email); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation smtpBlockedContactsEmailDeleteAsync + * + * Unblock or resubscribe a transactional contact + * + * @param string $email contact email (urlencoded) to unblock. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function smtpBlockedContactsEmailDeleteAsync($email) + { + return $this->smtpBlockedContactsEmailDeleteAsyncWithHttpInfo($email) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation smtpBlockedContactsEmailDeleteAsyncWithHttpInfo + * + * Unblock or resubscribe a transactional contact + * + * @param string $email contact email (urlencoded) to unblock. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function smtpBlockedContactsEmailDeleteAsyncWithHttpInfo($email) + { + $returnType = ''; + $request = $this->smtpBlockedContactsEmailDeleteRequest($email); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'smtpBlockedContactsEmailDelete' + * + * @param string $email contact email (urlencoded) to unblock. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function smtpBlockedContactsEmailDeleteRequest($email) + { + // verify the required parameter 'email' is set + if ($email === null || (is_array($email) && count($email) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $email when calling smtpBlockedContactsEmailDelete' + ); + } + + $resourcePath = '/smtp/blockedContacts/{email}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($email !== null) { + $resourcePath = str_replace( + '{' . 'email' . '}', + ObjectSerializer::toPathValue($email), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation smtpLogIdentifierDelete + * + * Delete an SMTP transactional log + * + * @param string $identifier MessageId or Email of the transactional log(s) to delete (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function smtpLogIdentifierDelete($identifier) + { + $this->smtpLogIdentifierDeleteWithHttpInfo($identifier); + } + + /** + * Operation smtpLogIdentifierDeleteWithHttpInfo + * + * Delete an SMTP transactional log + * + * @param string $identifier MessageId or Email of the transactional log(s) to delete (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function smtpLogIdentifierDeleteWithHttpInfo($identifier) + { + $returnType = ''; + $request = $this->smtpLogIdentifierDeleteRequest($identifier); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation smtpLogIdentifierDeleteAsync + * + * Delete an SMTP transactional log + * + * @param string $identifier MessageId or Email of the transactional log(s) to delete (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function smtpLogIdentifierDeleteAsync($identifier) + { + return $this->smtpLogIdentifierDeleteAsyncWithHttpInfo($identifier) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation smtpLogIdentifierDeleteAsyncWithHttpInfo + * + * Delete an SMTP transactional log + * + * @param string $identifier MessageId or Email of the transactional log(s) to delete (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function smtpLogIdentifierDeleteAsyncWithHttpInfo($identifier) + { + $returnType = ''; + $request = $this->smtpLogIdentifierDeleteRequest($identifier); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'smtpLogIdentifierDelete' + * + * @param string $identifier MessageId or Email of the transactional log(s) to delete (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function smtpLogIdentifierDeleteRequest($identifier) + { + // verify the required parameter 'identifier' is set + if ($identifier === null || (is_array($identifier) && count($identifier) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $identifier when calling smtpLogIdentifierDelete' + ); + } + + $resourcePath = '/smtp/log/{identifier}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($identifier !== null) { + $resourcePath = str_replace( + '{' . 'identifier' . '}', + ObjectSerializer::toPathValue($identifier), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation updateSmtpTemplate + * + * Update an email template + * + * @param int $templateId id of the template (required) + * @param \Brevo\Client\Model\UpdateSmtpTemplate $smtpTemplate values to update in transactional email template (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function updateSmtpTemplate($templateId, $smtpTemplate) + { + $this->updateSmtpTemplateWithHttpInfo($templateId, $smtpTemplate); + } + + /** + * Operation updateSmtpTemplateWithHttpInfo + * + * Update an email template + * + * @param int $templateId id of the template (required) + * @param \Brevo\Client\Model\UpdateSmtpTemplate $smtpTemplate values to update in transactional email template (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function updateSmtpTemplateWithHttpInfo($templateId, $smtpTemplate) + { + $returnType = ''; + $request = $this->updateSmtpTemplateRequest($templateId, $smtpTemplate); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation updateSmtpTemplateAsync + * + * Update an email template + * + * @param int $templateId id of the template (required) + * @param \Brevo\Client\Model\UpdateSmtpTemplate $smtpTemplate values to update in transactional email template (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateSmtpTemplateAsync($templateId, $smtpTemplate) + { + return $this->updateSmtpTemplateAsyncWithHttpInfo($templateId, $smtpTemplate) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateSmtpTemplateAsyncWithHttpInfo + * + * Update an email template + * + * @param int $templateId id of the template (required) + * @param \Brevo\Client\Model\UpdateSmtpTemplate $smtpTemplate values to update in transactional email template (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateSmtpTemplateAsyncWithHttpInfo($templateId, $smtpTemplate) + { + $returnType = ''; + $request = $this->updateSmtpTemplateRequest($templateId, $smtpTemplate); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'updateSmtpTemplate' + * + * @param int $templateId id of the template (required) + * @param \Brevo\Client\Model\UpdateSmtpTemplate $smtpTemplate values to update in transactional email template (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function updateSmtpTemplateRequest($templateId, $smtpTemplate) + { + // verify the required parameter 'templateId' is set + if ($templateId === null || (is_array($templateId) && count($templateId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $templateId when calling updateSmtpTemplate' + ); + } + // verify the required parameter 'smtpTemplate' is set + if ($smtpTemplate === null || (is_array($smtpTemplate) && count($smtpTemplate) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $smtpTemplate when calling updateSmtpTemplate' + ); + } + + $resourcePath = '/smtp/templates/{templateId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($templateId !== null) { + $resourcePath = str_replace( + '{' . 'templateId' . '}', + ObjectSerializer::toPathValue($templateId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($smtpTemplate)) { + $_tempBody = $smtpTemplate; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/vendor/getbrevo/brevo-php/lib/Api/TransactionalSMSApi.php b/vendor/getbrevo/brevo-php/lib/Api/TransactionalSMSApi.php new file mode 100644 index 0000000..c046b63 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Api/TransactionalSMSApi.php @@ -0,0 +1,1368 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation getSmsEvents + * + * Get all your SMS activity (unaggregated events) + * + * @param int $limit Number of documents per page (optional, default to 50) + * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param string $phoneNumber Filter the report for a specific phone number (optional) + * @param string $event Filter the report for specific events (optional) + * @param string $tags Filter the report for specific tags passed as a serialized urlencoded array (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetSmsEventReport + */ + public function getSmsEvents($limit = '50', $startDate = null, $endDate = null, $offset = '0', $days = null, $phoneNumber = null, $event = null, $tags = null, $sort = 'desc') + { + list($response) = $this->getSmsEventsWithHttpInfo($limit, $startDate, $endDate, $offset, $days, $phoneNumber, $event, $tags, $sort); + return $response; + } + + /** + * Operation getSmsEventsWithHttpInfo + * + * Get all your SMS activity (unaggregated events) + * + * @param int $limit Number of documents per page (optional, default to 50) + * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param string $phoneNumber Filter the report for a specific phone number (optional) + * @param string $event Filter the report for specific events (optional) + * @param string $tags Filter the report for specific tags passed as a serialized urlencoded array (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetSmsEventReport, HTTP status code, HTTP response headers (array of strings) + */ + public function getSmsEventsWithHttpInfo($limit = '50', $startDate = null, $endDate = null, $offset = '0', $days = null, $phoneNumber = null, $event = null, $tags = null, $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetSmsEventReport'; + $request = $this->getSmsEventsRequest($limit, $startDate, $endDate, $offset, $days, $phoneNumber, $event, $tags, $sort); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetSmsEventReport', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getSmsEventsAsync + * + * Get all your SMS activity (unaggregated events) + * + * @param int $limit Number of documents per page (optional, default to 50) + * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param string $phoneNumber Filter the report for a specific phone number (optional) + * @param string $event Filter the report for specific events (optional) + * @param string $tags Filter the report for specific tags passed as a serialized urlencoded array (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getSmsEventsAsync($limit = '50', $startDate = null, $endDate = null, $offset = '0', $days = null, $phoneNumber = null, $event = null, $tags = null, $sort = 'desc') + { + return $this->getSmsEventsAsyncWithHttpInfo($limit, $startDate, $endDate, $offset, $days, $phoneNumber, $event, $tags, $sort) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getSmsEventsAsyncWithHttpInfo + * + * Get all your SMS activity (unaggregated events) + * + * @param int $limit Number of documents per page (optional, default to 50) + * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param string $phoneNumber Filter the report for a specific phone number (optional) + * @param string $event Filter the report for specific events (optional) + * @param string $tags Filter the report for specific tags passed as a serialized urlencoded array (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getSmsEventsAsyncWithHttpInfo($limit = '50', $startDate = null, $endDate = null, $offset = '0', $days = null, $phoneNumber = null, $event = null, $tags = null, $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetSmsEventReport'; + $request = $this->getSmsEventsRequest($limit, $startDate, $endDate, $offset, $days, $phoneNumber, $event, $tags, $sort); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getSmsEvents' + * + * @param int $limit Number of documents per page (optional, default to 50) + * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + * @param int $offset Index of the first document of the page (optional, default to 0) + * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param string $phoneNumber Filter the report for a specific phone number (optional) + * @param string $event Filter the report for specific events (optional) + * @param string $tags Filter the report for specific tags passed as a serialized urlencoded array (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getSmsEventsRequest($limit = '50', $startDate = null, $endDate = null, $offset = '0', $days = null, $phoneNumber = null, $event = null, $tags = null, $sort = 'desc') + { + if ($limit !== null && $limit > 100) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling TransactionalSMSApi.getSmsEvents, must be smaller than or equal to 100.'); + } + + + $resourcePath = '/transactionalSMS/statistics/events'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + // query params + if ($startDate !== null) { + $queryParams['startDate'] = ObjectSerializer::toQueryValue($startDate); + } + // query params + if ($endDate !== null) { + $queryParams['endDate'] = ObjectSerializer::toQueryValue($endDate); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + // query params + if ($days !== null) { + $queryParams['days'] = ObjectSerializer::toQueryValue($days); + } + // query params + if ($phoneNumber !== null) { + $queryParams['phoneNumber'] = ObjectSerializer::toQueryValue($phoneNumber); + } + // query params + if ($event !== null) { + $queryParams['event'] = ObjectSerializer::toQueryValue($event); + } + // query params + if ($tags !== null) { + $queryParams['tags'] = ObjectSerializer::toQueryValue($tags); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getTransacAggregatedSmsReport + * + * Get your SMS activity aggregated over a period of time + * + * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + * @param int $days Number of days in the past including today (positive integer). Not compatible with startDate and endDate (optional) + * @param string $tag Filter on a tag (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetTransacAggregatedSmsReport + */ + public function getTransacAggregatedSmsReport($startDate = null, $endDate = null, $days = null, $tag = null) + { + list($response) = $this->getTransacAggregatedSmsReportWithHttpInfo($startDate, $endDate, $days, $tag); + return $response; + } + + /** + * Operation getTransacAggregatedSmsReportWithHttpInfo + * + * Get your SMS activity aggregated over a period of time + * + * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + * @param int $days Number of days in the past including today (positive integer). Not compatible with startDate and endDate (optional) + * @param string $tag Filter on a tag (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetTransacAggregatedSmsReport, HTTP status code, HTTP response headers (array of strings) + */ + public function getTransacAggregatedSmsReportWithHttpInfo($startDate = null, $endDate = null, $days = null, $tag = null) + { + $returnType = '\Brevo\Client\Model\GetTransacAggregatedSmsReport'; + $request = $this->getTransacAggregatedSmsReportRequest($startDate, $endDate, $days, $tag); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetTransacAggregatedSmsReport', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getTransacAggregatedSmsReportAsync + * + * Get your SMS activity aggregated over a period of time + * + * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + * @param int $days Number of days in the past including today (positive integer). Not compatible with startDate and endDate (optional) + * @param string $tag Filter on a tag (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getTransacAggregatedSmsReportAsync($startDate = null, $endDate = null, $days = null, $tag = null) + { + return $this->getTransacAggregatedSmsReportAsyncWithHttpInfo($startDate, $endDate, $days, $tag) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getTransacAggregatedSmsReportAsyncWithHttpInfo + * + * Get your SMS activity aggregated over a period of time + * + * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + * @param int $days Number of days in the past including today (positive integer). Not compatible with startDate and endDate (optional) + * @param string $tag Filter on a tag (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getTransacAggregatedSmsReportAsyncWithHttpInfo($startDate = null, $endDate = null, $days = null, $tag = null) + { + $returnType = '\Brevo\Client\Model\GetTransacAggregatedSmsReport'; + $request = $this->getTransacAggregatedSmsReportRequest($startDate, $endDate, $days, $tag); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getTransacAggregatedSmsReport' + * + * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + * @param int $days Number of days in the past including today (positive integer). Not compatible with startDate and endDate (optional) + * @param string $tag Filter on a tag (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getTransacAggregatedSmsReportRequest($startDate = null, $endDate = null, $days = null, $tag = null) + { + + $resourcePath = '/transactionalSMS/statistics/aggregatedReport'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($startDate !== null) { + $queryParams['startDate'] = ObjectSerializer::toQueryValue($startDate); + } + // query params + if ($endDate !== null) { + $queryParams['endDate'] = ObjectSerializer::toQueryValue($endDate); + } + // query params + if ($days !== null) { + $queryParams['days'] = ObjectSerializer::toQueryValue($days); + } + // query params + if ($tag !== null) { + $queryParams['tag'] = ObjectSerializer::toQueryValue($tag); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getTransacSmsReport + * + * Get your SMS activity aggregated per day + * + * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param string $tag Filter on a tag (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetTransacSmsReport + */ + public function getTransacSmsReport($startDate = null, $endDate = null, $days = null, $tag = null, $sort = 'desc') + { + list($response) = $this->getTransacSmsReportWithHttpInfo($startDate, $endDate, $days, $tag, $sort); + return $response; + } + + /** + * Operation getTransacSmsReportWithHttpInfo + * + * Get your SMS activity aggregated per day + * + * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param string $tag Filter on a tag (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetTransacSmsReport, HTTP status code, HTTP response headers (array of strings) + */ + public function getTransacSmsReportWithHttpInfo($startDate = null, $endDate = null, $days = null, $tag = null, $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetTransacSmsReport'; + $request = $this->getTransacSmsReportRequest($startDate, $endDate, $days, $tag, $sort); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetTransacSmsReport', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getTransacSmsReportAsync + * + * Get your SMS activity aggregated per day + * + * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param string $tag Filter on a tag (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getTransacSmsReportAsync($startDate = null, $endDate = null, $days = null, $tag = null, $sort = 'desc') + { + return $this->getTransacSmsReportAsyncWithHttpInfo($startDate, $endDate, $days, $tag, $sort) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getTransacSmsReportAsyncWithHttpInfo + * + * Get your SMS activity aggregated per day + * + * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param string $tag Filter on a tag (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getTransacSmsReportAsyncWithHttpInfo($startDate = null, $endDate = null, $days = null, $tag = null, $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetTransacSmsReport'; + $request = $this->getTransacSmsReportRequest($startDate, $endDate, $days, $tag, $sort); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getTransacSmsReport' + * + * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param string $tag Filter on a tag (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getTransacSmsReportRequest($startDate = null, $endDate = null, $days = null, $tag = null, $sort = 'desc') + { + + $resourcePath = '/transactionalSMS/statistics/reports'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($startDate !== null) { + $queryParams['startDate'] = ObjectSerializer::toQueryValue($startDate); + } + // query params + if ($endDate !== null) { + $queryParams['endDate'] = ObjectSerializer::toQueryValue($endDate); + } + // query params + if ($days !== null) { + $queryParams['days'] = ObjectSerializer::toQueryValue($days); + } + // query params + if ($tag !== null) { + $queryParams['tag'] = ObjectSerializer::toQueryValue($tag); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation sendTransacSms + * + * Send SMS message to a mobile number + * + * @param \Brevo\Client\Model\SendTransacSms $sendTransacSms Values to send a transactional SMS (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\SendSms + */ + public function sendTransacSms($sendTransacSms) + { + list($response) = $this->sendTransacSmsWithHttpInfo($sendTransacSms); + return $response; + } + + /** + * Operation sendTransacSmsWithHttpInfo + * + * Send SMS message to a mobile number + * + * @param \Brevo\Client\Model\SendTransacSms $sendTransacSms Values to send a transactional SMS (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\SendSms, HTTP status code, HTTP response headers (array of strings) + */ + public function sendTransacSmsWithHttpInfo($sendTransacSms) + { + $returnType = '\Brevo\Client\Model\SendSms'; + $request = $this->sendTransacSmsRequest($sendTransacSms); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\SendSms', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 402: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation sendTransacSmsAsync + * + * Send SMS message to a mobile number + * + * @param \Brevo\Client\Model\SendTransacSms $sendTransacSms Values to send a transactional SMS (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function sendTransacSmsAsync($sendTransacSms) + { + return $this->sendTransacSmsAsyncWithHttpInfo($sendTransacSms) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation sendTransacSmsAsyncWithHttpInfo + * + * Send SMS message to a mobile number + * + * @param \Brevo\Client\Model\SendTransacSms $sendTransacSms Values to send a transactional SMS (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function sendTransacSmsAsyncWithHttpInfo($sendTransacSms) + { + $returnType = '\Brevo\Client\Model\SendSms'; + $request = $this->sendTransacSmsRequest($sendTransacSms); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'sendTransacSms' + * + * @param \Brevo\Client\Model\SendTransacSms $sendTransacSms Values to send a transactional SMS (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function sendTransacSmsRequest($sendTransacSms) + { + // verify the required parameter 'sendTransacSms' is set + if ($sendTransacSms === null || (is_array($sendTransacSms) && count($sendTransacSms) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $sendTransacSms when calling sendTransacSms' + ); + } + + $resourcePath = '/transactionalSMS/sms'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($sendTransacSms)) { + $_tempBody = $sendTransacSms; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/vendor/getbrevo/brevo-php/lib/Api/TransactionalWhatsAppApi.php b/vendor/getbrevo/brevo-php/lib/Api/TransactionalWhatsAppApi.php new file mode 100644 index 0000000..3bec4c2 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Api/TransactionalWhatsAppApi.php @@ -0,0 +1,737 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation getWhatsappEventReport + * + * Get all your WhatsApp activity (unaggregated events) + * + * @param int $limit Number limitation for the result returned (optional, default to 2500) + * @param int $offset Beginning point in the list to retrieve from (optional, default to 0) + * @param string $startDate **Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + * @param string $endDate **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + * @param int $days Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ (optional) + * @param string $contactNumber Filter results for specific contact (WhatsApp Number with country code. Example, 85264318721) (optional) + * @param string $event Filter the report for a specific event type (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetWhatsappEventReport + */ + public function getWhatsappEventReport($limit = '2500', $offset = '0', $startDate = null, $endDate = null, $days = null, $contactNumber = null, $event = null, $sort = 'desc') + { + list($response) = $this->getWhatsappEventReportWithHttpInfo($limit, $offset, $startDate, $endDate, $days, $contactNumber, $event, $sort); + return $response; + } + + /** + * Operation getWhatsappEventReportWithHttpInfo + * + * Get all your WhatsApp activity (unaggregated events) + * + * @param int $limit Number limitation for the result returned (optional, default to 2500) + * @param int $offset Beginning point in the list to retrieve from (optional, default to 0) + * @param string $startDate **Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + * @param string $endDate **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + * @param int $days Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ (optional) + * @param string $contactNumber Filter results for specific contact (WhatsApp Number with country code. Example, 85264318721) (optional) + * @param string $event Filter the report for a specific event type (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetWhatsappEventReport, HTTP status code, HTTP response headers (array of strings) + */ + public function getWhatsappEventReportWithHttpInfo($limit = '2500', $offset = '0', $startDate = null, $endDate = null, $days = null, $contactNumber = null, $event = null, $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetWhatsappEventReport'; + $request = $this->getWhatsappEventReportRequest($limit, $offset, $startDate, $endDate, $days, $contactNumber, $event, $sort); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetWhatsappEventReport', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getWhatsappEventReportAsync + * + * Get all your WhatsApp activity (unaggregated events) + * + * @param int $limit Number limitation for the result returned (optional, default to 2500) + * @param int $offset Beginning point in the list to retrieve from (optional, default to 0) + * @param string $startDate **Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + * @param string $endDate **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + * @param int $days Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ (optional) + * @param string $contactNumber Filter results for specific contact (WhatsApp Number with country code. Example, 85264318721) (optional) + * @param string $event Filter the report for a specific event type (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getWhatsappEventReportAsync($limit = '2500', $offset = '0', $startDate = null, $endDate = null, $days = null, $contactNumber = null, $event = null, $sort = 'desc') + { + return $this->getWhatsappEventReportAsyncWithHttpInfo($limit, $offset, $startDate, $endDate, $days, $contactNumber, $event, $sort) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getWhatsappEventReportAsyncWithHttpInfo + * + * Get all your WhatsApp activity (unaggregated events) + * + * @param int $limit Number limitation for the result returned (optional, default to 2500) + * @param int $offset Beginning point in the list to retrieve from (optional, default to 0) + * @param string $startDate **Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + * @param string $endDate **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + * @param int $days Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ (optional) + * @param string $contactNumber Filter results for specific contact (WhatsApp Number with country code. Example, 85264318721) (optional) + * @param string $event Filter the report for a specific event type (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getWhatsappEventReportAsyncWithHttpInfo($limit = '2500', $offset = '0', $startDate = null, $endDate = null, $days = null, $contactNumber = null, $event = null, $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetWhatsappEventReport'; + $request = $this->getWhatsappEventReportRequest($limit, $offset, $startDate, $endDate, $days, $contactNumber, $event, $sort); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getWhatsappEventReport' + * + * @param int $limit Number limitation for the result returned (optional, default to 2500) + * @param int $offset Beginning point in the list to retrieve from (optional, default to 0) + * @param string $startDate **Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + * @param string $endDate **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + * @param int $days Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ (optional) + * @param string $contactNumber Filter results for specific contact (WhatsApp Number with country code. Example, 85264318721) (optional) + * @param string $event Filter the report for a specific event type (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getWhatsappEventReportRequest($limit = '2500', $offset = '0', $startDate = null, $endDate = null, $days = null, $contactNumber = null, $event = null, $sort = 'desc') + { + if ($limit !== null && $limit > 5000) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling TransactionalWhatsAppApi.getWhatsappEventReport, must be smaller than or equal to 5000.'); + } + if ($limit !== null && $limit < 0) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling TransactionalWhatsAppApi.getWhatsappEventReport, must be bigger than or equal to 0.'); + } + + + $resourcePath = '/whatsapp/statistics/events'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + // query params + if ($startDate !== null) { + $queryParams['startDate'] = ObjectSerializer::toQueryValue($startDate); + } + // query params + if ($endDate !== null) { + $queryParams['endDate'] = ObjectSerializer::toQueryValue($endDate); + } + // query params + if ($days !== null) { + $queryParams['days'] = ObjectSerializer::toQueryValue($days); + } + // query params + if ($contactNumber !== null) { + $queryParams['contactNumber'] = ObjectSerializer::toQueryValue($contactNumber); + } + // query params + if ($event !== null) { + $queryParams['event'] = ObjectSerializer::toQueryValue($event); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation sendWhatsappMessage + * + * Send a WhatsApp message + * + * @param \Brevo\Client\Model\SendWhatsappMessage $sendWhatsappMessage Values to send WhatsApp message (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\InlineResponse2014 + */ + public function sendWhatsappMessage($sendWhatsappMessage) + { + list($response) = $this->sendWhatsappMessageWithHttpInfo($sendWhatsappMessage); + return $response; + } + + /** + * Operation sendWhatsappMessageWithHttpInfo + * + * Send a WhatsApp message + * + * @param \Brevo\Client\Model\SendWhatsappMessage $sendWhatsappMessage Values to send WhatsApp message (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\InlineResponse2014, HTTP status code, HTTP response headers (array of strings) + */ + public function sendWhatsappMessageWithHttpInfo($sendWhatsappMessage) + { + $returnType = '\Brevo\Client\Model\InlineResponse2014'; + $request = $this->sendWhatsappMessageRequest($sendWhatsappMessage); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\InlineResponse2014', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation sendWhatsappMessageAsync + * + * Send a WhatsApp message + * + * @param \Brevo\Client\Model\SendWhatsappMessage $sendWhatsappMessage Values to send WhatsApp message (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function sendWhatsappMessageAsync($sendWhatsappMessage) + { + return $this->sendWhatsappMessageAsyncWithHttpInfo($sendWhatsappMessage) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation sendWhatsappMessageAsyncWithHttpInfo + * + * Send a WhatsApp message + * + * @param \Brevo\Client\Model\SendWhatsappMessage $sendWhatsappMessage Values to send WhatsApp message (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function sendWhatsappMessageAsyncWithHttpInfo($sendWhatsappMessage) + { + $returnType = '\Brevo\Client\Model\InlineResponse2014'; + $request = $this->sendWhatsappMessageRequest($sendWhatsappMessage); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'sendWhatsappMessage' + * + * @param \Brevo\Client\Model\SendWhatsappMessage $sendWhatsappMessage Values to send WhatsApp message (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function sendWhatsappMessageRequest($sendWhatsappMessage) + { + // verify the required parameter 'sendWhatsappMessage' is set + if ($sendWhatsappMessage === null || (is_array($sendWhatsappMessage) && count($sendWhatsappMessage) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $sendWhatsappMessage when calling sendWhatsappMessage' + ); + } + + $resourcePath = '/whatsapp/sendMessage'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($sendWhatsappMessage)) { + $_tempBody = $sendWhatsappMessage; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/vendor/getbrevo/brevo-php/lib/Api/UserApi.php b/vendor/getbrevo/brevo-php/lib/Api/UserApi.php new file mode 100644 index 0000000..34298d7 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Api/UserApi.php @@ -0,0 +1,1820 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation editUserPermission + * + * Update permission for a user + * + * @param \Brevo\Client\Model\Inviteuser $updatePermissions Values to update permissions for an invited user (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\Inviteuser + */ + public function editUserPermission($updatePermissions) + { + list($response) = $this->editUserPermissionWithHttpInfo($updatePermissions); + return $response; + } + + /** + * Operation editUserPermissionWithHttpInfo + * + * Update permission for a user + * + * @param \Brevo\Client\Model\Inviteuser $updatePermissions Values to update permissions for an invited user (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\Inviteuser, HTTP status code, HTTP response headers (array of strings) + */ + public function editUserPermissionWithHttpInfo($updatePermissions) + { + $returnType = '\Brevo\Client\Model\Inviteuser'; + $request = $this->editUserPermissionRequest($updatePermissions); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\Inviteuser', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation editUserPermissionAsync + * + * Update permission for a user + * + * @param \Brevo\Client\Model\Inviteuser $updatePermissions Values to update permissions for an invited user (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function editUserPermissionAsync($updatePermissions) + { + return $this->editUserPermissionAsyncWithHttpInfo($updatePermissions) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation editUserPermissionAsyncWithHttpInfo + * + * Update permission for a user + * + * @param \Brevo\Client\Model\Inviteuser $updatePermissions Values to update permissions for an invited user (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function editUserPermissionAsyncWithHttpInfo($updatePermissions) + { + $returnType = '\Brevo\Client\Model\Inviteuser'; + $request = $this->editUserPermissionRequest($updatePermissions); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'editUserPermission' + * + * @param \Brevo\Client\Model\Inviteuser $updatePermissions Values to update permissions for an invited user (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function editUserPermissionRequest($updatePermissions) + { + // verify the required parameter 'updatePermissions' is set + if ($updatePermissions === null || (is_array($updatePermissions) && count($updatePermissions) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $updatePermissions when calling editUserPermission' + ); + } + + $resourcePath = '/organization/user/update/permissions'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($updatePermissions)) { + $_tempBody = $updatePermissions; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getInvitedUsersList + * + * Get the list of all your users + * + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetInvitedUsersList + */ + public function getInvitedUsersList() + { + list($response) = $this->getInvitedUsersListWithHttpInfo(); + return $response; + } + + /** + * Operation getInvitedUsersListWithHttpInfo + * + * Get the list of all your users + * + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetInvitedUsersList, HTTP status code, HTTP response headers (array of strings) + */ + public function getInvitedUsersListWithHttpInfo() + { + $returnType = '\Brevo\Client\Model\GetInvitedUsersList'; + $request = $this->getInvitedUsersListRequest(); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetInvitedUsersList', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getInvitedUsersListAsync + * + * Get the list of all your users + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getInvitedUsersListAsync() + { + return $this->getInvitedUsersListAsyncWithHttpInfo() + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getInvitedUsersListAsyncWithHttpInfo + * + * Get the list of all your users + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getInvitedUsersListAsyncWithHttpInfo() + { + $returnType = '\Brevo\Client\Model\GetInvitedUsersList'; + $request = $this->getInvitedUsersListRequest(); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getInvitedUsersList' + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getInvitedUsersListRequest() + { + + $resourcePath = '/organization/invited/users'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getUserPermission + * + * Check user permission + * + * @param string $email Email of the invited user. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetUserPermission + */ + public function getUserPermission($email) + { + list($response) = $this->getUserPermissionWithHttpInfo($email); + return $response; + } + + /** + * Operation getUserPermissionWithHttpInfo + * + * Check user permission + * + * @param string $email Email of the invited user. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetUserPermission, HTTP status code, HTTP response headers (array of strings) + */ + public function getUserPermissionWithHttpInfo($email) + { + $returnType = '\Brevo\Client\Model\GetUserPermission'; + $request = $this->getUserPermissionRequest($email); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetUserPermission', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getUserPermissionAsync + * + * Check user permission + * + * @param string $email Email of the invited user. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getUserPermissionAsync($email) + { + return $this->getUserPermissionAsyncWithHttpInfo($email) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getUserPermissionAsyncWithHttpInfo + * + * Check user permission + * + * @param string $email Email of the invited user. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getUserPermissionAsyncWithHttpInfo($email) + { + $returnType = '\Brevo\Client\Model\GetUserPermission'; + $request = $this->getUserPermissionRequest($email); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getUserPermission' + * + * @param string $email Email of the invited user. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getUserPermissionRequest($email) + { + // verify the required parameter 'email' is set + if ($email === null || (is_array($email) && count($email) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $email when calling getUserPermission' + ); + } + + $resourcePath = '/organization/user/{email}/permissions'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($email !== null) { + $resourcePath = str_replace( + '{' . 'email' . '}', + ObjectSerializer::toPathValue($email), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation inviteuser + * + * Send invitation to user + * + * @param \Brevo\Client\Model\Inviteuser $sendInvitation Values to create an invitation (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\Inviteuser + */ + public function inviteuser($sendInvitation) + { + list($response) = $this->inviteuserWithHttpInfo($sendInvitation); + return $response; + } + + /** + * Operation inviteuserWithHttpInfo + * + * Send invitation to user + * + * @param \Brevo\Client\Model\Inviteuser $sendInvitation Values to create an invitation (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\Inviteuser, HTTP status code, HTTP response headers (array of strings) + */ + public function inviteuserWithHttpInfo($sendInvitation) + { + $returnType = '\Brevo\Client\Model\Inviteuser'; + $request = $this->inviteuserRequest($sendInvitation); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\Inviteuser', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation inviteuserAsync + * + * Send invitation to user + * + * @param \Brevo\Client\Model\Inviteuser $sendInvitation Values to create an invitation (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function inviteuserAsync($sendInvitation) + { + return $this->inviteuserAsyncWithHttpInfo($sendInvitation) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation inviteuserAsyncWithHttpInfo + * + * Send invitation to user + * + * @param \Brevo\Client\Model\Inviteuser $sendInvitation Values to create an invitation (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function inviteuserAsyncWithHttpInfo($sendInvitation) + { + $returnType = '\Brevo\Client\Model\Inviteuser'; + $request = $this->inviteuserRequest($sendInvitation); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'inviteuser' + * + * @param \Brevo\Client\Model\Inviteuser $sendInvitation Values to create an invitation (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function inviteuserRequest($sendInvitation) + { + // verify the required parameter 'sendInvitation' is set + if ($sendInvitation === null || (is_array($sendInvitation) && count($sendInvitation) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $sendInvitation when calling inviteuser' + ); + } + + $resourcePath = '/organization/user/invitation/send'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($sendInvitation)) { + $_tempBody = $sendInvitation; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation putRevokeUserPermission + * + * Revoke user permission + * + * @param string $email Email of the invited user. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\PutRevokeUserPermission + */ + public function putRevokeUserPermission($email) + { + list($response) = $this->putRevokeUserPermissionWithHttpInfo($email); + return $response; + } + + /** + * Operation putRevokeUserPermissionWithHttpInfo + * + * Revoke user permission + * + * @param string $email Email of the invited user. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\PutRevokeUserPermission, HTTP status code, HTTP response headers (array of strings) + */ + public function putRevokeUserPermissionWithHttpInfo($email) + { + $returnType = '\Brevo\Client\Model\PutRevokeUserPermission'; + $request = $this->putRevokeUserPermissionRequest($email); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\PutRevokeUserPermission', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation putRevokeUserPermissionAsync + * + * Revoke user permission + * + * @param string $email Email of the invited user. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function putRevokeUserPermissionAsync($email) + { + return $this->putRevokeUserPermissionAsyncWithHttpInfo($email) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation putRevokeUserPermissionAsyncWithHttpInfo + * + * Revoke user permission + * + * @param string $email Email of the invited user. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function putRevokeUserPermissionAsyncWithHttpInfo($email) + { + $returnType = '\Brevo\Client\Model\PutRevokeUserPermission'; + $request = $this->putRevokeUserPermissionRequest($email); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'putRevokeUserPermission' + * + * @param string $email Email of the invited user. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function putRevokeUserPermissionRequest($email) + { + // verify the required parameter 'email' is set + if ($email === null || (is_array($email) && count($email) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $email when calling putRevokeUserPermission' + ); + } + + $resourcePath = '/organization/user/invitation/revoke/{email}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($email !== null) { + $resourcePath = str_replace( + '{' . 'email' . '}', + ObjectSerializer::toPathValue($email), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation putresendcancelinvitation + * + * Resend / Cancel invitation + * + * @param string $action action (required) + * @param string $email Email of the invited user. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\Putresendcancelinvitation + */ + public function putresendcancelinvitation($action, $email) + { + list($response) = $this->putresendcancelinvitationWithHttpInfo($action, $email); + return $response; + } + + /** + * Operation putresendcancelinvitationWithHttpInfo + * + * Resend / Cancel invitation + * + * @param string $action action (required) + * @param string $email Email of the invited user. (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\Putresendcancelinvitation, HTTP status code, HTTP response headers (array of strings) + */ + public function putresendcancelinvitationWithHttpInfo($action, $email) + { + $returnType = '\Brevo\Client\Model\Putresendcancelinvitation'; + $request = $this->putresendcancelinvitationRequest($action, $email); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\Putresendcancelinvitation', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation putresendcancelinvitationAsync + * + * Resend / Cancel invitation + * + * @param string $action action (required) + * @param string $email Email of the invited user. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function putresendcancelinvitationAsync($action, $email) + { + return $this->putresendcancelinvitationAsyncWithHttpInfo($action, $email) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation putresendcancelinvitationAsyncWithHttpInfo + * + * Resend / Cancel invitation + * + * @param string $action action (required) + * @param string $email Email of the invited user. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function putresendcancelinvitationAsyncWithHttpInfo($action, $email) + { + $returnType = '\Brevo\Client\Model\Putresendcancelinvitation'; + $request = $this->putresendcancelinvitationRequest($action, $email); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'putresendcancelinvitation' + * + * @param string $action action (required) + * @param string $email Email of the invited user. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function putresendcancelinvitationRequest($action, $email) + { + // verify the required parameter 'action' is set + if ($action === null || (is_array($action) && count($action) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $action when calling putresendcancelinvitation' + ); + } + // verify the required parameter 'email' is set + if ($email === null || (is_array($email) && count($email) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $email when calling putresendcancelinvitation' + ); + } + + $resourcePath = '/organization/user/invitation/{action}/{email}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($action !== null) { + $resourcePath = str_replace( + '{' . 'action' . '}', + ObjectSerializer::toPathValue($action), + $resourcePath + ); + } + // path params + if ($email !== null) { + $resourcePath = str_replace( + '{' . 'email' . '}', + ObjectSerializer::toPathValue($email), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/vendor/getbrevo/brevo-php/lib/Api/WebhooksApi.php b/vendor/getbrevo/brevo-php/lib/Api/WebhooksApi.php new file mode 100644 index 0000000..67c6096 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Api/WebhooksApi.php @@ -0,0 +1,1783 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation createWebhook + * + * Create a webhook + * + * @param \Brevo\Client\Model\CreateWebhook $createWebhook Values to create a webhook (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\CreateModel + */ + public function createWebhook($createWebhook) + { + list($response) = $this->createWebhookWithHttpInfo($createWebhook); + return $response; + } + + /** + * Operation createWebhookWithHttpInfo + * + * Create a webhook + * + * @param \Brevo\Client\Model\CreateWebhook $createWebhook Values to create a webhook (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\CreateModel, HTTP status code, HTTP response headers (array of strings) + */ + public function createWebhookWithHttpInfo($createWebhook) + { + $returnType = '\Brevo\Client\Model\CreateModel'; + $request = $this->createWebhookRequest($createWebhook); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\CreateModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation createWebhookAsync + * + * Create a webhook + * + * @param \Brevo\Client\Model\CreateWebhook $createWebhook Values to create a webhook (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createWebhookAsync($createWebhook) + { + return $this->createWebhookAsyncWithHttpInfo($createWebhook) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createWebhookAsyncWithHttpInfo + * + * Create a webhook + * + * @param \Brevo\Client\Model\CreateWebhook $createWebhook Values to create a webhook (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createWebhookAsyncWithHttpInfo($createWebhook) + { + $returnType = '\Brevo\Client\Model\CreateModel'; + $request = $this->createWebhookRequest($createWebhook); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createWebhook' + * + * @param \Brevo\Client\Model\CreateWebhook $createWebhook Values to create a webhook (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function createWebhookRequest($createWebhook) + { + // verify the required parameter 'createWebhook' is set + if ($createWebhook === null || (is_array($createWebhook) && count($createWebhook) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $createWebhook when calling createWebhook' + ); + } + + $resourcePath = '/webhooks'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($createWebhook)) { + $_tempBody = $createWebhook; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation deleteWebhook + * + * Delete a webhook + * + * @param int $webhookId Id of the webhook (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function deleteWebhook($webhookId) + { + $this->deleteWebhookWithHttpInfo($webhookId); + } + + /** + * Operation deleteWebhookWithHttpInfo + * + * Delete a webhook + * + * @param int $webhookId Id of the webhook (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteWebhookWithHttpInfo($webhookId) + { + $returnType = ''; + $request = $this->deleteWebhookRequest($webhookId); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation deleteWebhookAsync + * + * Delete a webhook + * + * @param int $webhookId Id of the webhook (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteWebhookAsync($webhookId) + { + return $this->deleteWebhookAsyncWithHttpInfo($webhookId) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteWebhookAsyncWithHttpInfo + * + * Delete a webhook + * + * @param int $webhookId Id of the webhook (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteWebhookAsyncWithHttpInfo($webhookId) + { + $returnType = ''; + $request = $this->deleteWebhookRequest($webhookId); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'deleteWebhook' + * + * @param int $webhookId Id of the webhook (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function deleteWebhookRequest($webhookId) + { + // verify the required parameter 'webhookId' is set + if ($webhookId === null || (is_array($webhookId) && count($webhookId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $webhookId when calling deleteWebhook' + ); + } + + $resourcePath = '/webhooks/{webhookId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($webhookId !== null) { + $resourcePath = str_replace( + '{' . 'webhookId' . '}', + ObjectSerializer::toPathValue($webhookId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation exportWebhooksHistory + * + * Export all webhook events + * + * @param \Brevo\Client\Model\ExportWebhooksHistory $exportWebhookHistory Values to submit for webhooks history (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\CreatedProcessId + */ + public function exportWebhooksHistory($exportWebhookHistory) + { + list($response) = $this->exportWebhooksHistoryWithHttpInfo($exportWebhookHistory); + return $response; + } + + /** + * Operation exportWebhooksHistoryWithHttpInfo + * + * Export all webhook events + * + * @param \Brevo\Client\Model\ExportWebhooksHistory $exportWebhookHistory Values to submit for webhooks history (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\CreatedProcessId, HTTP status code, HTTP response headers (array of strings) + */ + public function exportWebhooksHistoryWithHttpInfo($exportWebhookHistory) + { + $returnType = '\Brevo\Client\Model\CreatedProcessId'; + $request = $this->exportWebhooksHistoryRequest($exportWebhookHistory); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 202: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\CreatedProcessId', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation exportWebhooksHistoryAsync + * + * Export all webhook events + * + * @param \Brevo\Client\Model\ExportWebhooksHistory $exportWebhookHistory Values to submit for webhooks history (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function exportWebhooksHistoryAsync($exportWebhookHistory) + { + return $this->exportWebhooksHistoryAsyncWithHttpInfo($exportWebhookHistory) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation exportWebhooksHistoryAsyncWithHttpInfo + * + * Export all webhook events + * + * @param \Brevo\Client\Model\ExportWebhooksHistory $exportWebhookHistory Values to submit for webhooks history (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function exportWebhooksHistoryAsyncWithHttpInfo($exportWebhookHistory) + { + $returnType = '\Brevo\Client\Model\CreatedProcessId'; + $request = $this->exportWebhooksHistoryRequest($exportWebhookHistory); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'exportWebhooksHistory' + * + * @param \Brevo\Client\Model\ExportWebhooksHistory $exportWebhookHistory Values to submit for webhooks history (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function exportWebhooksHistoryRequest($exportWebhookHistory) + { + // verify the required parameter 'exportWebhookHistory' is set + if ($exportWebhookHistory === null || (is_array($exportWebhookHistory) && count($exportWebhookHistory) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $exportWebhookHistory when calling exportWebhooksHistory' + ); + } + + $resourcePath = '/webhooks/export'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($exportWebhookHistory)) { + $_tempBody = $exportWebhookHistory; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getWebhook + * + * Get a webhook details + * + * @param int $webhookId Id of the webhook (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetWebhook + */ + public function getWebhook($webhookId) + { + list($response) = $this->getWebhookWithHttpInfo($webhookId); + return $response; + } + + /** + * Operation getWebhookWithHttpInfo + * + * Get a webhook details + * + * @param int $webhookId Id of the webhook (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetWebhook, HTTP status code, HTTP response headers (array of strings) + */ + public function getWebhookWithHttpInfo($webhookId) + { + $returnType = '\Brevo\Client\Model\GetWebhook'; + $request = $this->getWebhookRequest($webhookId); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetWebhook', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getWebhookAsync + * + * Get a webhook details + * + * @param int $webhookId Id of the webhook (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getWebhookAsync($webhookId) + { + return $this->getWebhookAsyncWithHttpInfo($webhookId) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getWebhookAsyncWithHttpInfo + * + * Get a webhook details + * + * @param int $webhookId Id of the webhook (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getWebhookAsyncWithHttpInfo($webhookId) + { + $returnType = '\Brevo\Client\Model\GetWebhook'; + $request = $this->getWebhookRequest($webhookId); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getWebhook' + * + * @param int $webhookId Id of the webhook (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getWebhookRequest($webhookId) + { + // verify the required parameter 'webhookId' is set + if ($webhookId === null || (is_array($webhookId) && count($webhookId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $webhookId when calling getWebhook' + ); + } + + $resourcePath = '/webhooks/{webhookId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($webhookId !== null) { + $resourcePath = str_replace( + '{' . 'webhookId' . '}', + ObjectSerializer::toPathValue($webhookId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getWebhooks + * + * Get all webhooks + * + * @param string $type Filter on webhook type (optional, default to transactional) + * @param string $sort Sort the results in the ascending/descending order of webhook creation (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetWebhooks + */ + public function getWebhooks($type = 'transactional', $sort = 'desc') + { + list($response) = $this->getWebhooksWithHttpInfo($type, $sort); + return $response; + } + + /** + * Operation getWebhooksWithHttpInfo + * + * Get all webhooks + * + * @param string $type Filter on webhook type (optional, default to transactional) + * @param string $sort Sort the results in the ascending/descending order of webhook creation (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetWebhooks, HTTP status code, HTTP response headers (array of strings) + */ + public function getWebhooksWithHttpInfo($type = 'transactional', $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetWebhooks'; + $request = $this->getWebhooksRequest($type, $sort); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetWebhooks', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getWebhooksAsync + * + * Get all webhooks + * + * @param string $type Filter on webhook type (optional, default to transactional) + * @param string $sort Sort the results in the ascending/descending order of webhook creation (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getWebhooksAsync($type = 'transactional', $sort = 'desc') + { + return $this->getWebhooksAsyncWithHttpInfo($type, $sort) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getWebhooksAsyncWithHttpInfo + * + * Get all webhooks + * + * @param string $type Filter on webhook type (optional, default to transactional) + * @param string $sort Sort the results in the ascending/descending order of webhook creation (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getWebhooksAsyncWithHttpInfo($type = 'transactional', $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetWebhooks'; + $request = $this->getWebhooksRequest($type, $sort); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getWebhooks' + * + * @param string $type Filter on webhook type (optional, default to transactional) + * @param string $sort Sort the results in the ascending/descending order of webhook creation (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getWebhooksRequest($type = 'transactional', $sort = 'desc') + { + + $resourcePath = '/webhooks'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($type !== null) { + $queryParams['type'] = ObjectSerializer::toQueryValue($type); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation updateWebhook + * + * Update a webhook + * + * @param int $webhookId Id of the webhook (required) + * @param \Brevo\Client\Model\UpdateWebhook $updateWebhook Values to update a webhook (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function updateWebhook($webhookId, $updateWebhook) + { + $this->updateWebhookWithHttpInfo($webhookId, $updateWebhook); + } + + /** + * Operation updateWebhookWithHttpInfo + * + * Update a webhook + * + * @param int $webhookId Id of the webhook (required) + * @param \Brevo\Client\Model\UpdateWebhook $updateWebhook Values to update a webhook (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function updateWebhookWithHttpInfo($webhookId, $updateWebhook) + { + $returnType = ''; + $request = $this->updateWebhookRequest($webhookId, $updateWebhook); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation updateWebhookAsync + * + * Update a webhook + * + * @param int $webhookId Id of the webhook (required) + * @param \Brevo\Client\Model\UpdateWebhook $updateWebhook Values to update a webhook (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateWebhookAsync($webhookId, $updateWebhook) + { + return $this->updateWebhookAsyncWithHttpInfo($webhookId, $updateWebhook) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateWebhookAsyncWithHttpInfo + * + * Update a webhook + * + * @param int $webhookId Id of the webhook (required) + * @param \Brevo\Client\Model\UpdateWebhook $updateWebhook Values to update a webhook (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateWebhookAsyncWithHttpInfo($webhookId, $updateWebhook) + { + $returnType = ''; + $request = $this->updateWebhookRequest($webhookId, $updateWebhook); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'updateWebhook' + * + * @param int $webhookId Id of the webhook (required) + * @param \Brevo\Client\Model\UpdateWebhook $updateWebhook Values to update a webhook (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function updateWebhookRequest($webhookId, $updateWebhook) + { + // verify the required parameter 'webhookId' is set + if ($webhookId === null || (is_array($webhookId) && count($webhookId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $webhookId when calling updateWebhook' + ); + } + // verify the required parameter 'updateWebhook' is set + if ($updateWebhook === null || (is_array($updateWebhook) && count($updateWebhook) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $updateWebhook when calling updateWebhook' + ); + } + + $resourcePath = '/webhooks/{webhookId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($webhookId !== null) { + $resourcePath = str_replace( + '{' . 'webhookId' . '}', + ObjectSerializer::toPathValue($webhookId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($updateWebhook)) { + $_tempBody = $updateWebhook; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/vendor/getbrevo/brevo-php/lib/Api/WhatsAppCampaignsApi.php b/vendor/getbrevo/brevo-php/lib/Api/WhatsAppCampaignsApi.php new file mode 100644 index 0000000..e6430a0 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Api/WhatsAppCampaignsApi.php @@ -0,0 +1,2658 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation createWhatsAppCampaign + * + * Create and Send a WhatsApp campaign + * + * @param \Brevo\Client\Model\CreateWhatsAppCampaign $whatsAppCampaigns Values to create a campaign (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\CreateModel + */ + public function createWhatsAppCampaign($whatsAppCampaigns) + { + list($response) = $this->createWhatsAppCampaignWithHttpInfo($whatsAppCampaigns); + return $response; + } + + /** + * Operation createWhatsAppCampaignWithHttpInfo + * + * Create and Send a WhatsApp campaign + * + * @param \Brevo\Client\Model\CreateWhatsAppCampaign $whatsAppCampaigns Values to create a campaign (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\CreateModel, HTTP status code, HTTP response headers (array of strings) + */ + public function createWhatsAppCampaignWithHttpInfo($whatsAppCampaigns) + { + $returnType = '\Brevo\Client\Model\CreateModel'; + $request = $this->createWhatsAppCampaignRequest($whatsAppCampaigns); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\CreateModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation createWhatsAppCampaignAsync + * + * Create and Send a WhatsApp campaign + * + * @param \Brevo\Client\Model\CreateWhatsAppCampaign $whatsAppCampaigns Values to create a campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createWhatsAppCampaignAsync($whatsAppCampaigns) + { + return $this->createWhatsAppCampaignAsyncWithHttpInfo($whatsAppCampaigns) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createWhatsAppCampaignAsyncWithHttpInfo + * + * Create and Send a WhatsApp campaign + * + * @param \Brevo\Client\Model\CreateWhatsAppCampaign $whatsAppCampaigns Values to create a campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createWhatsAppCampaignAsyncWithHttpInfo($whatsAppCampaigns) + { + $returnType = '\Brevo\Client\Model\CreateModel'; + $request = $this->createWhatsAppCampaignRequest($whatsAppCampaigns); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createWhatsAppCampaign' + * + * @param \Brevo\Client\Model\CreateWhatsAppCampaign $whatsAppCampaigns Values to create a campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function createWhatsAppCampaignRequest($whatsAppCampaigns) + { + // verify the required parameter 'whatsAppCampaigns' is set + if ($whatsAppCampaigns === null || (is_array($whatsAppCampaigns) && count($whatsAppCampaigns) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $whatsAppCampaigns when calling createWhatsAppCampaign' + ); + } + + $resourcePath = '/whatsappCampaigns'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($whatsAppCampaigns)) { + $_tempBody = $whatsAppCampaigns; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation createWhatsAppTemplate + * + * Create a WhatsApp template + * + * @param \Brevo\Client\Model\CreateWhatsAppTemplate $whatsAppTemplates Values to create a template (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\CreateModel + */ + public function createWhatsAppTemplate($whatsAppTemplates) + { + list($response) = $this->createWhatsAppTemplateWithHttpInfo($whatsAppTemplates); + return $response; + } + + /** + * Operation createWhatsAppTemplateWithHttpInfo + * + * Create a WhatsApp template + * + * @param \Brevo\Client\Model\CreateWhatsAppTemplate $whatsAppTemplates Values to create a template (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\CreateModel, HTTP status code, HTTP response headers (array of strings) + */ + public function createWhatsAppTemplateWithHttpInfo($whatsAppTemplates) + { + $returnType = '\Brevo\Client\Model\CreateModel'; + $request = $this->createWhatsAppTemplateRequest($whatsAppTemplates); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\CreateModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation createWhatsAppTemplateAsync + * + * Create a WhatsApp template + * + * @param \Brevo\Client\Model\CreateWhatsAppTemplate $whatsAppTemplates Values to create a template (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createWhatsAppTemplateAsync($whatsAppTemplates) + { + return $this->createWhatsAppTemplateAsyncWithHttpInfo($whatsAppTemplates) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createWhatsAppTemplateAsyncWithHttpInfo + * + * Create a WhatsApp template + * + * @param \Brevo\Client\Model\CreateWhatsAppTemplate $whatsAppTemplates Values to create a template (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createWhatsAppTemplateAsyncWithHttpInfo($whatsAppTemplates) + { + $returnType = '\Brevo\Client\Model\CreateModel'; + $request = $this->createWhatsAppTemplateRequest($whatsAppTemplates); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createWhatsAppTemplate' + * + * @param \Brevo\Client\Model\CreateWhatsAppTemplate $whatsAppTemplates Values to create a template (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function createWhatsAppTemplateRequest($whatsAppTemplates) + { + // verify the required parameter 'whatsAppTemplates' is set + if ($whatsAppTemplates === null || (is_array($whatsAppTemplates) && count($whatsAppTemplates) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $whatsAppTemplates when calling createWhatsAppTemplate' + ); + } + + $resourcePath = '/whatsppCampaigns/template'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($whatsAppTemplates)) { + $_tempBody = $whatsAppTemplates; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation deleteWhatsAppCampaign + * + * Delete a WhatsApp campaign + * + * @param int $campaignId id of the campaign (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function deleteWhatsAppCampaign($campaignId) + { + $this->deleteWhatsAppCampaignWithHttpInfo($campaignId); + } + + /** + * Operation deleteWhatsAppCampaignWithHttpInfo + * + * Delete a WhatsApp campaign + * + * @param int $campaignId id of the campaign (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteWhatsAppCampaignWithHttpInfo($campaignId) + { + $returnType = ''; + $request = $this->deleteWhatsAppCampaignRequest($campaignId); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation deleteWhatsAppCampaignAsync + * + * Delete a WhatsApp campaign + * + * @param int $campaignId id of the campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteWhatsAppCampaignAsync($campaignId) + { + return $this->deleteWhatsAppCampaignAsyncWithHttpInfo($campaignId) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteWhatsAppCampaignAsyncWithHttpInfo + * + * Delete a WhatsApp campaign + * + * @param int $campaignId id of the campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteWhatsAppCampaignAsyncWithHttpInfo($campaignId) + { + $returnType = ''; + $request = $this->deleteWhatsAppCampaignRequest($campaignId); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'deleteWhatsAppCampaign' + * + * @param int $campaignId id of the campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function deleteWhatsAppCampaignRequest($campaignId) + { + // verify the required parameter 'campaignId' is set + if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $campaignId when calling deleteWhatsAppCampaign' + ); + } + + $resourcePath = '/whatsappCampaigns/{campaignId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($campaignId !== null) { + $resourcePath = str_replace( + '{' . 'campaignId' . '}', + ObjectSerializer::toPathValue($campaignId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getWhatsAppCampaign + * + * Get a WhatsApp campaign + * + * @param int $campaignId Id of the campaign (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetWhatsappCampaignOverview + */ + public function getWhatsAppCampaign($campaignId) + { + list($response) = $this->getWhatsAppCampaignWithHttpInfo($campaignId); + return $response; + } + + /** + * Operation getWhatsAppCampaignWithHttpInfo + * + * Get a WhatsApp campaign + * + * @param int $campaignId Id of the campaign (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetWhatsappCampaignOverview, HTTP status code, HTTP response headers (array of strings) + */ + public function getWhatsAppCampaignWithHttpInfo($campaignId) + { + $returnType = '\Brevo\Client\Model\GetWhatsappCampaignOverview'; + $request = $this->getWhatsAppCampaignRequest($campaignId); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetWhatsappCampaignOverview', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getWhatsAppCampaignAsync + * + * Get a WhatsApp campaign + * + * @param int $campaignId Id of the campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getWhatsAppCampaignAsync($campaignId) + { + return $this->getWhatsAppCampaignAsyncWithHttpInfo($campaignId) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getWhatsAppCampaignAsyncWithHttpInfo + * + * Get a WhatsApp campaign + * + * @param int $campaignId Id of the campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getWhatsAppCampaignAsyncWithHttpInfo($campaignId) + { + $returnType = '\Brevo\Client\Model\GetWhatsappCampaignOverview'; + $request = $this->getWhatsAppCampaignRequest($campaignId); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getWhatsAppCampaign' + * + * @param int $campaignId Id of the campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getWhatsAppCampaignRequest($campaignId) + { + // verify the required parameter 'campaignId' is set + if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $campaignId when calling getWhatsAppCampaign' + ); + } + + $resourcePath = '/whatsappCampaigns/{campaignId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($campaignId !== null) { + $resourcePath = str_replace( + '{' . 'campaignId' . '}', + ObjectSerializer::toPathValue($campaignId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getWhatsAppCampaigns + * + * Return all your created WhatsApp campaigns + * + * @param string $startDate **Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the campaigns created. **Prefer to pass your timezone in date-time format for accurate result** (optional) + * @param string $endDate **Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the campaigns created. **Prefer to pass your timezone in date-time format for accurate result** (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document in the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record modification. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetWhatsappCampaigns + */ + public function getWhatsAppCampaigns($startDate = null, $endDate = null, $limit = '50', $offset = '0', $sort = 'desc') + { + list($response) = $this->getWhatsAppCampaignsWithHttpInfo($startDate, $endDate, $limit, $offset, $sort); + return $response; + } + + /** + * Operation getWhatsAppCampaignsWithHttpInfo + * + * Return all your created WhatsApp campaigns + * + * @param string $startDate **Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the campaigns created. **Prefer to pass your timezone in date-time format for accurate result** (optional) + * @param string $endDate **Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the campaigns created. **Prefer to pass your timezone in date-time format for accurate result** (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document in the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record modification. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetWhatsappCampaigns, HTTP status code, HTTP response headers (array of strings) + */ + public function getWhatsAppCampaignsWithHttpInfo($startDate = null, $endDate = null, $limit = '50', $offset = '0', $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetWhatsappCampaigns'; + $request = $this->getWhatsAppCampaignsRequest($startDate, $endDate, $limit, $offset, $sort); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetWhatsappCampaigns', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getWhatsAppCampaignsAsync + * + * Return all your created WhatsApp campaigns + * + * @param string $startDate **Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the campaigns created. **Prefer to pass your timezone in date-time format for accurate result** (optional) + * @param string $endDate **Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the campaigns created. **Prefer to pass your timezone in date-time format for accurate result** (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document in the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record modification. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getWhatsAppCampaignsAsync($startDate = null, $endDate = null, $limit = '50', $offset = '0', $sort = 'desc') + { + return $this->getWhatsAppCampaignsAsyncWithHttpInfo($startDate, $endDate, $limit, $offset, $sort) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getWhatsAppCampaignsAsyncWithHttpInfo + * + * Return all your created WhatsApp campaigns + * + * @param string $startDate **Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the campaigns created. **Prefer to pass your timezone in date-time format for accurate result** (optional) + * @param string $endDate **Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the campaigns created. **Prefer to pass your timezone in date-time format for accurate result** (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document in the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record modification. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getWhatsAppCampaignsAsyncWithHttpInfo($startDate = null, $endDate = null, $limit = '50', $offset = '0', $sort = 'desc') + { + $returnType = '\Brevo\Client\Model\GetWhatsappCampaigns'; + $request = $this->getWhatsAppCampaignsRequest($startDate, $endDate, $limit, $offset, $sort); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getWhatsAppCampaigns' + * + * @param string $startDate **Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the campaigns created. **Prefer to pass your timezone in date-time format for accurate result** (optional) + * @param string $endDate **Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the campaigns created. **Prefer to pass your timezone in date-time format for accurate result** (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document in the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record modification. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getWhatsAppCampaignsRequest($startDate = null, $endDate = null, $limit = '50', $offset = '0', $sort = 'desc') + { + if ($limit !== null && $limit > 100) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling WhatsAppCampaignsApi.getWhatsAppCampaigns, must be smaller than or equal to 100.'); + } + if ($limit !== null && $limit < 0) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling WhatsAppCampaignsApi.getWhatsAppCampaigns, must be bigger than or equal to 0.'); + } + + + $resourcePath = '/whatsappCampaigns'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($startDate !== null) { + $queryParams['startDate'] = ObjectSerializer::toQueryValue($startDate); + } + // query params + if ($endDate !== null) { + $queryParams['endDate'] = ObjectSerializer::toQueryValue($endDate); + } + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getWhatsAppConfig + * + * Get your WhatsApp API account information + * + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetWhatsAppConfig + */ + public function getWhatsAppConfig() + { + list($response) = $this->getWhatsAppConfigWithHttpInfo(); + return $response; + } + + /** + * Operation getWhatsAppConfigWithHttpInfo + * + * Get your WhatsApp API account information + * + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetWhatsAppConfig, HTTP status code, HTTP response headers (array of strings) + */ + public function getWhatsAppConfigWithHttpInfo() + { + $returnType = '\Brevo\Client\Model\GetWhatsAppConfig'; + $request = $this->getWhatsAppConfigRequest(); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetWhatsAppConfig', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getWhatsAppConfigAsync + * + * Get your WhatsApp API account information + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getWhatsAppConfigAsync() + { + return $this->getWhatsAppConfigAsyncWithHttpInfo() + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getWhatsAppConfigAsyncWithHttpInfo + * + * Get your WhatsApp API account information + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getWhatsAppConfigAsyncWithHttpInfo() + { + $returnType = '\Brevo\Client\Model\GetWhatsAppConfig'; + $request = $this->getWhatsAppConfigRequest(); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getWhatsAppConfig' + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getWhatsAppConfigRequest() + { + + $resourcePath = '/whatsappCampaigns/config'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getWhatsAppTemplates + * + * Return all your created WhatsApp templates + * + * @param string $startDate **Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates created. **Prefer to pass your timezone in date-time format for accurate result** (optional) + * @param string $endDate **Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates created. **Prefer to pass your timezone in date-time format for accurate result** (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document in the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record modification. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $source source of the template (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Brevo\Client\Model\GetWATemplates + */ + public function getWhatsAppTemplates($startDate = null, $endDate = null, $limit = '50', $offset = '0', $sort = 'desc', $source = null) + { + list($response) = $this->getWhatsAppTemplatesWithHttpInfo($startDate, $endDate, $limit, $offset, $sort, $source); + return $response; + } + + /** + * Operation getWhatsAppTemplatesWithHttpInfo + * + * Return all your created WhatsApp templates + * + * @param string $startDate **Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates created. **Prefer to pass your timezone in date-time format for accurate result** (optional) + * @param string $endDate **Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates created. **Prefer to pass your timezone in date-time format for accurate result** (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document in the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record modification. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $source source of the template (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Brevo\Client\Model\GetWATemplates, HTTP status code, HTTP response headers (array of strings) + */ + public function getWhatsAppTemplatesWithHttpInfo($startDate = null, $endDate = null, $limit = '50', $offset = '0', $sort = 'desc', $source = null) + { + $returnType = '\Brevo\Client\Model\GetWATemplates'; + $request = $this->getWhatsAppTemplatesRequest($startDate, $endDate, $limit, $offset, $sort, $source); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\GetWATemplates', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getWhatsAppTemplatesAsync + * + * Return all your created WhatsApp templates + * + * @param string $startDate **Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates created. **Prefer to pass your timezone in date-time format for accurate result** (optional) + * @param string $endDate **Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates created. **Prefer to pass your timezone in date-time format for accurate result** (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document in the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record modification. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $source source of the template (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getWhatsAppTemplatesAsync($startDate = null, $endDate = null, $limit = '50', $offset = '0', $sort = 'desc', $source = null) + { + return $this->getWhatsAppTemplatesAsyncWithHttpInfo($startDate, $endDate, $limit, $offset, $sort, $source) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getWhatsAppTemplatesAsyncWithHttpInfo + * + * Return all your created WhatsApp templates + * + * @param string $startDate **Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates created. **Prefer to pass your timezone in date-time format for accurate result** (optional) + * @param string $endDate **Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates created. **Prefer to pass your timezone in date-time format for accurate result** (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document in the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record modification. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $source source of the template (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getWhatsAppTemplatesAsyncWithHttpInfo($startDate = null, $endDate = null, $limit = '50', $offset = '0', $sort = 'desc', $source = null) + { + $returnType = '\Brevo\Client\Model\GetWATemplates'; + $request = $this->getWhatsAppTemplatesRequest($startDate, $endDate, $limit, $offset, $sort, $source); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getWhatsAppTemplates' + * + * @param string $startDate **Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates created. **Prefer to pass your timezone in date-time format for accurate result** (optional) + * @param string $endDate **Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates created. **Prefer to pass your timezone in date-time format for accurate result** (optional) + * @param int $limit Number of documents per page (optional, default to 50) + * @param int $offset Index of the first document in the page (optional, default to 0) + * @param string $sort Sort the results in the ascending/descending order of record modification. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $source source of the template (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getWhatsAppTemplatesRequest($startDate = null, $endDate = null, $limit = '50', $offset = '0', $sort = 'desc', $source = null) + { + if ($limit !== null && $limit > 100) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling WhatsAppCampaignsApi.getWhatsAppTemplates, must be smaller than or equal to 100.'); + } + if ($limit !== null && $limit < 0) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling WhatsAppCampaignsApi.getWhatsAppTemplates, must be bigger than or equal to 0.'); + } + + + $resourcePath = '/whatsappCampaigns/template-list'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($startDate !== null) { + $queryParams['startDate'] = ObjectSerializer::toQueryValue($startDate); + } + // query params + if ($endDate !== null) { + $queryParams['endDate'] = ObjectSerializer::toQueryValue($endDate); + } + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); + } + // query params + if ($source !== null) { + $queryParams['source'] = ObjectSerializer::toQueryValue($source); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation sendWhatsAppTemplateApproval + * + * Send your WhatsApp template for approval + * + * @param int $templateId id of the campaign (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function sendWhatsAppTemplateApproval($templateId) + { + $this->sendWhatsAppTemplateApprovalWithHttpInfo($templateId); + } + + /** + * Operation sendWhatsAppTemplateApprovalWithHttpInfo + * + * Send your WhatsApp template for approval + * + * @param int $templateId id of the campaign (required) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function sendWhatsAppTemplateApprovalWithHttpInfo($templateId) + { + $returnType = ''; + $request = $this->sendWhatsAppTemplateApprovalRequest($templateId); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation sendWhatsAppTemplateApprovalAsync + * + * Send your WhatsApp template for approval + * + * @param int $templateId id of the campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function sendWhatsAppTemplateApprovalAsync($templateId) + { + return $this->sendWhatsAppTemplateApprovalAsyncWithHttpInfo($templateId) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation sendWhatsAppTemplateApprovalAsyncWithHttpInfo + * + * Send your WhatsApp template for approval + * + * @param int $templateId id of the campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function sendWhatsAppTemplateApprovalAsyncWithHttpInfo($templateId) + { + $returnType = ''; + $request = $this->sendWhatsAppTemplateApprovalRequest($templateId); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'sendWhatsAppTemplateApproval' + * + * @param int $templateId id of the campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function sendWhatsAppTemplateApprovalRequest($templateId) + { + // verify the required parameter 'templateId' is set + if ($templateId === null || (is_array($templateId) && count($templateId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $templateId when calling sendWhatsAppTemplateApproval' + ); + } + + $resourcePath = '/whatsappCampaigns/template/approval/{templateId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($templateId !== null) { + $resourcePath = str_replace( + '{' . 'templateId' . '}', + ObjectSerializer::toPathValue($templateId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation updateWhatsAppCampaign + * + * Update a WhatsApp campaign + * + * @param int $campaignId Id of the campaign (required) + * @param \Brevo\Client\Model\UpdateWhatsAppCampaign $whatsAppCampaign values to update WhatsApp Campaign (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function updateWhatsAppCampaign($campaignId, $whatsAppCampaign = null) + { + $this->updateWhatsAppCampaignWithHttpInfo($campaignId, $whatsAppCampaign); + } + + /** + * Operation updateWhatsAppCampaignWithHttpInfo + * + * Update a WhatsApp campaign + * + * @param int $campaignId Id of the campaign (required) + * @param \Brevo\Client\Model\UpdateWhatsAppCampaign $whatsAppCampaign values to update WhatsApp Campaign (optional) + * + * @throws \Brevo\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function updateWhatsAppCampaignWithHttpInfo($campaignId, $whatsAppCampaign = null) + { + $returnType = ''; + $request = $this->updateWhatsAppCampaignRequest($campaignId, $whatsAppCampaign); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Brevo\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation updateWhatsAppCampaignAsync + * + * Update a WhatsApp campaign + * + * @param int $campaignId Id of the campaign (required) + * @param \Brevo\Client\Model\UpdateWhatsAppCampaign $whatsAppCampaign values to update WhatsApp Campaign (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateWhatsAppCampaignAsync($campaignId, $whatsAppCampaign = null) + { + return $this->updateWhatsAppCampaignAsyncWithHttpInfo($campaignId, $whatsAppCampaign) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateWhatsAppCampaignAsyncWithHttpInfo + * + * Update a WhatsApp campaign + * + * @param int $campaignId Id of the campaign (required) + * @param \Brevo\Client\Model\UpdateWhatsAppCampaign $whatsAppCampaign values to update WhatsApp Campaign (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateWhatsAppCampaignAsyncWithHttpInfo($campaignId, $whatsAppCampaign = null) + { + $returnType = ''; + $request = $this->updateWhatsAppCampaignRequest($campaignId, $whatsAppCampaign); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'updateWhatsAppCampaign' + * + * @param int $campaignId Id of the campaign (required) + * @param \Brevo\Client\Model\UpdateWhatsAppCampaign $whatsAppCampaign values to update WhatsApp Campaign (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function updateWhatsAppCampaignRequest($campaignId, $whatsAppCampaign = null) + { + // verify the required parameter 'campaignId' is set + if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $campaignId when calling updateWhatsAppCampaign' + ); + } + + $resourcePath = '/whatsappCampaigns/{campaignId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($campaignId !== null) { + $resourcePath = str_replace( + '{' . 'campaignId' . '}', + ObjectSerializer::toPathValue($campaignId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($whatsAppCampaign)) { + $_tempBody = $whatsAppCampaign; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/vendor/getbrevo/brevo-php/lib/ApiException.php b/vendor/getbrevo/brevo-php/lib/ApiException.php new file mode 100644 index 0000000..4469789 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/ApiException.php @@ -0,0 +1,121 @@ +responseHeaders = $responseHeaders; + $this->responseBody = $responseBody; + } + + /** + * Gets the HTTP response header + * + * @return string[]|null HTTP response header + */ + public function getResponseHeaders() + { + return $this->responseHeaders; + } + + /** + * Gets the HTTP body of the server response either as Json or string + * + * @return mixed HTTP body of the server response either as \stdClass or string + */ + public function getResponseBody() + { + return $this->responseBody; + } + + /** + * Sets the deseralized response object (during deserialization) + * + * @param mixed $obj Deserialized response object + * + * @return void + */ + public function setResponseObject($obj) + { + $this->responseObject = $obj; + } + + /** + * Gets the deseralized response object (during deserialization) + * + * @return mixed the deserialized response object + */ + public function getResponseObject() + { + return $this->responseObject; + } +} diff --git a/vendor/getbrevo/brevo-php/lib/Configuration.php b/vendor/getbrevo/brevo-php/lib/Configuration.php new file mode 100644 index 0000000..802870f --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Configuration.php @@ -0,0 +1,433 @@ +tempFolderPath = sys_get_temp_dir(); + $this->userAgent = 'brevo_clientAPI/v' . $GLOBALS['version'] . '/php'; + } + + /** + * Sets API key + * + * @param string $apiKeyIdentifier API key identifier (authentication scheme) + * @param string $key API key or token + * + * @return $this + */ + public function setApiKey($apiKeyIdentifier, $key) + { + $this->apiKeys[$apiKeyIdentifier] = $key; + return $this; + } + + /** + * Gets API key + * + * @param string $apiKeyIdentifier API key identifier (authentication scheme) + * + * @return string API key or token + */ + public function getApiKey($apiKeyIdentifier) + { + return isset($this->apiKeys[$apiKeyIdentifier]) ? $this->apiKeys[$apiKeyIdentifier] : null; + } + + /** + * Sets the prefix for API key (e.g. Bearer) + * + * @param string $apiKeyIdentifier API key identifier (authentication scheme) + * @param string $prefix API key prefix, e.g. Bearer + * + * @return $this + */ + public function setApiKeyPrefix($apiKeyIdentifier, $prefix) + { + $this->apiKeyPrefixes[$apiKeyIdentifier] = $prefix; + return $this; + } + + /** + * Gets API key prefix + * + * @param string $apiKeyIdentifier API key identifier (authentication scheme) + * + * @return string + */ + public function getApiKeyPrefix($apiKeyIdentifier) + { + return isset($this->apiKeyPrefixes[$apiKeyIdentifier]) ? $this->apiKeyPrefixes[$apiKeyIdentifier] : null; + } + + /** + * Sets the access token for OAuth + * + * @param string $accessToken Token for OAuth + * + * @return $this + */ + public function setAccessToken($accessToken) + { + $this->accessToken = $accessToken; + return $this; + } + + /** + * Gets the access token for OAuth + * + * @return string Access token for OAuth + */ + public function getAccessToken() + { + return $this->accessToken; + } + + /** + * Sets the username for HTTP basic authentication + * + * @param string $username Username for HTTP basic authentication + * + * @return $this + */ + public function setUsername($username) + { + $this->username = $username; + return $this; + } + + /** + * Gets the username for HTTP basic authentication + * + * @return string Username for HTTP basic authentication + */ + public function getUsername() + { + return $this->username; + } + + /** + * Sets the password for HTTP basic authentication + * + * @param string $password Password for HTTP basic authentication + * + * @return $this + */ + public function setPassword($password) + { + $this->password = $password; + return $this; + } + + /** + * Gets the password for HTTP basic authentication + * + * @return string Password for HTTP basic authentication + */ + public function getPassword() + { + return $this->password; + } + + /** + * Sets the host + * + * @param string $host Host + * + * @return $this + */ + public function setHost($host) + { + $this->host = $host; + return $this; + } + + /** + * Gets the host + * + * @return string Host + */ + public function getHost() + { + return $this->host; + } + + /** + * Sets the user agent of the api client + * + * @param string $userAgent the user agent of the api client + * + * @throws \InvalidArgumentException + * @return $this + */ + public function setUserAgent($userAgent) + { + if (!is_string($userAgent)) { + throw new \InvalidArgumentException('User-agent must be a string.'); + } + + $this->userAgent = $userAgent; + return $this; + } + + /** + * Gets the user agent of the api client + * + * @return string user agent + */ + public function getUserAgent() + { + return $this->userAgent; + } + + /** + * Sets debug flag + * + * @param bool $debug Debug flag + * + * @return $this + */ + public function setDebug($debug) + { + $this->debug = $debug; + return $this; + } + + /** + * Gets the debug flag + * + * @return bool + */ + public function getDebug() + { + return $this->debug; + } + + /** + * Sets the debug file + * + * @param string $debugFile Debug file + * + * @return $this + */ + public function setDebugFile($debugFile) + { + $this->debugFile = $debugFile; + return $this; + } + + /** + * Gets the debug file + * + * @return string + */ + public function getDebugFile() + { + return $this->debugFile; + } + + /** + * Sets the temp folder path + * + * @param string $tempFolderPath Temp folder path + * + * @return $this + */ + public function setTempFolderPath($tempFolderPath) + { + $this->tempFolderPath = $tempFolderPath; + return $this; + } + + /** + * Gets the temp folder path + * + * @return string Temp folder path + */ + public function getTempFolderPath() + { + return $this->tempFolderPath; + } + + /** + * Gets the default configuration instance + * + * @return Configuration + */ + public static function getDefaultConfiguration() + { + if (self::$defaultConfiguration === null) { + self::$defaultConfiguration = new Configuration(); + } + + return self::$defaultConfiguration; + } + + /** + * Sets the detault configuration instance + * + * @param Configuration $config An instance of the Configuration Object + * + * @return void + */ + public static function setDefaultConfiguration(Configuration $config) + { + self::$defaultConfiguration = $config; + } + + /** + * Gets the essential information for debugging + * + * @return string The report for debugging + */ + public static function toDebugReport() + { + $report = 'PHP SDK (Brevo\Client) Debug Report:' . PHP_EOL; + $report .= ' OS: ' . php_uname() . PHP_EOL; + $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; + $report .= ' OpenAPI Spec Version: 3.0.0' . PHP_EOL; + $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; + + return $report; + } + + /** + * Get API key (with prefix if set) + * + * @param string $apiKeyIdentifier name of apikey + * + * @return string API key with the prefix + */ + public function getApiKeyWithPrefix($apiKeyIdentifier) + { + $prefix = $this->getApiKeyPrefix($apiKeyIdentifier); + $apiKey = $this->getApiKey($apiKeyIdentifier); + + if ($apiKey === null) { + return null; + } + + if ($prefix === null) { + $keyWithPrefix = $apiKey; + } else { + $keyWithPrefix = $prefix . ' ' . $apiKey; + } + + return $keyWithPrefix; + } +} diff --git a/vendor/getbrevo/brevo-php/lib/HeaderSelector.php b/vendor/getbrevo/brevo-php/lib/HeaderSelector.php new file mode 100644 index 0000000..34df7df --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/HeaderSelector.php @@ -0,0 +1,110 @@ +selectAcceptHeader($accept); + if ($accept !== null) { + $headers['Accept'] = $accept; + } + + $headers['Content-Type'] = $this->selectContentTypeHeader($contentTypes); + return $headers; + } + + /** + * @param string[] $accept + * @return array + */ + public function selectHeadersForMultipart($accept) + { + $headers = $this->selectHeaders($accept, []); + + unset($headers['Content-Type']); + return $headers; + } + + /** + * Return the header 'Accept' based on an array of Accept provided + * + * @param string[] $accept Array of header + * + * @return string Accept (e.g. application/json) + */ + private function selectAcceptHeader($accept) + { + if (count($accept) === 0 || (count($accept) === 1 && $accept[0] === '')) { + return null; + } elseif (preg_grep("/application\/json/i", $accept)) { + return 'application/json'; + } else { + return implode(',', $accept); + } + } + + /** + * Return the content type based on an array of content-type provided + * + * @param string[] $contentType Array fo content-type + * + * @return string Content-Type (e.g. application/json) + */ + private function selectContentTypeHeader($contentType) + { + if (count($contentType) === 0 || (count($contentType) === 1 && $contentType[0] === '')) { + return 'application/json'; + } elseif (preg_grep("/application\/json/i", $contentType)) { + return 'application/json'; + } else { + return implode(',', $contentType); + } + } +} + diff --git a/vendor/getbrevo/brevo-php/lib/Model/AbTestCampaignResult.php b/vendor/getbrevo/brevo-php/lib/Model/AbTestCampaignResult.php new file mode 100644 index 0000000..b9695a3 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/AbTestCampaignResult.php @@ -0,0 +1,585 @@ + 'string', + 'winningCriteria' => 'string', + 'winningSubjectLine' => 'string', + 'openRate' => 'string', + 'clickRate' => 'string', + 'winningVersionRate' => 'string', + 'statistics' => '\Brevo\Client\Model\AbTestCampaignResultStatistics', + 'clickedLinks' => '\Brevo\Client\Model\AbTestCampaignResultClickedLinks' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'winningVersion' => null, + 'winningCriteria' => null, + 'winningSubjectLine' => null, + 'openRate' => null, + 'clickRate' => null, + 'winningVersionRate' => null, + 'statistics' => null, + 'clickedLinks' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'winningVersion' => 'winningVersion', + 'winningCriteria' => 'winningCriteria', + 'winningSubjectLine' => 'winningSubjectLine', + 'openRate' => 'openRate', + 'clickRate' => 'clickRate', + 'winningVersionRate' => 'winningVersionRate', + 'statistics' => 'statistics', + 'clickedLinks' => 'clickedLinks' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'winningVersion' => 'setWinningVersion', + 'winningCriteria' => 'setWinningCriteria', + 'winningSubjectLine' => 'setWinningSubjectLine', + 'openRate' => 'setOpenRate', + 'clickRate' => 'setClickRate', + 'winningVersionRate' => 'setWinningVersionRate', + 'statistics' => 'setStatistics', + 'clickedLinks' => 'setClickedLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'winningVersion' => 'getWinningVersion', + 'winningCriteria' => 'getWinningCriteria', + 'winningSubjectLine' => 'getWinningSubjectLine', + 'openRate' => 'getOpenRate', + 'clickRate' => 'getClickRate', + 'winningVersionRate' => 'getWinningVersionRate', + 'statistics' => 'getStatistics', + 'clickedLinks' => 'getClickedLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const WINNING_VERSION_NOT_AVAILABLE = 'notAvailable'; + const WINNING_VERSION_PENDING = 'pending'; + const WINNING_VERSION_TIE = 'tie'; + const WINNING_VERSION_A = 'A'; + const WINNING_VERSION_B = 'B'; + const WINNING_CRITERIA_OPEN = 'Open'; + const WINNING_CRITERIA_CLICK = 'Click'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getWinningVersionAllowableValues() + { + return [ + self::WINNING_VERSION_NOT_AVAILABLE, + self::WINNING_VERSION_PENDING, + self::WINNING_VERSION_TIE, + self::WINNING_VERSION_A, + self::WINNING_VERSION_B, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getWinningCriteriaAllowableValues() + { + return [ + self::WINNING_CRITERIA_OPEN, + self::WINNING_CRITERIA_CLICK, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['winningVersion'] = isset($data['winningVersion']) ? $data['winningVersion'] : null; + $this->container['winningCriteria'] = isset($data['winningCriteria']) ? $data['winningCriteria'] : null; + $this->container['winningSubjectLine'] = isset($data['winningSubjectLine']) ? $data['winningSubjectLine'] : null; + $this->container['openRate'] = isset($data['openRate']) ? $data['openRate'] : null; + $this->container['clickRate'] = isset($data['clickRate']) ? $data['clickRate'] : null; + $this->container['winningVersionRate'] = isset($data['winningVersionRate']) ? $data['winningVersionRate'] : null; + $this->container['statistics'] = isset($data['statistics']) ? $data['statistics'] : null; + $this->container['clickedLinks'] = isset($data['clickedLinks']) ? $data['clickedLinks'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getWinningVersionAllowableValues(); + if (!is_null($this->container['winningVersion']) && !in_array($this->container['winningVersion'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'winningVersion', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getWinningCriteriaAllowableValues(); + if (!is_null($this->container['winningCriteria']) && !in_array($this->container['winningCriteria'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'winningCriteria', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets winningVersion + * + * @return string + */ + public function getWinningVersion() + { + return $this->container['winningVersion']; + } + + /** + * Sets winningVersion + * + * @param string $winningVersion Winning Campaign Info. pending = Campaign has been picked for sending and winning version is yet to be decided, tie = A tie happened between both the versions, notAvailable = Campaign has not yet been picked for sending. + * + * @return $this + */ + public function setWinningVersion($winningVersion) + { + $allowedValues = $this->getWinningVersionAllowableValues(); + if (!is_null($winningVersion) && !in_array($winningVersion, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'winningVersion', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['winningVersion'] = $winningVersion; + + return $this; + } + + /** + * Gets winningCriteria + * + * @return string + */ + public function getWinningCriteria() + { + return $this->container['winningCriteria']; + } + + /** + * Sets winningCriteria + * + * @param string $winningCriteria Criteria choosen for winning version (Open/Click) + * + * @return $this + */ + public function setWinningCriteria($winningCriteria) + { + $allowedValues = $this->getWinningCriteriaAllowableValues(); + if (!is_null($winningCriteria) && !in_array($winningCriteria, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'winningCriteria', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['winningCriteria'] = $winningCriteria; + + return $this; + } + + /** + * Gets winningSubjectLine + * + * @return string + */ + public function getWinningSubjectLine() + { + return $this->container['winningSubjectLine']; + } + + /** + * Sets winningSubjectLine + * + * @param string $winningSubjectLine Subject Line of current winning version + * + * @return $this + */ + public function setWinningSubjectLine($winningSubjectLine) + { + $this->container['winningSubjectLine'] = $winningSubjectLine; + + return $this; + } + + /** + * Gets openRate + * + * @return string + */ + public function getOpenRate() + { + return $this->container['openRate']; + } + + /** + * Sets openRate + * + * @param string $openRate Open rate for current winning version + * + * @return $this + */ + public function setOpenRate($openRate) + { + $this->container['openRate'] = $openRate; + + return $this; + } + + /** + * Gets clickRate + * + * @return string + */ + public function getClickRate() + { + return $this->container['clickRate']; + } + + /** + * Sets clickRate + * + * @param string $clickRate Click rate for current winning version + * + * @return $this + */ + public function setClickRate($clickRate) + { + $this->container['clickRate'] = $clickRate; + + return $this; + } + + /** + * Gets winningVersionRate + * + * @return string + */ + public function getWinningVersionRate() + { + return $this->container['winningVersionRate']; + } + + /** + * Sets winningVersionRate + * + * @param string $winningVersionRate Open/Click rate for the winner version + * + * @return $this + */ + public function setWinningVersionRate($winningVersionRate) + { + $this->container['winningVersionRate'] = $winningVersionRate; + + return $this; + } + + /** + * Gets statistics + * + * @return \Brevo\Client\Model\AbTestCampaignResultStatistics + */ + public function getStatistics() + { + return $this->container['statistics']; + } + + /** + * Sets statistics + * + * @param \Brevo\Client\Model\AbTestCampaignResultStatistics $statistics statistics + * + * @return $this + */ + public function setStatistics($statistics) + { + $this->container['statistics'] = $statistics; + + return $this; + } + + /** + * Gets clickedLinks + * + * @return \Brevo\Client\Model\AbTestCampaignResultClickedLinks + */ + public function getClickedLinks() + { + return $this->container['clickedLinks']; + } + + /** + * Sets clickedLinks + * + * @param \Brevo\Client\Model\AbTestCampaignResultClickedLinks $clickedLinks clickedLinks + * + * @return $this + */ + public function setClickedLinks($clickedLinks) + { + $this->container['clickedLinks'] = $clickedLinks; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/AbTestCampaignResultClickedLinks.php b/vendor/getbrevo/brevo-php/lib/Model/AbTestCampaignResultClickedLinks.php new file mode 100644 index 0000000..55733e5 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/AbTestCampaignResultClickedLinks.php @@ -0,0 +1,341 @@ + '\Brevo\Client\Model\AbTestVersionClicks', + 'versionB' => '\Brevo\Client\Model\AbTestVersionClicks' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'versionA' => null, + 'versionB' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'versionA' => 'Version A', + 'versionB' => 'Version B' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'versionA' => 'setVersionA', + 'versionB' => 'setVersionB' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'versionA' => 'getVersionA', + 'versionB' => 'getVersionB' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['versionA'] = isset($data['versionA']) ? $data['versionA'] : null; + $this->container['versionB'] = isset($data['versionB']) ? $data['versionB'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['versionA'] === null) { + $invalidProperties[] = "'versionA' can't be null"; + } + if ($this->container['versionB'] === null) { + $invalidProperties[] = "'versionB' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets versionA + * + * @return \Brevo\Client\Model\AbTestVersionClicks + */ + public function getVersionA() + { + return $this->container['versionA']; + } + + /** + * Sets versionA + * + * @param \Brevo\Client\Model\AbTestVersionClicks $versionA versionA + * + * @return $this + */ + public function setVersionA($versionA) + { + $this->container['versionA'] = $versionA; + + return $this; + } + + /** + * Gets versionB + * + * @return \Brevo\Client\Model\AbTestVersionClicks + */ + public function getVersionB() + { + return $this->container['versionB']; + } + + /** + * Sets versionB + * + * @param \Brevo\Client\Model\AbTestVersionClicks $versionB versionB + * + * @return $this + */ + public function setVersionB($versionB) + { + $this->container['versionB'] = $versionB; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/AbTestCampaignResultStatistics.php b/vendor/getbrevo/brevo-php/lib/Model/AbTestCampaignResultStatistics.php new file mode 100644 index 0000000..e705a7f --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/AbTestCampaignResultStatistics.php @@ -0,0 +1,473 @@ + '\Brevo\Client\Model\AbTestVersionStats', + 'clicks' => '\Brevo\Client\Model\AbTestVersionStats', + 'unsubscribed' => '\Brevo\Client\Model\AbTestVersionStats', + 'hardBounces' => '\Brevo\Client\Model\AbTestVersionStats', + 'softBounces' => '\Brevo\Client\Model\AbTestVersionStats', + 'complaints' => '\Brevo\Client\Model\AbTestVersionStats' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'openers' => null, + 'clicks' => null, + 'unsubscribed' => null, + 'hardBounces' => null, + 'softBounces' => null, + 'complaints' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'openers' => 'openers', + 'clicks' => 'clicks', + 'unsubscribed' => 'unsubscribed', + 'hardBounces' => 'hardBounces', + 'softBounces' => 'softBounces', + 'complaints' => 'complaints' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'openers' => 'setOpeners', + 'clicks' => 'setClicks', + 'unsubscribed' => 'setUnsubscribed', + 'hardBounces' => 'setHardBounces', + 'softBounces' => 'setSoftBounces', + 'complaints' => 'setComplaints' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'openers' => 'getOpeners', + 'clicks' => 'getClicks', + 'unsubscribed' => 'getUnsubscribed', + 'hardBounces' => 'getHardBounces', + 'softBounces' => 'getSoftBounces', + 'complaints' => 'getComplaints' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['openers'] = isset($data['openers']) ? $data['openers'] : null; + $this->container['clicks'] = isset($data['clicks']) ? $data['clicks'] : null; + $this->container['unsubscribed'] = isset($data['unsubscribed']) ? $data['unsubscribed'] : null; + $this->container['hardBounces'] = isset($data['hardBounces']) ? $data['hardBounces'] : null; + $this->container['softBounces'] = isset($data['softBounces']) ? $data['softBounces'] : null; + $this->container['complaints'] = isset($data['complaints']) ? $data['complaints'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['openers'] === null) { + $invalidProperties[] = "'openers' can't be null"; + } + if ($this->container['clicks'] === null) { + $invalidProperties[] = "'clicks' can't be null"; + } + if ($this->container['unsubscribed'] === null) { + $invalidProperties[] = "'unsubscribed' can't be null"; + } + if ($this->container['hardBounces'] === null) { + $invalidProperties[] = "'hardBounces' can't be null"; + } + if ($this->container['softBounces'] === null) { + $invalidProperties[] = "'softBounces' can't be null"; + } + if ($this->container['complaints'] === null) { + $invalidProperties[] = "'complaints' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets openers + * + * @return \Brevo\Client\Model\AbTestVersionStats + */ + public function getOpeners() + { + return $this->container['openers']; + } + + /** + * Sets openers + * + * @param \Brevo\Client\Model\AbTestVersionStats $openers openers + * + * @return $this + */ + public function setOpeners($openers) + { + $this->container['openers'] = $openers; + + return $this; + } + + /** + * Gets clicks + * + * @return \Brevo\Client\Model\AbTestVersionStats + */ + public function getClicks() + { + return $this->container['clicks']; + } + + /** + * Sets clicks + * + * @param \Brevo\Client\Model\AbTestVersionStats $clicks clicks + * + * @return $this + */ + public function setClicks($clicks) + { + $this->container['clicks'] = $clicks; + + return $this; + } + + /** + * Gets unsubscribed + * + * @return \Brevo\Client\Model\AbTestVersionStats + */ + public function getUnsubscribed() + { + return $this->container['unsubscribed']; + } + + /** + * Sets unsubscribed + * + * @param \Brevo\Client\Model\AbTestVersionStats $unsubscribed unsubscribed + * + * @return $this + */ + public function setUnsubscribed($unsubscribed) + { + $this->container['unsubscribed'] = $unsubscribed; + + return $this; + } + + /** + * Gets hardBounces + * + * @return \Brevo\Client\Model\AbTestVersionStats + */ + public function getHardBounces() + { + return $this->container['hardBounces']; + } + + /** + * Sets hardBounces + * + * @param \Brevo\Client\Model\AbTestVersionStats $hardBounces hardBounces + * + * @return $this + */ + public function setHardBounces($hardBounces) + { + $this->container['hardBounces'] = $hardBounces; + + return $this; + } + + /** + * Gets softBounces + * + * @return \Brevo\Client\Model\AbTestVersionStats + */ + public function getSoftBounces() + { + return $this->container['softBounces']; + } + + /** + * Sets softBounces + * + * @param \Brevo\Client\Model\AbTestVersionStats $softBounces softBounces + * + * @return $this + */ + public function setSoftBounces($softBounces) + { + $this->container['softBounces'] = $softBounces; + + return $this; + } + + /** + * Gets complaints + * + * @return \Brevo\Client\Model\AbTestVersionStats + */ + public function getComplaints() + { + return $this->container['complaints']; + } + + /** + * Sets complaints + * + * @param \Brevo\Client\Model\AbTestVersionStats $complaints complaints + * + * @return $this + */ + public function setComplaints($complaints) + { + $this->container['complaints'] = $complaints; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/AbTestVersionClicks.php b/vendor/getbrevo/brevo-php/lib/Model/AbTestVersionClicks.php new file mode 100644 index 0000000..451cb82 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/AbTestVersionClicks.php @@ -0,0 +1,281 @@ +listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/AbTestVersionClicksInner.php b/vendor/getbrevo/brevo-php/lib/Model/AbTestVersionClicksInner.php new file mode 100644 index 0000000..f1ef63d --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/AbTestVersionClicksInner.php @@ -0,0 +1,374 @@ + 'string', + 'clicksCount' => 'int', + 'clickRate' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'link' => null, + 'clicksCount' => 'int64', + 'clickRate' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'link' => 'link', + 'clicksCount' => 'clicksCount', + 'clickRate' => 'clickRate' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'link' => 'setLink', + 'clicksCount' => 'setClicksCount', + 'clickRate' => 'setClickRate' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'link' => 'getLink', + 'clicksCount' => 'getClicksCount', + 'clickRate' => 'getClickRate' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['link'] = isset($data['link']) ? $data['link'] : null; + $this->container['clicksCount'] = isset($data['clicksCount']) ? $data['clicksCount'] : null; + $this->container['clickRate'] = isset($data['clickRate']) ? $data['clickRate'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['link'] === null) { + $invalidProperties[] = "'link' can't be null"; + } + if ($this->container['clicksCount'] === null) { + $invalidProperties[] = "'clicksCount' can't be null"; + } + if ($this->container['clickRate'] === null) { + $invalidProperties[] = "'clickRate' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets link + * + * @return string + */ + public function getLink() + { + return $this->container['link']; + } + + /** + * Sets link + * + * @param string $link URL of the link + * + * @return $this + */ + public function setLink($link) + { + $this->container['link'] = $link; + + return $this; + } + + /** + * Gets clicksCount + * + * @return int + */ + public function getClicksCount() + { + return $this->container['clicksCount']; + } + + /** + * Sets clicksCount + * + * @param int $clicksCount Number of times a link is clicked + * + * @return $this + */ + public function setClicksCount($clicksCount) + { + $this->container['clicksCount'] = $clicksCount; + + return $this; + } + + /** + * Gets clickRate + * + * @return string + */ + public function getClickRate() + { + return $this->container['clickRate']; + } + + /** + * Sets clickRate + * + * @param string $clickRate Percentage of clicks of link with respect to total clicks + * + * @return $this + */ + public function setClickRate($clickRate) + { + $this->container['clickRate'] = $clickRate; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/AbTestVersionStats.php b/vendor/getbrevo/brevo-php/lib/Model/AbTestVersionStats.php new file mode 100644 index 0000000..7e93076 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/AbTestVersionStats.php @@ -0,0 +1,342 @@ + 'string', + 'versionB' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'versionA' => null, + 'versionB' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'versionA' => 'Version A', + 'versionB' => 'Version B' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'versionA' => 'setVersionA', + 'versionB' => 'setVersionB' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'versionA' => 'getVersionA', + 'versionB' => 'getVersionB' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['versionA'] = isset($data['versionA']) ? $data['versionA'] : null; + $this->container['versionB'] = isset($data['versionB']) ? $data['versionB'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['versionA'] === null) { + $invalidProperties[] = "'versionA' can't be null"; + } + if ($this->container['versionB'] === null) { + $invalidProperties[] = "'versionB' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets versionA + * + * @return string + */ + public function getVersionA() + { + return $this->container['versionA']; + } + + /** + * Sets versionA + * + * @param string $versionA percentage of an event for version A + * + * @return $this + */ + public function setVersionA($versionA) + { + $this->container['versionA'] = $versionA; + + return $this; + } + + /** + * Gets versionB + * + * @return string + */ + public function getVersionB() + { + return $this->container['versionB']; + } + + /** + * Sets versionB + * + * @param string $versionB percentage of an event for version B + * + * @return $this + */ + public function setVersionB($versionB) + { + $this->container['versionB'] = $versionB; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/AddChildDomain.php b/vendor/getbrevo/brevo-php/lib/Model/AddChildDomain.php new file mode 100644 index 0000000..a47f8cf --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/AddChildDomain.php @@ -0,0 +1,305 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'domain' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'domain' => 'domain' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'domain' => 'setDomain' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'domain' => 'getDomain' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['domain'] = isset($data['domain']) ? $data['domain'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets domain + * + * @return string + */ + public function getDomain() + { + return $this->container['domain']; + } + + /** + * Sets domain + * + * @param string $domain Sender domain to add for a specific child account + * + * @return $this + */ + public function setDomain($domain) + { + $this->container['domain'] = $domain; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/AddContactToList.php b/vendor/getbrevo/brevo-php/lib/Model/AddContactToList.php new file mode 100644 index 0000000..5f52693 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/AddContactToList.php @@ -0,0 +1,335 @@ + 'string[]', + 'ids' => 'int[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'emails' => 'email', + 'ids' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'emails' => 'emails', + 'ids' => 'ids' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'emails' => 'setEmails', + 'ids' => 'setIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'emails' => 'getEmails', + 'ids' => 'getIds' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['emails'] = isset($data['emails']) ? $data['emails'] : null; + $this->container['ids'] = isset($data['ids']) ? $data['ids'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets emails + * + * @return string[] + */ + public function getEmails() + { + return $this->container['emails']; + } + + /** + * Sets emails + * + * @param string[] $emails Mandatory if IDs are not passed, ignored otherwise. Emails to add to a list. You can pass a maximum of 150 emails for addition in one request. If you need to add the emails in bulk, please prefer /contacts/import api. + * + * @return $this + */ + public function setEmails($emails) + { + $this->container['emails'] = $emails; + + return $this; + } + + /** + * Gets ids + * + * @return int[] + */ + public function getIds() + { + return $this->container['ids']; + } + + /** + * Sets ids + * + * @param int[] $ids Mandatory if Emails are not passed, ignored otherwise. Emails to add to a list. You can pass a maximum of 150 emails for addition in one request. If you need to add the emails in bulk, please prefer /contacts/import api. + * + * @return $this + */ + public function setIds($ids) + { + $this->container['ids'] = $ids; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/AddCredits.php b/vendor/getbrevo/brevo-php/lib/Model/AddCredits.php new file mode 100644 index 0000000..6144e98 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/AddCredits.php @@ -0,0 +1,335 @@ + 'int', + 'email' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'sms' => 'int64', + 'email' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'sms' => 'sms', + 'email' => 'email' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'sms' => 'setSms', + 'email' => 'setEmail' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'sms' => 'getSms', + 'email' => 'getEmail' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['sms'] = isset($data['sms']) ? $data['sms'] : null; + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets sms + * + * @return int + */ + public function getSms() + { + return $this->container['sms']; + } + + /** + * Sets sms + * + * @param int $sms Required if email credits are empty. SMS credits to be added to the child account + * + * @return $this + */ + public function setSms($sms) + { + $this->container['sms'] = $sms; + + return $this; + } + + /** + * Gets email + * + * @return int + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param int $email Required if sms credits are empty. Email credits to be added to the child account + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/AuthenticateDomainModel.php b/vendor/getbrevo/brevo-php/lib/Model/AuthenticateDomainModel.php new file mode 100644 index 0000000..ad14e3e --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/AuthenticateDomainModel.php @@ -0,0 +1,341 @@ + 'string', + 'message' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'domainName' => null, + 'message' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'domainName' => 'domain_name', + 'message' => 'message' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'domainName' => 'setDomainName', + 'message' => 'setMessage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'domainName' => 'getDomainName', + 'message' => 'getMessage' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['domainName'] = isset($data['domainName']) ? $data['domainName'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['domainName'] === null) { + $invalidProperties[] = "'domainName' can't be null"; + } + if ($this->container['message'] === null) { + $invalidProperties[] = "'message' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets domainName + * + * @return string + */ + public function getDomainName() + { + return $this->container['domainName']; + } + + /** + * Sets domainName + * + * @param string $domainName Domain + * + * @return $this + */ + public function setDomainName($domainName) + { + $this->container['domainName'] = $domainName; + + return $this; + } + + /** + * Gets message + * + * @return string + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string $message Success message + * + * @return $this + */ + public function setMessage($message) + { + $this->container['message'] = $message; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/BlockDomain.php b/vendor/getbrevo/brevo-php/lib/Model/BlockDomain.php new file mode 100644 index 0000000..427488f --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/BlockDomain.php @@ -0,0 +1,308 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'domain' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'domain' => 'domain' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'domain' => 'setDomain' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'domain' => 'getDomain' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['domain'] = isset($data['domain']) ? $data['domain'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['domain'] === null) { + $invalidProperties[] = "'domain' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets domain + * + * @return string + */ + public function getDomain() + { + return $this->container['domain']; + } + + /** + * Sets domain + * + * @param string $domain name of the domain to be blocked + * + * @return $this + */ + public function setDomain($domain) + { + $this->container['domain'] = $domain; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/Body.php b/vendor/getbrevo/brevo-php/lib/Model/Body.php new file mode 100644 index 0000000..0ad0717 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/Body.php @@ -0,0 +1,338 @@ + 'string', + 'subAccountIds' => 'int[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'groupName' => null, + 'subAccountIds' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'groupName' => 'groupName', + 'subAccountIds' => 'subAccountIds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'groupName' => 'setGroupName', + 'subAccountIds' => 'setSubAccountIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'groupName' => 'getGroupName', + 'subAccountIds' => 'getSubAccountIds' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['groupName'] = isset($data['groupName']) ? $data['groupName'] : null; + $this->container['subAccountIds'] = isset($data['subAccountIds']) ? $data['subAccountIds'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['groupName'] === null) { + $invalidProperties[] = "'groupName' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets groupName + * + * @return string + */ + public function getGroupName() + { + return $this->container['groupName']; + } + + /** + * Sets groupName + * + * @param string $groupName The name of the group of sub-accounts + * + * @return $this + */ + public function setGroupName($groupName) + { + $this->container['groupName'] = $groupName; + + return $this; + } + + /** + * Gets subAccountIds + * + * @return int[] + */ + public function getSubAccountIds() + { + return $this->container['subAccountIds']; + } + + /** + * Sets subAccountIds + * + * @param int[] $subAccountIds Pass the list of sub-account Ids to be included in the group + * + * @return $this + */ + public function setSubAccountIds($subAccountIds) + { + $this->container['subAccountIds'] = $subAccountIds; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/Body1.php b/vendor/getbrevo/brevo-php/lib/Model/Body1.php new file mode 100644 index 0000000..b1a9608 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/Body1.php @@ -0,0 +1,338 @@ + 'string', + 'subAccountIds' => 'int[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'groupName' => null, + 'subAccountIds' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'groupName' => 'groupName', + 'subAccountIds' => 'subAccountIds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'groupName' => 'setGroupName', + 'subAccountIds' => 'setSubAccountIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'groupName' => 'getGroupName', + 'subAccountIds' => 'getSubAccountIds' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['groupName'] = isset($data['groupName']) ? $data['groupName'] : null; + $this->container['subAccountIds'] = isset($data['subAccountIds']) ? $data['subAccountIds'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['groupName'] === null) { + $invalidProperties[] = "'groupName' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets groupName + * + * @return string + */ + public function getGroupName() + { + return $this->container['groupName']; + } + + /** + * Sets groupName + * + * @param string $groupName The name of the group of sub-accounts + * + * @return $this + */ + public function setGroupName($groupName) + { + $this->container['groupName'] = $groupName; + + return $this; + } + + /** + * Gets subAccountIds + * + * @return int[] + */ + public function getSubAccountIds() + { + return $this->container['subAccountIds']; + } + + /** + * Sets subAccountIds + * + * @param int[] $subAccountIds Pass the list of sub-account Ids to be included in the group + * + * @return $this + */ + public function setSubAccountIds($subAccountIds) + { + $this->container['subAccountIds'] = $subAccountIds; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/Body10.php b/vendor/getbrevo/brevo-php/lib/Model/Body10.php new file mode 100644 index 0000000..2e0f62f --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/Body10.php @@ -0,0 +1,461 @@ + 'string', + 'text' => 'string', + 'agentId' => 'string', + 'receivedFrom' => 'string', + 'agentEmail' => 'string', + 'agentName' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'visitorId' => null, + 'text' => null, + 'agentId' => null, + 'receivedFrom' => null, + 'agentEmail' => 'email', + 'agentName' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'visitorId' => 'visitorId', + 'text' => 'text', + 'agentId' => 'agentId', + 'receivedFrom' => 'receivedFrom', + 'agentEmail' => 'agentEmail', + 'agentName' => 'agentName' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'visitorId' => 'setVisitorId', + 'text' => 'setText', + 'agentId' => 'setAgentId', + 'receivedFrom' => 'setReceivedFrom', + 'agentEmail' => 'setAgentEmail', + 'agentName' => 'setAgentName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'visitorId' => 'getVisitorId', + 'text' => 'getText', + 'agentId' => 'getAgentId', + 'receivedFrom' => 'getReceivedFrom', + 'agentEmail' => 'getAgentEmail', + 'agentName' => 'getAgentName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['visitorId'] = isset($data['visitorId']) ? $data['visitorId'] : null; + $this->container['text'] = isset($data['text']) ? $data['text'] : null; + $this->container['agentId'] = isset($data['agentId']) ? $data['agentId'] : null; + $this->container['receivedFrom'] = isset($data['receivedFrom']) ? $data['receivedFrom'] : null; + $this->container['agentEmail'] = isset($data['agentEmail']) ? $data['agentEmail'] : null; + $this->container['agentName'] = isset($data['agentName']) ? $data['agentName'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['visitorId'] === null) { + $invalidProperties[] = "'visitorId' can't be null"; + } + if ($this->container['text'] === null) { + $invalidProperties[] = "'text' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets visitorId + * + * @return string + */ + public function getVisitorId() + { + return $this->container['visitorId']; + } + + /** + * Sets visitorId + * + * @param string $visitorId visitor’s ID received from a webhook or generated by you to bind existing user account to Conversations + * + * @return $this + */ + public function setVisitorId($visitorId) + { + $this->container['visitorId'] = $visitorId; + + return $this; + } + + /** + * Gets text + * + * @return string + */ + public function getText() + { + return $this->container['text']; + } + + /** + * Sets text + * + * @param string $text message text + * + * @return $this + */ + public function setText($text) + { + $this->container['text'] = $text; + + return $this; + } + + /** + * Gets agentId + * + * @return string + */ + public function getAgentId() + { + return $this->container['agentId']; + } + + /** + * Sets agentId + * + * @param string $agentId agent ID. It can be found on agent’s page or received from a webhook. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). + * + * @return $this + */ + public function setAgentId($agentId) + { + $this->container['agentId'] = $agentId; + + return $this; + } + + /** + * Gets receivedFrom + * + * @return string + */ + public function getReceivedFrom() + { + return $this->container['receivedFrom']; + } + + /** + * Sets receivedFrom + * + * @param string $receivedFrom mark your messages to distinguish messages created by you from the others. + * + * @return $this + */ + public function setReceivedFrom($receivedFrom) + { + $this->container['receivedFrom'] = $receivedFrom; + + return $this; + } + + /** + * Gets agentEmail + * + * @return string + */ + public function getAgentEmail() + { + return $this->container['agentEmail']; + } + + /** + * Sets agentEmail + * + * @param string $agentEmail agent email. When sending messages from a standalone system, it’s hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address. + * + * @return $this + */ + public function setAgentEmail($agentEmail) + { + $this->container['agentEmail'] = $agentEmail; + + return $this; + } + + /** + * Gets agentName + * + * @return string + */ + public function getAgentName() + { + return $this->container['agentName']; + } + + /** + * Sets agentName + * + * @param string $agentName agent name + * + * @return $this + */ + public function setAgentName($agentName) + { + $this->container['agentName'] = $agentName; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/Body11.php b/vendor/getbrevo/brevo-php/lib/Model/Body11.php new file mode 100644 index 0000000..0899cd0 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/Body11.php @@ -0,0 +1,308 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'text' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'text' => 'text' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'text' => 'setText' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'text' => 'getText' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['text'] = isset($data['text']) ? $data['text'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['text'] === null) { + $invalidProperties[] = "'text' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets text + * + * @return string + */ + public function getText() + { + return $this->container['text']; + } + + /** + * Sets text + * + * @param string $text edited message text + * + * @return $this + */ + public function setText($text) + { + $this->container['text'] = $text; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/Body12.php b/vendor/getbrevo/brevo-php/lib/Model/Body12.php new file mode 100644 index 0000000..8905dbf --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/Body12.php @@ -0,0 +1,401 @@ + 'string', + 'text' => 'string', + 'agentId' => 'string', + 'groupId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'visitorId' => null, + 'text' => null, + 'agentId' => null, + 'groupId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'visitorId' => 'visitorId', + 'text' => 'text', + 'agentId' => 'agentId', + 'groupId' => 'groupId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'visitorId' => 'setVisitorId', + 'text' => 'setText', + 'agentId' => 'setAgentId', + 'groupId' => 'setGroupId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'visitorId' => 'getVisitorId', + 'text' => 'getText', + 'agentId' => 'getAgentId', + 'groupId' => 'getGroupId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['visitorId'] = isset($data['visitorId']) ? $data['visitorId'] : null; + $this->container['text'] = isset($data['text']) ? $data['text'] : null; + $this->container['agentId'] = isset($data['agentId']) ? $data['agentId'] : null; + $this->container['groupId'] = isset($data['groupId']) ? $data['groupId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['visitorId'] === null) { + $invalidProperties[] = "'visitorId' can't be null"; + } + if ($this->container['text'] === null) { + $invalidProperties[] = "'text' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets visitorId + * + * @return string + */ + public function getVisitorId() + { + return $this->container['visitorId']; + } + + /** + * Sets visitorId + * + * @param string $visitorId visitor’s ID received from a webhook or generated by you to bind existing user account to Conversations + * + * @return $this + */ + public function setVisitorId($visitorId) + { + $this->container['visitorId'] = $visitorId; + + return $this; + } + + /** + * Gets text + * + * @return string + */ + public function getText() + { + return $this->container['text']; + } + + /** + * Sets text + * + * @param string $text message text + * + * @return $this + */ + public function setText($text) + { + $this->container['text'] = $text; + + return $this; + } + + /** + * Gets agentId + * + * @return string + */ + public function getAgentId() + { + return $this->container['agentId']; + } + + /** + * Sets agentId + * + * @param string $agentId agent ID. It can be found on agent’s page or received from a webhook. Optional if `groupId` is set. + * + * @return $this + */ + public function setAgentId($agentId) + { + $this->container['agentId'] = $agentId; + + return $this; + } + + /** + * Gets groupId + * + * @return string + */ + public function getGroupId() + { + return $this->container['groupId']; + } + + /** + * Sets groupId + * + * @param string $groupId group ID. It can be found on group’s page. Optional if `agentId` is set. + * + * @return $this + */ + public function setGroupId($groupId) + { + $this->container['groupId'] = $groupId; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/Body13.php b/vendor/getbrevo/brevo-php/lib/Model/Body13.php new file mode 100644 index 0000000..7a8f8d4 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/Body13.php @@ -0,0 +1,308 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'text' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'text' => 'text' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'text' => 'setText' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'text' => 'getText' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['text'] = isset($data['text']) ? $data['text'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['text'] === null) { + $invalidProperties[] = "'text' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets text + * + * @return string + */ + public function getText() + { + return $this->container['text']; + } + + /** + * Sets text + * + * @param string $text edited message text + * + * @return $this + */ + public function setText($text) + { + $this->container['text'] = $text; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/Body14.php b/vendor/getbrevo/brevo-php/lib/Model/Body14.php new file mode 100644 index 0000000..9ec924d --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/Body14.php @@ -0,0 +1,395 @@ + 'string', + 'receivedFrom' => 'string', + 'agentEmail' => 'string', + 'agentName' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'agentId' => null, + 'receivedFrom' => null, + 'agentEmail' => 'email', + 'agentName' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'agentId' => 'agentId', + 'receivedFrom' => 'receivedFrom', + 'agentEmail' => 'agentEmail', + 'agentName' => 'agentName' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'agentId' => 'setAgentId', + 'receivedFrom' => 'setReceivedFrom', + 'agentEmail' => 'setAgentEmail', + 'agentName' => 'setAgentName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'agentId' => 'getAgentId', + 'receivedFrom' => 'getReceivedFrom', + 'agentEmail' => 'getAgentEmail', + 'agentName' => 'getAgentName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['agentId'] = isset($data['agentId']) ? $data['agentId'] : null; + $this->container['receivedFrom'] = isset($data['receivedFrom']) ? $data['receivedFrom'] : null; + $this->container['agentEmail'] = isset($data['agentEmail']) ? $data['agentEmail'] : null; + $this->container['agentName'] = isset($data['agentName']) ? $data['agentName'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets agentId + * + * @return string + */ + public function getAgentId() + { + return $this->container['agentId']; + } + + /** + * Sets agentId + * + * @param string $agentId agent ID. It can be found on agent’s page or received from a webhook. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). + * + * @return $this + */ + public function setAgentId($agentId) + { + $this->container['agentId'] = $agentId; + + return $this; + } + + /** + * Gets receivedFrom + * + * @return string + */ + public function getReceivedFrom() + { + return $this->container['receivedFrom']; + } + + /** + * Sets receivedFrom + * + * @param string $receivedFrom mark your messages to distinguish messages created by you from the others. + * + * @return $this + */ + public function setReceivedFrom($receivedFrom) + { + $this->container['receivedFrom'] = $receivedFrom; + + return $this; + } + + /** + * Gets agentEmail + * + * @return string + */ + public function getAgentEmail() + { + return $this->container['agentEmail']; + } + + /** + * Sets agentEmail + * + * @param string $agentEmail agent email. When sending online pings from a standalone system, it’s hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address. If there’s no agent with the specified email address in your Brevo organization, a dummy agent will be created automatically. + * + * @return $this + */ + public function setAgentEmail($agentEmail) + { + $this->container['agentEmail'] = $agentEmail; + + return $this; + } + + /** + * Gets agentName + * + * @return string + */ + public function getAgentName() + { + return $this->container['agentName']; + } + + /** + * Sets agentName + * + * @param string $agentName agent name. + * + * @return $this + */ + public function setAgentName($agentName) + { + $this->container['agentName'] = $agentName; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/Body2.php b/vendor/getbrevo/brevo-php/lib/Model/Body2.php new file mode 100644 index 0000000..f65c38f --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/Body2.php @@ -0,0 +1,368 @@ + 'string', + 'attributes' => 'object', + 'countryCode' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null, + 'attributes' => null, + 'countryCode' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'attributes' => 'attributes', + 'countryCode' => 'countryCode' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'attributes' => 'setAttributes', + 'countryCode' => 'setCountryCode' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'attributes' => 'getAttributes', + 'countryCode' => 'getCountryCode' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; + $this->container['countryCode'] = isset($data['countryCode']) ? $data['countryCode'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of company + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets attributes + * + * @return object + */ + public function getAttributes() + { + return $this->container['attributes']; + } + + /** + * Sets attributes + * + * @param object $attributes Attributes for company creation + * + * @return $this + */ + public function setAttributes($attributes) + { + $this->container['attributes'] = $attributes; + + return $this; + } + + /** + * Gets countryCode + * + * @return int + */ + public function getCountryCode() + { + return $this->container['countryCode']; + } + + /** + * Sets countryCode + * + * @param int $countryCode Country code if phone_number is passed in attributes. + * + * @return $this + */ + public function setCountryCode($countryCode) + { + $this->container['countryCode'] = $countryCode; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/Body3.php b/vendor/getbrevo/brevo-php/lib/Model/Body3.php new file mode 100644 index 0000000..fc74d91 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/Body3.php @@ -0,0 +1,365 @@ + 'string', + 'attributes' => 'object', + 'countryCode' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null, + 'attributes' => null, + 'countryCode' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'attributes' => 'attributes', + 'countryCode' => 'countryCode' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'attributes' => 'setAttributes', + 'countryCode' => 'setCountryCode' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'attributes' => 'getAttributes', + 'countryCode' => 'getCountryCode' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; + $this->container['countryCode'] = isset($data['countryCode']) ? $data['countryCode'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of company + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets attributes + * + * @return object + */ + public function getAttributes() + { + return $this->container['attributes']; + } + + /** + * Sets attributes + * + * @param object $attributes Attributes for company update + * + * @return $this + */ + public function setAttributes($attributes) + { + $this->container['attributes'] = $attributes; + + return $this; + } + + /** + * Gets countryCode + * + * @return int + */ + public function getCountryCode() + { + return $this->container['countryCode']; + } + + /** + * Sets countryCode + * + * @param int $countryCode Country code if phone_number is passed in attributes. + * + * @return $this + */ + public function setCountryCode($countryCode) + { + $this->container['countryCode'] = $countryCode; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/Body4.php b/vendor/getbrevo/brevo-php/lib/Model/Body4.php new file mode 100644 index 0000000..70e5320 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/Body4.php @@ -0,0 +1,395 @@ + 'int[]', + 'unlinkContactIds' => 'int[]', + 'linkDealsIds' => 'string[]', + 'unlinkDealsIds' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'linkContactIds' => 'int64', + 'unlinkContactIds' => 'int64', + 'linkDealsIds' => null, + 'unlinkDealsIds' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'linkContactIds' => 'linkContactIds', + 'unlinkContactIds' => 'unlinkContactIds', + 'linkDealsIds' => 'linkDealsIds', + 'unlinkDealsIds' => 'unlinkDealsIds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'linkContactIds' => 'setLinkContactIds', + 'unlinkContactIds' => 'setUnlinkContactIds', + 'linkDealsIds' => 'setLinkDealsIds', + 'unlinkDealsIds' => 'setUnlinkDealsIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'linkContactIds' => 'getLinkContactIds', + 'unlinkContactIds' => 'getUnlinkContactIds', + 'linkDealsIds' => 'getLinkDealsIds', + 'unlinkDealsIds' => 'getUnlinkDealsIds' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['linkContactIds'] = isset($data['linkContactIds']) ? $data['linkContactIds'] : null; + $this->container['unlinkContactIds'] = isset($data['unlinkContactIds']) ? $data['unlinkContactIds'] : null; + $this->container['linkDealsIds'] = isset($data['linkDealsIds']) ? $data['linkDealsIds'] : null; + $this->container['unlinkDealsIds'] = isset($data['unlinkDealsIds']) ? $data['unlinkDealsIds'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets linkContactIds + * + * @return int[] + */ + public function getLinkContactIds() + { + return $this->container['linkContactIds']; + } + + /** + * Sets linkContactIds + * + * @param int[] $linkContactIds Contact ids for contacts to be linked with company + * + * @return $this + */ + public function setLinkContactIds($linkContactIds) + { + $this->container['linkContactIds'] = $linkContactIds; + + return $this; + } + + /** + * Gets unlinkContactIds + * + * @return int[] + */ + public function getUnlinkContactIds() + { + return $this->container['unlinkContactIds']; + } + + /** + * Sets unlinkContactIds + * + * @param int[] $unlinkContactIds Contact ids for contacts to be unlinked from company + * + * @return $this + */ + public function setUnlinkContactIds($unlinkContactIds) + { + $this->container['unlinkContactIds'] = $unlinkContactIds; + + return $this; + } + + /** + * Gets linkDealsIds + * + * @return string[] + */ + public function getLinkDealsIds() + { + return $this->container['linkDealsIds']; + } + + /** + * Sets linkDealsIds + * + * @param string[] $linkDealsIds Deals ids for deals to be linked with company + * + * @return $this + */ + public function setLinkDealsIds($linkDealsIds) + { + $this->container['linkDealsIds'] = $linkDealsIds; + + return $this; + } + + /** + * Gets unlinkDealsIds + * + * @return string[] + */ + public function getUnlinkDealsIds() + { + return $this->container['unlinkDealsIds']; + } + + /** + * Sets unlinkDealsIds + * + * @param string[] $unlinkDealsIds Deals ids for deals to be unlinked from company + * + * @return $this + */ + public function setUnlinkDealsIds($unlinkDealsIds) + { + $this->container['unlinkDealsIds'] = $unlinkDealsIds; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/Body5.php b/vendor/getbrevo/brevo-php/lib/Model/Body5.php new file mode 100644 index 0000000..d87bba6 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/Body5.php @@ -0,0 +1,338 @@ + 'string', + 'attributes' => 'object' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null, + 'attributes' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'attributes' => 'attributes' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'attributes' => 'setAttributes' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'attributes' => 'getAttributes' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of deal + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets attributes + * + * @return object + */ + public function getAttributes() + { + return $this->container['attributes']; + } + + /** + * Sets attributes + * + * @param object $attributes Attributes for deal creation If you want to create a deal on a specific pipeline and stage you can use the following attributes `pipeline` and `deal_stage`. Pipeline and deal_stage are ids you can fetch using this endpoint `/crm/pipeline/details/{pipelineID}` + * + * @return $this + */ + public function setAttributes($attributes) + { + $this->container['attributes'] = $attributes; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/Body6.php b/vendor/getbrevo/brevo-php/lib/Model/Body6.php new file mode 100644 index 0000000..4175c72 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/Body6.php @@ -0,0 +1,335 @@ + 'string', + 'attributes' => 'object' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null, + 'attributes' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'attributes' => 'attributes' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'attributes' => 'setAttributes' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'attributes' => 'getAttributes' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of deal + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets attributes + * + * @return object + */ + public function getAttributes() + { + return $this->container['attributes']; + } + + /** + * Sets attributes + * + * @param object $attributes Attributes for deal update If you wish to update the pipeline of a deal you need to provide the `pipeline` and the `deal_stage`. Pipeline and deal_stage are ids you can fetch using this endpoint `/crm/pipeline/details/{pipelineID}` + * + * @return $this + */ + public function setAttributes($attributes) + { + $this->container['attributes'] = $attributes; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/Body7.php b/vendor/getbrevo/brevo-php/lib/Model/Body7.php new file mode 100644 index 0000000..30616fc --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/Body7.php @@ -0,0 +1,395 @@ + 'int[]', + 'unlinkContactIds' => 'int[]', + 'linkCompanyIds' => 'string[]', + 'unlinkCompanyIds' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'linkContactIds' => 'int64', + 'unlinkContactIds' => 'int64', + 'linkCompanyIds' => null, + 'unlinkCompanyIds' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'linkContactIds' => 'linkContactIds', + 'unlinkContactIds' => 'unlinkContactIds', + 'linkCompanyIds' => 'linkCompanyIds', + 'unlinkCompanyIds' => 'unlinkCompanyIds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'linkContactIds' => 'setLinkContactIds', + 'unlinkContactIds' => 'setUnlinkContactIds', + 'linkCompanyIds' => 'setLinkCompanyIds', + 'unlinkCompanyIds' => 'setUnlinkCompanyIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'linkContactIds' => 'getLinkContactIds', + 'unlinkContactIds' => 'getUnlinkContactIds', + 'linkCompanyIds' => 'getLinkCompanyIds', + 'unlinkCompanyIds' => 'getUnlinkCompanyIds' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['linkContactIds'] = isset($data['linkContactIds']) ? $data['linkContactIds'] : null; + $this->container['unlinkContactIds'] = isset($data['unlinkContactIds']) ? $data['unlinkContactIds'] : null; + $this->container['linkCompanyIds'] = isset($data['linkCompanyIds']) ? $data['linkCompanyIds'] : null; + $this->container['unlinkCompanyIds'] = isset($data['unlinkCompanyIds']) ? $data['unlinkCompanyIds'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets linkContactIds + * + * @return int[] + */ + public function getLinkContactIds() + { + return $this->container['linkContactIds']; + } + + /** + * Sets linkContactIds + * + * @param int[] $linkContactIds Contact ids for contacts to be linked with deal + * + * @return $this + */ + public function setLinkContactIds($linkContactIds) + { + $this->container['linkContactIds'] = $linkContactIds; + + return $this; + } + + /** + * Gets unlinkContactIds + * + * @return int[] + */ + public function getUnlinkContactIds() + { + return $this->container['unlinkContactIds']; + } + + /** + * Sets unlinkContactIds + * + * @param int[] $unlinkContactIds Contact ids for contacts to be unlinked from deal + * + * @return $this + */ + public function setUnlinkContactIds($unlinkContactIds) + { + $this->container['unlinkContactIds'] = $unlinkContactIds; + + return $this; + } + + /** + * Gets linkCompanyIds + * + * @return string[] + */ + public function getLinkCompanyIds() + { + return $this->container['linkCompanyIds']; + } + + /** + * Sets linkCompanyIds + * + * @param string[] $linkCompanyIds Company ids to be linked with deal + * + * @return $this + */ + public function setLinkCompanyIds($linkCompanyIds) + { + $this->container['linkCompanyIds'] = $linkCompanyIds; + + return $this; + } + + /** + * Gets unlinkCompanyIds + * + * @return string[] + */ + public function getUnlinkCompanyIds() + { + return $this->container['unlinkCompanyIds']; + } + + /** + * Sets unlinkCompanyIds + * + * @param string[] $unlinkCompanyIds Company ids to be unlinked from deal + * + * @return $this + */ + public function setUnlinkCompanyIds($unlinkCompanyIds) + { + $this->container['unlinkCompanyIds'] = $unlinkCompanyIds; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/Body8.php b/vendor/getbrevo/brevo-php/lib/Model/Body8.php new file mode 100644 index 0000000..c4abdf7 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/Body8.php @@ -0,0 +1,623 @@ + 'string', + 'duration' => 'int', + 'taskTypeId' => 'string', + 'date' => '\DateTime', + 'notes' => 'string', + 'done' => 'bool', + 'assignToId' => 'string', + 'contactsIds' => 'int[]', + 'dealsIds' => 'string[]', + 'companiesIds' => 'string[]', + 'reminder' => '\Brevo\Client\Model\TaskReminder' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null, + 'duration' => 'int64', + 'taskTypeId' => null, + 'date' => 'date-time', + 'notes' => null, + 'done' => null, + 'assignToId' => null, + 'contactsIds' => null, + 'dealsIds' => null, + 'companiesIds' => null, + 'reminder' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'duration' => 'duration', + 'taskTypeId' => 'taskTypeId', + 'date' => 'date', + 'notes' => 'notes', + 'done' => 'done', + 'assignToId' => 'assignToId', + 'contactsIds' => 'contactsIds', + 'dealsIds' => 'dealsIds', + 'companiesIds' => 'companiesIds', + 'reminder' => 'reminder' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'duration' => 'setDuration', + 'taskTypeId' => 'setTaskTypeId', + 'date' => 'setDate', + 'notes' => 'setNotes', + 'done' => 'setDone', + 'assignToId' => 'setAssignToId', + 'contactsIds' => 'setContactsIds', + 'dealsIds' => 'setDealsIds', + 'companiesIds' => 'setCompaniesIds', + 'reminder' => 'setReminder' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'duration' => 'getDuration', + 'taskTypeId' => 'getTaskTypeId', + 'date' => 'getDate', + 'notes' => 'getNotes', + 'done' => 'getDone', + 'assignToId' => 'getAssignToId', + 'contactsIds' => 'getContactsIds', + 'dealsIds' => 'getDealsIds', + 'companiesIds' => 'getCompaniesIds', + 'reminder' => 'getReminder' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['duration'] = isset($data['duration']) ? $data['duration'] : null; + $this->container['taskTypeId'] = isset($data['taskTypeId']) ? $data['taskTypeId'] : null; + $this->container['date'] = isset($data['date']) ? $data['date'] : null; + $this->container['notes'] = isset($data['notes']) ? $data['notes'] : null; + $this->container['done'] = isset($data['done']) ? $data['done'] : null; + $this->container['assignToId'] = isset($data['assignToId']) ? $data['assignToId'] : null; + $this->container['contactsIds'] = isset($data['contactsIds']) ? $data['contactsIds'] : null; + $this->container['dealsIds'] = isset($data['dealsIds']) ? $data['dealsIds'] : null; + $this->container['companiesIds'] = isset($data['companiesIds']) ? $data['companiesIds'] : null; + $this->container['reminder'] = isset($data['reminder']) ? $data['reminder'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if (!is_null($this->container['duration']) && ($this->container['duration'] < 0)) { + $invalidProperties[] = "invalid value for 'duration', must be bigger than or equal to 0."; + } + + if ($this->container['taskTypeId'] === null) { + $invalidProperties[] = "'taskTypeId' can't be null"; + } + if ($this->container['date'] === null) { + $invalidProperties[] = "'date' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of task + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets duration + * + * @return int + */ + public function getDuration() + { + return $this->container['duration']; + } + + /** + * Sets duration + * + * @param int $duration Duration of task in milliseconds [1 minute = 60000 ms] + * + * @return $this + */ + public function setDuration($duration) + { + + if (!is_null($duration) && ($duration < 0)) { + throw new \InvalidArgumentException('invalid value for $duration when calling Body8., must be bigger than or equal to 0.'); + } + + $this->container['duration'] = $duration; + + return $this; + } + + /** + * Gets taskTypeId + * + * @return string + */ + public function getTaskTypeId() + { + return $this->container['taskTypeId']; + } + + /** + * Sets taskTypeId + * + * @param string $taskTypeId Id for type of task e.g Call / Email / Meeting etc. + * + * @return $this + */ + public function setTaskTypeId($taskTypeId) + { + $this->container['taskTypeId'] = $taskTypeId; + + return $this; + } + + /** + * Gets date + * + * @return \DateTime + */ + public function getDate() + { + return $this->container['date']; + } + + /** + * Sets date + * + * @param \DateTime $date Task due date and time + * + * @return $this + */ + public function setDate($date) + { + $this->container['date'] = $date; + + return $this; + } + + /** + * Gets notes + * + * @return string + */ + public function getNotes() + { + return $this->container['notes']; + } + + /** + * Sets notes + * + * @param string $notes Notes added to a task + * + * @return $this + */ + public function setNotes($notes) + { + $this->container['notes'] = $notes; + + return $this; + } + + /** + * Gets done + * + * @return bool + */ + public function getDone() + { + return $this->container['done']; + } + + /** + * Sets done + * + * @param bool $done Task marked as done + * + * @return $this + */ + public function setDone($done) + { + $this->container['done'] = $done; + + return $this; + } + + /** + * Gets assignToId + * + * @return string + */ + public function getAssignToId() + { + return $this->container['assignToId']; + } + + /** + * Sets assignToId + * + * @param string $assignToId User id to whom task is assigned + * + * @return $this + */ + public function setAssignToId($assignToId) + { + $this->container['assignToId'] = $assignToId; + + return $this; + } + + /** + * Gets contactsIds + * + * @return int[] + */ + public function getContactsIds() + { + return $this->container['contactsIds']; + } + + /** + * Sets contactsIds + * + * @param int[] $contactsIds Contact ids for contacts linked to this task + * + * @return $this + */ + public function setContactsIds($contactsIds) + { + $this->container['contactsIds'] = $contactsIds; + + return $this; + } + + /** + * Gets dealsIds + * + * @return string[] + */ + public function getDealsIds() + { + return $this->container['dealsIds']; + } + + /** + * Sets dealsIds + * + * @param string[] $dealsIds Deal ids for deals a task is linked to + * + * @return $this + */ + public function setDealsIds($dealsIds) + { + $this->container['dealsIds'] = $dealsIds; + + return $this; + } + + /** + * Gets companiesIds + * + * @return string[] + */ + public function getCompaniesIds() + { + return $this->container['companiesIds']; + } + + /** + * Sets companiesIds + * + * @param string[] $companiesIds Companies ids for companies a task is linked to + * + * @return $this + */ + public function setCompaniesIds($companiesIds) + { + $this->container['companiesIds'] = $companiesIds; + + return $this; + } + + /** + * Gets reminder + * + * @return \Brevo\Client\Model\TaskReminder + */ + public function getReminder() + { + return $this->container['reminder']; + } + + /** + * Sets reminder + * + * @param \Brevo\Client\Model\TaskReminder $reminder reminder + * + * @return $this + */ + public function setReminder($reminder) + { + $this->container['reminder'] = $reminder; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/Body9.php b/vendor/getbrevo/brevo-php/lib/Model/Body9.php new file mode 100644 index 0000000..6f12e43 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/Body9.php @@ -0,0 +1,575 @@ + 'string', + 'duration' => 'int', + 'taskTypeId' => 'string', + 'date' => '\DateTime', + 'notes' => 'string', + 'done' => 'bool', + 'assignToId' => 'string', + 'contactsIds' => 'int[]', + 'dealsIds' => 'string[]', + 'companiesIds' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null, + 'duration' => null, + 'taskTypeId' => null, + 'date' => 'date-time', + 'notes' => null, + 'done' => null, + 'assignToId' => null, + 'contactsIds' => null, + 'dealsIds' => null, + 'companiesIds' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'duration' => 'duration', + 'taskTypeId' => 'taskTypeId', + 'date' => 'date', + 'notes' => 'notes', + 'done' => 'done', + 'assignToId' => 'assignToId', + 'contactsIds' => 'contactsIds', + 'dealsIds' => 'dealsIds', + 'companiesIds' => 'companiesIds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'duration' => 'setDuration', + 'taskTypeId' => 'setTaskTypeId', + 'date' => 'setDate', + 'notes' => 'setNotes', + 'done' => 'setDone', + 'assignToId' => 'setAssignToId', + 'contactsIds' => 'setContactsIds', + 'dealsIds' => 'setDealsIds', + 'companiesIds' => 'setCompaniesIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'duration' => 'getDuration', + 'taskTypeId' => 'getTaskTypeId', + 'date' => 'getDate', + 'notes' => 'getNotes', + 'done' => 'getDone', + 'assignToId' => 'getAssignToId', + 'contactsIds' => 'getContactsIds', + 'dealsIds' => 'getDealsIds', + 'companiesIds' => 'getCompaniesIds' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['duration'] = isset($data['duration']) ? $data['duration'] : null; + $this->container['taskTypeId'] = isset($data['taskTypeId']) ? $data['taskTypeId'] : null; + $this->container['date'] = isset($data['date']) ? $data['date'] : null; + $this->container['notes'] = isset($data['notes']) ? $data['notes'] : null; + $this->container['done'] = isset($data['done']) ? $data['done'] : null; + $this->container['assignToId'] = isset($data['assignToId']) ? $data['assignToId'] : null; + $this->container['contactsIds'] = isset($data['contactsIds']) ? $data['contactsIds'] : null; + $this->container['dealsIds'] = isset($data['dealsIds']) ? $data['dealsIds'] : null; + $this->container['companiesIds'] = isset($data['companiesIds']) ? $data['companiesIds'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of task + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets duration + * + * @return int + */ + public function getDuration() + { + return $this->container['duration']; + } + + /** + * Sets duration + * + * @param int $duration Duration of task in milliseconds [1 minute = 60000 ms] + * + * @return $this + */ + public function setDuration($duration) + { + $this->container['duration'] = $duration; + + return $this; + } + + /** + * Gets taskTypeId + * + * @return string + */ + public function getTaskTypeId() + { + return $this->container['taskTypeId']; + } + + /** + * Sets taskTypeId + * + * @param string $taskTypeId Id for type of task e.g Call / Email / Meeting etc. + * + * @return $this + */ + public function setTaskTypeId($taskTypeId) + { + $this->container['taskTypeId'] = $taskTypeId; + + return $this; + } + + /** + * Gets date + * + * @return \DateTime + */ + public function getDate() + { + return $this->container['date']; + } + + /** + * Sets date + * + * @param \DateTime $date Task date/time + * + * @return $this + */ + public function setDate($date) + { + $this->container['date'] = $date; + + return $this; + } + + /** + * Gets notes + * + * @return string + */ + public function getNotes() + { + return $this->container['notes']; + } + + /** + * Sets notes + * + * @param string $notes Notes added to a task + * + * @return $this + */ + public function setNotes($notes) + { + $this->container['notes'] = $notes; + + return $this; + } + + /** + * Gets done + * + * @return bool + */ + public function getDone() + { + return $this->container['done']; + } + + /** + * Sets done + * + * @param bool $done Task marked as done + * + * @return $this + */ + public function setDone($done) + { + $this->container['done'] = $done; + + return $this; + } + + /** + * Gets assignToId + * + * @return string + */ + public function getAssignToId() + { + return $this->container['assignToId']; + } + + /** + * Sets assignToId + * + * @param string $assignToId User id to whom task is assigned + * + * @return $this + */ + public function setAssignToId($assignToId) + { + $this->container['assignToId'] = $assignToId; + + return $this; + } + + /** + * Gets contactsIds + * + * @return int[] + */ + public function getContactsIds() + { + return $this->container['contactsIds']; + } + + /** + * Sets contactsIds + * + * @param int[] $contactsIds Contact ids for contacts linked to this task + * + * @return $this + */ + public function setContactsIds($contactsIds) + { + $this->container['contactsIds'] = $contactsIds; + + return $this; + } + + /** + * Gets dealsIds + * + * @return string[] + */ + public function getDealsIds() + { + return $this->container['dealsIds']; + } + + /** + * Sets dealsIds + * + * @param string[] $dealsIds Deal ids for deals a task is linked to + * + * @return $this + */ + public function setDealsIds($dealsIds) + { + $this->container['dealsIds'] = $dealsIds; + + return $this; + } + + /** + * Gets companiesIds + * + * @return string[] + */ + public function getCompaniesIds() + { + return $this->container['companiesIds']; + } + + /** + * Sets companiesIds + * + * @param string[] $companiesIds Companies ids for companies a task is linked to + * + * @return $this + */ + public function setCompaniesIds($companiesIds) + { + $this->container['companiesIds'] = $companiesIds; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/BodyVariablesItems.php b/vendor/getbrevo/brevo-php/lib/Model/BodyVariablesItems.php new file mode 100644 index 0000000..f5fa31c --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/BodyVariablesItems.php @@ -0,0 +1,280 @@ +listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CompaniesList.php b/vendor/getbrevo/brevo-php/lib/Model/CompaniesList.php new file mode 100644 index 0000000..f263577 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CompaniesList.php @@ -0,0 +1,306 @@ + '\Brevo\Client\Model\Company[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'items' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'items' => 'items' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'items' => 'setItems' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'items' => 'getItems' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['items'] = isset($data['items']) ? $data['items'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets items + * + * @return \Brevo\Client\Model\Company[] + */ + public function getItems() + { + return $this->container['items']; + } + + /** + * Sets items + * + * @param \Brevo\Client\Model\Company[] $items List of compaies + * + * @return $this + */ + public function setItems($items) + { + $this->container['items'] = $items; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/Company.php b/vendor/getbrevo/brevo-php/lib/Model/Company.php new file mode 100644 index 0000000..f0a5b0c --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/Company.php @@ -0,0 +1,396 @@ + 'string', + 'attributes' => 'object', + 'linkedContactsIds' => 'int[]', + 'linkedDealsIds' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => null, + 'attributes' => null, + 'linkedContactsIds' => null, + 'linkedDealsIds' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'attributes' => 'attributes', + 'linkedContactsIds' => 'linkedContactsIds', + 'linkedDealsIds' => 'linkedDealsIds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'attributes' => 'setAttributes', + 'linkedContactsIds' => 'setLinkedContactsIds', + 'linkedDealsIds' => 'setLinkedDealsIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'attributes' => 'getAttributes', + 'linkedContactsIds' => 'getLinkedContactsIds', + 'linkedDealsIds' => 'getLinkedDealsIds' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; + $this->container['linkedContactsIds'] = isset($data['linkedContactsIds']) ? $data['linkedContactsIds'] : null; + $this->container['linkedDealsIds'] = isset($data['linkedDealsIds']) ? $data['linkedDealsIds'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Unique company id + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets attributes + * + * @return object + */ + public function getAttributes() + { + return $this->container['attributes']; + } + + /** + * Sets attributes + * + * @param object $attributes Company attributes with values + * + * @return $this + */ + public function setAttributes($attributes) + { + $this->container['attributes'] = $attributes; + + return $this; + } + + /** + * Gets linkedContactsIds + * + * @return int[] + */ + public function getLinkedContactsIds() + { + return $this->container['linkedContactsIds']; + } + + /** + * Sets linkedContactsIds + * + * @param int[] $linkedContactsIds Contact ids for contacts linked to this company + * + * @return $this + */ + public function setLinkedContactsIds($linkedContactsIds) + { + $this->container['linkedContactsIds'] = $linkedContactsIds; + + return $this; + } + + /** + * Gets linkedDealsIds + * + * @return string[] + */ + public function getLinkedDealsIds() + { + return $this->container['linkedDealsIds']; + } + + /** + * Sets linkedDealsIds + * + * @param string[] $linkedDealsIds Deals ids for companies linked to this company + * + * @return $this + */ + public function setLinkedDealsIds($linkedDealsIds) + { + $this->container['linkedDealsIds'] = $linkedDealsIds; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CompanyAttributes.php b/vendor/getbrevo/brevo-php/lib/Model/CompanyAttributes.php new file mode 100644 index 0000000..1ba5907 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CompanyAttributes.php @@ -0,0 +1,281 @@ +listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CompanyAttributesInner.php b/vendor/getbrevo/brevo-php/lib/Model/CompanyAttributesInner.php new file mode 100644 index 0000000..c41cc8a --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CompanyAttributesInner.php @@ -0,0 +1,426 @@ + 'string', + 'label' => 'string', + 'attributeTypeName' => 'string', + 'attributeOptions' => 'object[]', + 'isRequired' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'internalName' => null, + 'label' => null, + 'attributeTypeName' => null, + 'attributeOptions' => null, + 'isRequired' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'internalName' => 'internalName', + 'label' => 'label', + 'attributeTypeName' => 'attributeTypeName', + 'attributeOptions' => 'attributeOptions', + 'isRequired' => 'isRequired' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'internalName' => 'setInternalName', + 'label' => 'setLabel', + 'attributeTypeName' => 'setAttributeTypeName', + 'attributeOptions' => 'setAttributeOptions', + 'isRequired' => 'setIsRequired' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'internalName' => 'getInternalName', + 'label' => 'getLabel', + 'attributeTypeName' => 'getAttributeTypeName', + 'attributeOptions' => 'getAttributeOptions', + 'isRequired' => 'getIsRequired' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['internalName'] = isset($data['internalName']) ? $data['internalName'] : null; + $this->container['label'] = isset($data['label']) ? $data['label'] : null; + $this->container['attributeTypeName'] = isset($data['attributeTypeName']) ? $data['attributeTypeName'] : null; + $this->container['attributeOptions'] = isset($data['attributeOptions']) ? $data['attributeOptions'] : null; + $this->container['isRequired'] = isset($data['isRequired']) ? $data['isRequired'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets internalName + * + * @return string + */ + public function getInternalName() + { + return $this->container['internalName']; + } + + /** + * Sets internalName + * + * @param string $internalName internalName + * + * @return $this + */ + public function setInternalName($internalName) + { + $this->container['internalName'] = $internalName; + + return $this; + } + + /** + * Gets label + * + * @return string + */ + public function getLabel() + { + return $this->container['label']; + } + + /** + * Sets label + * + * @param string $label label + * + * @return $this + */ + public function setLabel($label) + { + $this->container['label'] = $label; + + return $this; + } + + /** + * Gets attributeTypeName + * + * @return string + */ + public function getAttributeTypeName() + { + return $this->container['attributeTypeName']; + } + + /** + * Sets attributeTypeName + * + * @param string $attributeTypeName attributeTypeName + * + * @return $this + */ + public function setAttributeTypeName($attributeTypeName) + { + $this->container['attributeTypeName'] = $attributeTypeName; + + return $this; + } + + /** + * Gets attributeOptions + * + * @return object[] + */ + public function getAttributeOptions() + { + return $this->container['attributeOptions']; + } + + /** + * Sets attributeOptions + * + * @param object[] $attributeOptions attributeOptions + * + * @return $this + */ + public function setAttributeOptions($attributeOptions) + { + $this->container['attributeOptions'] = $attributeOptions; + + return $this; + } + + /** + * Gets isRequired + * + * @return bool + */ + public function getIsRequired() + { + return $this->container['isRequired']; + } + + /** + * Sets isRequired + * + * @param bool $isRequired isRequired + * + * @return $this + */ + public function setIsRequired($isRequired) + { + $this->container['isRequired'] = $isRequired; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/ComponentItems.php b/vendor/getbrevo/brevo-php/lib/Model/ComponentItems.php new file mode 100644 index 0000000..69d5d34 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/ComponentItems.php @@ -0,0 +1,335 @@ + 'string', + 'text' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'type' => null, + 'text' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'type' => 'type', + 'text' => 'text' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'type' => 'setType', + 'text' => 'setText' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'type' => 'getType', + 'text' => 'getText' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['type'] = isset($data['type']) ? $data['type'] : null; + $this->container['text'] = isset($data['text']) ? $data['text'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type type + * + * @return $this + */ + public function setType($type) + { + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets text + * + * @return string + */ + public function getText() + { + return $this->container['text']; + } + + /** + * Sets text + * + * @param string $text text + * + * @return $this + */ + public function setText($text) + { + $this->container['text'] = $text; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/Contact.php b/vendor/getbrevo/brevo-php/lib/Model/Contact.php new file mode 100644 index 0000000..a000b88 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/Contact.php @@ -0,0 +1,518 @@ + 'object', + 'email' => 'string', + 'assignToId' => 'string', + 'contactsId' => 'int', + 'crmLists' => 'object', + 'attributes' => 'object', + 'createdAt' => '\DateTime', + 'updatedAt' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'virtualNextTask' => null, + 'email' => null, + 'assignToId' => null, + 'contactsId' => null, + 'crmLists' => null, + 'attributes' => null, + 'createdAt' => 'date-time', + 'updatedAt' => 'date-time' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'virtualNextTask' => 'virtualNextTask', + 'email' => 'email', + 'assignToId' => 'assignToId', + 'contactsId' => 'contactsId', + 'crmLists' => 'crmLists', + 'attributes' => 'attributes', + 'createdAt' => 'createdAt', + 'updatedAt' => 'updatedAt' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'virtualNextTask' => 'setVirtualNextTask', + 'email' => 'setEmail', + 'assignToId' => 'setAssignToId', + 'contactsId' => 'setContactsId', + 'crmLists' => 'setCrmLists', + 'attributes' => 'setAttributes', + 'createdAt' => 'setCreatedAt', + 'updatedAt' => 'setUpdatedAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'virtualNextTask' => 'getVirtualNextTask', + 'email' => 'getEmail', + 'assignToId' => 'getAssignToId', + 'contactsId' => 'getContactsId', + 'crmLists' => 'getCrmLists', + 'attributes' => 'getAttributes', + 'createdAt' => 'getCreatedAt', + 'updatedAt' => 'getUpdatedAt' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['virtualNextTask'] = isset($data['virtualNextTask']) ? $data['virtualNextTask'] : null; + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['assignToId'] = isset($data['assignToId']) ? $data['assignToId'] : null; + $this->container['contactsId'] = isset($data['contactsId']) ? $data['contactsId'] : null; + $this->container['crmLists'] = isset($data['crmLists']) ? $data['crmLists'] : null; + $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; + $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; + $this->container['updatedAt'] = isset($data['updatedAt']) ? $data['updatedAt'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + if ($this->container['crmLists'] === null) { + $invalidProperties[] = "'crmLists' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets virtualNextTask + * + * @return object + */ + public function getVirtualNextTask() + { + return $this->container['virtualNextTask']; + } + + /** + * Sets virtualNextTask + * + * @param object $virtualNextTask Next incomplete task of contact + * + * @return $this + */ + public function setVirtualNextTask($virtualNextTask) + { + $this->container['virtualNextTask'] = $virtualNextTask; + + return $this; + } + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email Contact email + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets assignToId + * + * @return string + */ + public function getAssignToId() + { + return $this->container['assignToId']; + } + + /** + * Sets assignToId + * + * @param string $assignToId User id to whom contact is assigned + * + * @return $this + */ + public function setAssignToId($assignToId) + { + $this->container['assignToId'] = $assignToId; + + return $this; + } + + /** + * Gets contactsId + * + * @return int + */ + public function getContactsId() + { + return $this->container['contactsId']; + } + + /** + * Sets contactsId + * + * @param int $contactsId Contact id + * + * @return $this + */ + public function setContactsId($contactsId) + { + $this->container['contactsId'] = $contactsId; + + return $this; + } + + /** + * Gets crmLists + * + * @return object + */ + public function getCrmLists() + { + return $this->container['crmLists']; + } + + /** + * Sets crmLists + * + * @param object $crmLists CRM lists in which contact is added + * + * @return $this + */ + public function setCrmLists($crmLists) + { + $this->container['crmLists'] = $crmLists; + + return $this; + } + + /** + * Gets attributes + * + * @return object + */ + public function getAttributes() + { + return $this->container['attributes']; + } + + /** + * Sets attributes + * + * @param object $attributes Contact attributes e.g firstname / lastname / SMS etc. + * + * @return $this + */ + public function setAttributes($attributes) + { + $this->container['attributes'] = $attributes; + + return $this; + } + + /** + * Gets createdAt + * + * @return \DateTime + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param \DateTime $createdAt Contact created date/time + * + * @return $this + */ + public function setCreatedAt($createdAt) + { + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets updatedAt + * + * @return \DateTime + */ + public function getUpdatedAt() + { + return $this->container['updatedAt']; + } + + /** + * Sets updatedAt + * + * @param \DateTime $updatedAt Contact updated date/time + * + * @return $this + */ + public function setUpdatedAt($updatedAt) + { + $this->container['updatedAt'] = $updatedAt; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/ConversationsMessage.php b/vendor/getbrevo/brevo-php/lib/Model/ConversationsMessage.php new file mode 100644 index 0000000..b1eb84a --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/ConversationsMessage.php @@ -0,0 +1,617 @@ + 'string', + 'type' => 'string', + 'text' => 'string', + 'visitorId' => 'string', + 'agentId' => 'string', + 'agentName' => 'string', + 'createdAt' => 'int', + 'isPushed' => 'bool', + 'receivedFrom' => 'string', + 'file' => '\Brevo\Client\Model\ConversationsMessageFile' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => null, + 'type' => null, + 'text' => null, + 'visitorId' => null, + 'agentId' => null, + 'agentName' => null, + 'createdAt' => 'int64', + 'isPushed' => null, + 'receivedFrom' => null, + 'file' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'type' => 'type', + 'text' => 'text', + 'visitorId' => 'visitorId', + 'agentId' => 'agentId', + 'agentName' => 'agentName', + 'createdAt' => 'createdAt', + 'isPushed' => 'isPushed', + 'receivedFrom' => 'receivedFrom', + 'file' => 'file' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'type' => 'setType', + 'text' => 'setText', + 'visitorId' => 'setVisitorId', + 'agentId' => 'setAgentId', + 'agentName' => 'setAgentName', + 'createdAt' => 'setCreatedAt', + 'isPushed' => 'setIsPushed', + 'receivedFrom' => 'setReceivedFrom', + 'file' => 'setFile' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'type' => 'getType', + 'text' => 'getText', + 'visitorId' => 'getVisitorId', + 'agentId' => 'getAgentId', + 'agentName' => 'getAgentName', + 'createdAt' => 'getCreatedAt', + 'isPushed' => 'getIsPushed', + 'receivedFrom' => 'getReceivedFrom', + 'file' => 'getFile' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const TYPE_AGENT = 'agent'; + const TYPE_VISITOR = 'visitor'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_AGENT, + self::TYPE_VISITOR, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : null; + $this->container['text'] = isset($data['text']) ? $data['text'] : null; + $this->container['visitorId'] = isset($data['visitorId']) ? $data['visitorId'] : null; + $this->container['agentId'] = isset($data['agentId']) ? $data['agentId'] : null; + $this->container['agentName'] = isset($data['agentName']) ? $data['agentName'] : null; + $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; + $this->container['isPushed'] = isset($data['isPushed']) ? $data['isPushed'] : null; + $this->container['receivedFrom'] = isset($data['receivedFrom']) ? $data['receivedFrom'] : null; + $this->container['file'] = isset($data['file']) ? $data['file'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if (!is_null($this->container['createdAt']) && ($this->container['createdAt'] < 0)) { + $invalidProperties[] = "invalid value for 'createdAt', must be bigger than or equal to 0."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Message ID. It can be used for further manipulations with the message. + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type `\"agent\"` for agents’ messages, `\"visitor\"` for visitors’ messages. + * + * @return $this + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($type) && !in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets text + * + * @return string + */ + public function getText() + { + return $this->container['text']; + } + + /** + * Sets text + * + * @param string $text Message text or name of the attached file + * + * @return $this + */ + public function setText($text) + { + $this->container['text'] = $text; + + return $this; + } + + /** + * Gets visitorId + * + * @return string + */ + public function getVisitorId() + { + return $this->container['visitorId']; + } + + /** + * Sets visitorId + * + * @param string $visitorId visitor’s ID + * + * @return $this + */ + public function setVisitorId($visitorId) + { + $this->container['visitorId'] = $visitorId; + + return $this; + } + + /** + * Gets agentId + * + * @return string + */ + public function getAgentId() + { + return $this->container['agentId']; + } + + /** + * Sets agentId + * + * @param string $agentId ID of the agent on whose behalf the message was sent (only in messages sent by an agent). + * + * @return $this + */ + public function setAgentId($agentId) + { + $this->container['agentId'] = $agentId; + + return $this; + } + + /** + * Gets agentName + * + * @return string + */ + public function getAgentName() + { + return $this->container['agentName']; + } + + /** + * Sets agentName + * + * @param string $agentName Agent’s name as displayed to the visitor. Only in the messages sent by an agent. + * + * @return $this + */ + public function setAgentName($agentName) + { + $this->container['agentName'] = $agentName; + + return $this; + } + + /** + * Gets createdAt + * + * @return int + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param int $createdAt Timestamp in milliseconds. + * + * @return $this + */ + public function setCreatedAt($createdAt) + { + + if (!is_null($createdAt) && ($createdAt < 0)) { + throw new \InvalidArgumentException('invalid value for $createdAt when calling ConversationsMessage., must be bigger than or equal to 0.'); + } + + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets isPushed + * + * @return bool + */ + public function getIsPushed() + { + return $this->container['isPushed']; + } + + /** + * Sets isPushed + * + * @param bool $isPushed `true` for pushed messages + * + * @return $this + */ + public function setIsPushed($isPushed) + { + $this->container['isPushed'] = $isPushed; + + return $this; + } + + /** + * Gets receivedFrom + * + * @return string + */ + public function getReceivedFrom() + { + return $this->container['receivedFrom']; + } + + /** + * Sets receivedFrom + * + * @param string $receivedFrom In two-way integrations, messages sent via REST API can be marked with receivedFrom property and then filtered out when received in a webhook to avoid infinite loop. + * + * @return $this + */ + public function setReceivedFrom($receivedFrom) + { + $this->container['receivedFrom'] = $receivedFrom; + + return $this; + } + + /** + * Gets file + * + * @return \Brevo\Client\Model\ConversationsMessageFile + */ + public function getFile() + { + return $this->container['file']; + } + + /** + * Sets file + * + * @param \Brevo\Client\Model\ConversationsMessageFile $file file + * + * @return $this + */ + public function setFile($file) + { + $this->container['file'] = $file; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/ConversationsMessageFile.php b/vendor/getbrevo/brevo-php/lib/Model/ConversationsMessageFile.php new file mode 100644 index 0000000..ef207ef --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/ConversationsMessageFile.php @@ -0,0 +1,434 @@ + 'string', + 'size' => 'int', + 'isImage' => 'bool', + 'url' => 'string', + 'imageInfo' => '\Brevo\Client\Model\ConversationsMessageFileImageInfo' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'filename' => null, + 'size' => 'int64', + 'isImage' => null, + 'url' => 'url', + 'imageInfo' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'filename' => 'filename', + 'size' => 'size', + 'isImage' => 'isImage', + 'url' => 'url', + 'imageInfo' => 'imageInfo' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'filename' => 'setFilename', + 'size' => 'setSize', + 'isImage' => 'setIsImage', + 'url' => 'setUrl', + 'imageInfo' => 'setImageInfo' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'filename' => 'getFilename', + 'size' => 'getSize', + 'isImage' => 'getIsImage', + 'url' => 'getUrl', + 'imageInfo' => 'getImageInfo' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['filename'] = isset($data['filename']) ? $data['filename'] : null; + $this->container['size'] = isset($data['size']) ? $data['size'] : null; + $this->container['isImage'] = isset($data['isImage']) ? $data['isImage'] : null; + $this->container['url'] = isset($data['url']) ? $data['url'] : null; + $this->container['imageInfo'] = isset($data['imageInfo']) ? $data['imageInfo'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if (!is_null($this->container['size']) && ($this->container['size'] < 0)) { + $invalidProperties[] = "invalid value for 'size', must be bigger than or equal to 0."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets filename + * + * @return string + */ + public function getFilename() + { + return $this->container['filename']; + } + + /** + * Sets filename + * + * @param string $filename Name of the file + * + * @return $this + */ + public function setFilename($filename) + { + $this->container['filename'] = $filename; + + return $this; + } + + /** + * Gets size + * + * @return int + */ + public function getSize() + { + return $this->container['size']; + } + + /** + * Sets size + * + * @param int $size Size in bytes + * + * @return $this + */ + public function setSize($size) + { + + if (!is_null($size) && ($size < 0)) { + throw new \InvalidArgumentException('invalid value for $size when calling ConversationsMessageFile., must be bigger than or equal to 0.'); + } + + $this->container['size'] = $size; + + return $this; + } + + /** + * Gets isImage + * + * @return bool + */ + public function getIsImage() + { + return $this->container['isImage']; + } + + /** + * Sets isImage + * + * @param bool $isImage Whether the file is an image + * + * @return $this + */ + public function setIsImage($isImage) + { + $this->container['isImage'] = $isImage; + + return $this; + } + + /** + * Gets url + * + * @return string + */ + public function getUrl() + { + return $this->container['url']; + } + + /** + * Sets url + * + * @param string $url URL of the file + * + * @return $this + */ + public function setUrl($url) + { + $this->container['url'] = $url; + + return $this; + } + + /** + * Gets imageInfo + * + * @return \Brevo\Client\Model\ConversationsMessageFileImageInfo + */ + public function getImageInfo() + { + return $this->container['imageInfo']; + } + + /** + * Sets imageInfo + * + * @param \Brevo\Client\Model\ConversationsMessageFileImageInfo $imageInfo imageInfo + * + * @return $this + */ + public function setImageInfo($imageInfo) + { + $this->container['imageInfo'] = $imageInfo; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/ConversationsMessageFileImageInfo.php b/vendor/getbrevo/brevo-php/lib/Model/ConversationsMessageFileImageInfo.php new file mode 100644 index 0000000..2415cb4 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/ConversationsMessageFileImageInfo.php @@ -0,0 +1,384 @@ + 'int', + 'height' => 'int', + 'previewUrl' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'width' => 'int64', + 'height' => 'int64', + 'previewUrl' => 'url' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'width' => 'width', + 'height' => 'height', + 'previewUrl' => 'previewUrl' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'width' => 'setWidth', + 'height' => 'setHeight', + 'previewUrl' => 'setPreviewUrl' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'width' => 'getWidth', + 'height' => 'getHeight', + 'previewUrl' => 'getPreviewUrl' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['width'] = isset($data['width']) ? $data['width'] : null; + $this->container['height'] = isset($data['height']) ? $data['height'] : null; + $this->container['previewUrl'] = isset($data['previewUrl']) ? $data['previewUrl'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if (!is_null($this->container['width']) && ($this->container['width'] < 0)) { + $invalidProperties[] = "invalid value for 'width', must be bigger than or equal to 0."; + } + + if (!is_null($this->container['height']) && ($this->container['height'] < 0)) { + $invalidProperties[] = "invalid value for 'height', must be bigger than or equal to 0."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets width + * + * @return int + */ + public function getWidth() + { + return $this->container['width']; + } + + /** + * Sets width + * + * @param int $width Width of the image + * + * @return $this + */ + public function setWidth($width) + { + + if (!is_null($width) && ($width < 0)) { + throw new \InvalidArgumentException('invalid value for $width when calling ConversationsMessageFileImageInfo., must be bigger than or equal to 0.'); + } + + $this->container['width'] = $width; + + return $this; + } + + /** + * Gets height + * + * @return int + */ + public function getHeight() + { + return $this->container['height']; + } + + /** + * Sets height + * + * @param int $height height of the image + * + * @return $this + */ + public function setHeight($height) + { + + if (!is_null($height) && ($height < 0)) { + throw new \InvalidArgumentException('invalid value for $height when calling ConversationsMessageFileImageInfo., must be bigger than or equal to 0.'); + } + + $this->container['height'] = $height; + + return $this; + } + + /** + * Gets previewUrl + * + * @return string + */ + public function getPreviewUrl() + { + return $this->container['previewUrl']; + } + + /** + * Sets previewUrl + * + * @param string $previewUrl URL of the preview + * + * @return $this + */ + public function setPreviewUrl($previewUrl) + { + $this->container['previewUrl'] = $previewUrl; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateApiKeyRequest.php b/vendor/getbrevo/brevo-php/lib/Model/CreateApiKeyRequest.php new file mode 100644 index 0000000..79f8147 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateApiKeyRequest.php @@ -0,0 +1,338 @@ + 'int', + 'name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'int64', + 'name' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id Id of the sub-account organization + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the API key + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateApiKeyResponse.php b/vendor/getbrevo/brevo-php/lib/Model/CreateApiKeyResponse.php new file mode 100644 index 0000000..828b444 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateApiKeyResponse.php @@ -0,0 +1,335 @@ + 'string', + 'key' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'status' => null, + 'key' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'status' => 'status', + 'key' => 'key' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'status' => 'setStatus', + 'key' => 'setKey' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'status' => 'getStatus', + 'key' => 'getKey' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['key'] = isset($data['key']) ? $data['key'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status Status of the API operation. + * + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets key + * + * @return string + */ + public function getKey() + { + return $this->container['key']; + } + + /** + * Sets key + * + * @param string $key API Key + * + * @return $this + */ + public function setKey($key) + { + $this->container['key'] = $key; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateAttribute.php b/vendor/getbrevo/brevo-php/lib/Model/CreateAttribute.php new file mode 100644 index 0000000..fb695e9 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateAttribute.php @@ -0,0 +1,435 @@ + 'string', + 'isRecurring' => 'bool', + 'enumeration' => '\Brevo\Client\Model\CreateAttributeEnumeration[]', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'value' => null, + 'isRecurring' => null, + 'enumeration' => null, + 'type' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'value' => 'value', + 'isRecurring' => 'isRecurring', + 'enumeration' => 'enumeration', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'value' => 'setValue', + 'isRecurring' => 'setIsRecurring', + 'enumeration' => 'setEnumeration', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'value' => 'getValue', + 'isRecurring' => 'getIsRecurring', + 'enumeration' => 'getEnumeration', + 'type' => 'getType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const TYPE_TEXT = 'text'; + const TYPE_DATE = 'date'; + const TYPE_FLOAT = 'float'; + const TYPE_BOOLEAN = 'boolean'; + const TYPE_ID = 'id'; + const TYPE_CATEGORY = 'category'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_TEXT, + self::TYPE_DATE, + self::TYPE_FLOAT, + self::TYPE_BOOLEAN, + self::TYPE_ID, + self::TYPE_CATEGORY, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['value'] = isset($data['value']) ? $data['value'] : null; + $this->container['isRecurring'] = isset($data['isRecurring']) ? $data['isRecurring'] : null; + $this->container['enumeration'] = isset($data['enumeration']) ? $data['enumeration'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets value + * + * @return string + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param string $value Value of the attribute. Use only if the attribute's category is 'calculated' or 'global' + * + * @return $this + */ + public function setValue($value) + { + $this->container['value'] = $value; + + return $this; + } + + /** + * Gets isRecurring + * + * @return bool + */ + public function getIsRecurring() + { + return $this->container['isRecurring']; + } + + /** + * Sets isRecurring + * + * @param bool $isRecurring Type of the attribute. Use only if the attribute's category is 'calculated' or 'global' + * + * @return $this + */ + public function setIsRecurring($isRecurring) + { + $this->container['isRecurring'] = $isRecurring; + + return $this; + } + + /** + * Gets enumeration + * + * @return \Brevo\Client\Model\CreateAttributeEnumeration[] + */ + public function getEnumeration() + { + return $this->container['enumeration']; + } + + /** + * Sets enumeration + * + * @param \Brevo\Client\Model\CreateAttributeEnumeration[] $enumeration List of values and labels that the attribute can take. Use only if the attribute's category is \"category\". For example, [{\"value\":1, \"label\":\"male\"}, {\"value\":2, \"label\":\"female\"}] + * + * @return $this + */ + public function setEnumeration($enumeration) + { + $this->container['enumeration'] = $enumeration; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Type of the attribute. Use only if the attribute's category is 'normal', 'category' or 'transactional' ( type 'boolean' is only available if the category is 'normal' attribute, type 'id' is only available if the category is 'transactional' attribute & type 'category' is only available if the category is 'category' attribute ) + * + * @return $this + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($type) && !in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateAttributeEnumeration.php b/vendor/getbrevo/brevo-php/lib/Model/CreateAttributeEnumeration.php new file mode 100644 index 0000000..b9da3d2 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateAttributeEnumeration.php @@ -0,0 +1,341 @@ + 'int', + 'label' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'value' => null, + 'label' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'value' => 'value', + 'label' => 'label' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'value' => 'setValue', + 'label' => 'setLabel' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'value' => 'getValue', + 'label' => 'getLabel' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['value'] = isset($data['value']) ? $data['value'] : null; + $this->container['label'] = isset($data['label']) ? $data['label'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['value'] === null) { + $invalidProperties[] = "'value' can't be null"; + } + if ($this->container['label'] === null) { + $invalidProperties[] = "'label' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets value + * + * @return int + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param int $value Id of the value + * + * @return $this + */ + public function setValue($value) + { + $this->container['value'] = $value; + + return $this; + } + + /** + * Gets label + * + * @return string + */ + public function getLabel() + { + return $this->container['label']; + } + + /** + * Sets label + * + * @param string $label Label of the value + * + * @return $this + */ + public function setLabel($label) + { + $this->container['label'] = $label; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateCategoryModel.php b/vendor/getbrevo/brevo-php/lib/Model/CreateCategoryModel.php new file mode 100644 index 0000000..10995f6 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateCategoryModel.php @@ -0,0 +1,305 @@ + 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id ID of the category when a new category is created + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateChild.php b/vendor/getbrevo/brevo-php/lib/Model/CreateChild.php new file mode 100644 index 0000000..ceba8b6 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateChild.php @@ -0,0 +1,510 @@ + 'string', + 'firstName' => 'string', + 'lastName' => 'string', + 'companyName' => 'string', + 'password' => 'string', + 'language' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'email' => 'email', + 'firstName' => null, + 'lastName' => null, + 'companyName' => null, + 'password' => 'password', + 'language' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'email' => 'email', + 'firstName' => 'firstName', + 'lastName' => 'lastName', + 'companyName' => 'companyName', + 'password' => 'password', + 'language' => 'language' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'email' => 'setEmail', + 'firstName' => 'setFirstName', + 'lastName' => 'setLastName', + 'companyName' => 'setCompanyName', + 'password' => 'setPassword', + 'language' => 'setLanguage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'email' => 'getEmail', + 'firstName' => 'getFirstName', + 'lastName' => 'getLastName', + 'companyName' => 'getCompanyName', + 'password' => 'getPassword', + 'language' => 'getLanguage' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const LANGUAGE_FR = 'fr'; + const LANGUAGE_ES = 'es'; + const LANGUAGE_PT = 'pt'; + const LANGUAGE_IT = 'it'; + const LANGUAGE_DE = 'de'; + const LANGUAGE_EN = 'en'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getLanguageAllowableValues() + { + return [ + self::LANGUAGE_FR, + self::LANGUAGE_ES, + self::LANGUAGE_PT, + self::LANGUAGE_IT, + self::LANGUAGE_DE, + self::LANGUAGE_EN, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['firstName'] = isset($data['firstName']) ? $data['firstName'] : null; + $this->container['lastName'] = isset($data['lastName']) ? $data['lastName'] : null; + $this->container['companyName'] = isset($data['companyName']) ? $data['companyName'] : null; + $this->container['password'] = isset($data['password']) ? $data['password'] : null; + $this->container['language'] = isset($data['language']) ? $data['language'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + if ($this->container['firstName'] === null) { + $invalidProperties[] = "'firstName' can't be null"; + } + if ($this->container['lastName'] === null) { + $invalidProperties[] = "'lastName' can't be null"; + } + if ($this->container['companyName'] === null) { + $invalidProperties[] = "'companyName' can't be null"; + } + if ($this->container['password'] === null) { + $invalidProperties[] = "'password' can't be null"; + } + $allowedValues = $this->getLanguageAllowableValues(); + if (!is_null($this->container['language']) && !in_array($this->container['language'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'language', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email Email address to create the child account + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets firstName + * + * @return string + */ + public function getFirstName() + { + return $this->container['firstName']; + } + + /** + * Sets firstName + * + * @param string $firstName First name to use to create the child account + * + * @return $this + */ + public function setFirstName($firstName) + { + $this->container['firstName'] = $firstName; + + return $this; + } + + /** + * Gets lastName + * + * @return string + */ + public function getLastName() + { + return $this->container['lastName']; + } + + /** + * Sets lastName + * + * @param string $lastName Last name to use to create the child account + * + * @return $this + */ + public function setLastName($lastName) + { + $this->container['lastName'] = $lastName; + + return $this; + } + + /** + * Gets companyName + * + * @return string + */ + public function getCompanyName() + { + return $this->container['companyName']; + } + + /** + * Sets companyName + * + * @param string $companyName Company name to use to create the child account + * + * @return $this + */ + public function setCompanyName($companyName) + { + $this->container['companyName'] = $companyName; + + return $this; + } + + /** + * Gets password + * + * @return string + */ + public function getPassword() + { + return $this->container['password']; + } + + /** + * Sets password + * + * @param string $password Password for the child account to login + * + * @return $this + */ + public function setPassword($password) + { + $this->container['password'] = $password; + + return $this; + } + + /** + * Gets language + * + * @return string + */ + public function getLanguage() + { + return $this->container['language']; + } + + /** + * Sets language + * + * @param string $language Language of the child account + * + * @return $this + */ + public function setLanguage($language) + { + $allowedValues = $this->getLanguageAllowableValues(); + if (!is_null($language) && !in_array($language, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'language', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['language'] = $language; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateContact.php b/vendor/getbrevo/brevo-php/lib/Model/CreateContact.php new file mode 100644 index 0000000..dd0b039 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateContact.php @@ -0,0 +1,515 @@ + 'string', + 'extId' => 'string', + 'attributes' => 'object', + 'emailBlacklisted' => 'bool', + 'smsBlacklisted' => 'bool', + 'listIds' => 'int[]', + 'updateEnabled' => 'bool', + 'smtpBlacklistSender' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'email' => 'email', + 'extId' => null, + 'attributes' => null, + 'emailBlacklisted' => null, + 'smsBlacklisted' => null, + 'listIds' => 'int64', + 'updateEnabled' => null, + 'smtpBlacklistSender' => 'email' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'email' => 'email', + 'extId' => 'ext_id', + 'attributes' => 'attributes', + 'emailBlacklisted' => 'emailBlacklisted', + 'smsBlacklisted' => 'smsBlacklisted', + 'listIds' => 'listIds', + 'updateEnabled' => 'updateEnabled', + 'smtpBlacklistSender' => 'smtpBlacklistSender' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'email' => 'setEmail', + 'extId' => 'setExtId', + 'attributes' => 'setAttributes', + 'emailBlacklisted' => 'setEmailBlacklisted', + 'smsBlacklisted' => 'setSmsBlacklisted', + 'listIds' => 'setListIds', + 'updateEnabled' => 'setUpdateEnabled', + 'smtpBlacklistSender' => 'setSmtpBlacklistSender' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'email' => 'getEmail', + 'extId' => 'getExtId', + 'attributes' => 'getAttributes', + 'emailBlacklisted' => 'getEmailBlacklisted', + 'smsBlacklisted' => 'getSmsBlacklisted', + 'listIds' => 'getListIds', + 'updateEnabled' => 'getUpdateEnabled', + 'smtpBlacklistSender' => 'getSmtpBlacklistSender' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['extId'] = isset($data['extId']) ? $data['extId'] : null; + $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; + $this->container['emailBlacklisted'] = isset($data['emailBlacklisted']) ? $data['emailBlacklisted'] : null; + $this->container['smsBlacklisted'] = isset($data['smsBlacklisted']) ? $data['smsBlacklisted'] : null; + $this->container['listIds'] = isset($data['listIds']) ? $data['listIds'] : null; + $this->container['updateEnabled'] = isset($data['updateEnabled']) ? $data['updateEnabled'] : false; + $this->container['smtpBlacklistSender'] = isset($data['smtpBlacklistSender']) ? $data['smtpBlacklistSender'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email Email address of the user. Mandatory if \"SMS\" field is not passed in \"attributes\" parameter. Mobile Number in \"SMS\" field should be passed with proper country code. For example {\"SMS\":\"+91xxxxxxxxxx\"} or {\"SMS\":\"0091xxxxxxxxxx\"} + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets extId + * + * @return string + */ + public function getExtId() + { + return $this->container['extId']; + } + + /** + * Sets extId + * + * @param string $extId Pass your own Id to create a contact. + * + * @return $this + */ + public function setExtId($extId) + { + $this->container['extId'] = $extId; + + return $this; + } + + /** + * Gets attributes + * + * @return object + */ + public function getAttributes() + { + return $this->container['attributes']; + } + + /** + * Sets attributes + * + * @param object $attributes Pass the set of attributes and their values. The attribute's parameter should be passed in capital letter while creating a contact. Values that don't match the attribute type (e.g. text or string in a date attribute) will be ignored.These attributes must be present in your Brevo account. For eg. {\"FNAME\":\"Elly\", \"LNAME\":\"Roger\"} + * + * @return $this + */ + public function setAttributes($attributes) + { + $this->container['attributes'] = $attributes; + + return $this; + } + + /** + * Gets emailBlacklisted + * + * @return bool + */ + public function getEmailBlacklisted() + { + return $this->container['emailBlacklisted']; + } + + /** + * Sets emailBlacklisted + * + * @param bool $emailBlacklisted Set this field to blacklist the contact for emails (emailBlacklisted = true) + * + * @return $this + */ + public function setEmailBlacklisted($emailBlacklisted) + { + $this->container['emailBlacklisted'] = $emailBlacklisted; + + return $this; + } + + /** + * Gets smsBlacklisted + * + * @return bool + */ + public function getSmsBlacklisted() + { + return $this->container['smsBlacklisted']; + } + + /** + * Sets smsBlacklisted + * + * @param bool $smsBlacklisted Set this field to blacklist the contact for SMS (smsBlacklisted = true) + * + * @return $this + */ + public function setSmsBlacklisted($smsBlacklisted) + { + $this->container['smsBlacklisted'] = $smsBlacklisted; + + return $this; + } + + /** + * Gets listIds + * + * @return int[] + */ + public function getListIds() + { + return $this->container['listIds']; + } + + /** + * Sets listIds + * + * @param int[] $listIds Ids of the lists to add the contact to + * + * @return $this + */ + public function setListIds($listIds) + { + $this->container['listIds'] = $listIds; + + return $this; + } + + /** + * Gets updateEnabled + * + * @return bool + */ + public function getUpdateEnabled() + { + return $this->container['updateEnabled']; + } + + /** + * Sets updateEnabled + * + * @param bool $updateEnabled Facilitate to update the existing contact in the same request (updateEnabled = true) + * + * @return $this + */ + public function setUpdateEnabled($updateEnabled) + { + $this->container['updateEnabled'] = $updateEnabled; + + return $this; + } + + /** + * Gets smtpBlacklistSender + * + * @return string[] + */ + public function getSmtpBlacklistSender() + { + return $this->container['smtpBlacklistSender']; + } + + /** + * Sets smtpBlacklistSender + * + * @param string[] $smtpBlacklistSender transactional email forbidden sender for contact. Use only for email Contact ( only available if updateEnabled = true ) + * + * @return $this + */ + public function setSmtpBlacklistSender($smtpBlacklistSender) + { + $this->container['smtpBlacklistSender'] = $smtpBlacklistSender; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateCouponCollection.php b/vendor/getbrevo/brevo-php/lib/Model/CreateCouponCollection.php new file mode 100644 index 0000000..d489d57 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateCouponCollection.php @@ -0,0 +1,341 @@ + 'object', + 'defaultCoupon' => 'object' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null, + 'defaultCoupon' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'defaultCoupon' => 'defaultCoupon' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'defaultCoupon' => 'setDefaultCoupon' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'defaultCoupon' => 'getDefaultCoupon' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['defaultCoupon'] = isset($data['defaultCoupon']) ? $data['defaultCoupon'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['defaultCoupon'] === null) { + $invalidProperties[] = "'defaultCoupon' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return object + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param object $name Name of the collection with no white spaces between words + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets defaultCoupon + * + * @return object + */ + public function getDefaultCoupon() + { + return $this->container['defaultCoupon']; + } + + /** + * Sets defaultCoupon + * + * @param object $defaultCoupon A default coupon to be used in case there are no coupons left + * + * @return $this + */ + public function setDefaultCoupon($defaultCoupon) + { + $this->container['defaultCoupon'] = $defaultCoupon; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateCoupons.php b/vendor/getbrevo/brevo-php/lib/Model/CreateCoupons.php new file mode 100644 index 0000000..d082036 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateCoupons.php @@ -0,0 +1,341 @@ + 'string', + 'coupons' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'collectionId' => 'uuidv4', + 'coupons' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'collectionId' => 'collectionId', + 'coupons' => 'coupons' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'collectionId' => 'setCollectionId', + 'coupons' => 'setCoupons' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'collectionId' => 'getCollectionId', + 'coupons' => 'getCoupons' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['collectionId'] = isset($data['collectionId']) ? $data['collectionId'] : null; + $this->container['coupons'] = isset($data['coupons']) ? $data['coupons'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['collectionId'] === null) { + $invalidProperties[] = "'collectionId' can't be null"; + } + if ($this->container['coupons'] === null) { + $invalidProperties[] = "'coupons' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets collectionId + * + * @return string + */ + public function getCollectionId() + { + return $this->container['collectionId']; + } + + /** + * Sets collectionId + * + * @param string $collectionId The id of the coupon collection for which the coupons will be created + * + * @return $this + */ + public function setCollectionId($collectionId) + { + $this->container['collectionId'] = $collectionId; + + return $this; + } + + /** + * Gets coupons + * + * @return string[] + */ + public function getCoupons() + { + return $this->container['coupons']; + } + + /** + * Sets coupons + * + * @param string[] $coupons coupons + * + * @return $this + */ + public function setCoupons($coupons) + { + $this->container['coupons'] = $coupons; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateDoiContact.php b/vendor/getbrevo/brevo-php/lib/Model/CreateDoiContact.php new file mode 100644 index 0000000..c4df173 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateDoiContact.php @@ -0,0 +1,467 @@ + 'string', + 'attributes' => 'object', + 'includeListIds' => 'int[]', + 'excludeListIds' => 'int[]', + 'templateId' => 'int', + 'redirectionUrl' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'email' => 'email', + 'attributes' => null, + 'includeListIds' => 'int64', + 'excludeListIds' => 'int64', + 'templateId' => 'int64', + 'redirectionUrl' => 'url' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'email' => 'email', + 'attributes' => 'attributes', + 'includeListIds' => 'includeListIds', + 'excludeListIds' => 'excludeListIds', + 'templateId' => 'templateId', + 'redirectionUrl' => 'redirectionUrl' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'email' => 'setEmail', + 'attributes' => 'setAttributes', + 'includeListIds' => 'setIncludeListIds', + 'excludeListIds' => 'setExcludeListIds', + 'templateId' => 'setTemplateId', + 'redirectionUrl' => 'setRedirectionUrl' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'email' => 'getEmail', + 'attributes' => 'getAttributes', + 'includeListIds' => 'getIncludeListIds', + 'excludeListIds' => 'getExcludeListIds', + 'templateId' => 'getTemplateId', + 'redirectionUrl' => 'getRedirectionUrl' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; + $this->container['includeListIds'] = isset($data['includeListIds']) ? $data['includeListIds'] : null; + $this->container['excludeListIds'] = isset($data['excludeListIds']) ? $data['excludeListIds'] : null; + $this->container['templateId'] = isset($data['templateId']) ? $data['templateId'] : null; + $this->container['redirectionUrl'] = isset($data['redirectionUrl']) ? $data['redirectionUrl'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + if ($this->container['includeListIds'] === null) { + $invalidProperties[] = "'includeListIds' can't be null"; + } + if ($this->container['templateId'] === null) { + $invalidProperties[] = "'templateId' can't be null"; + } + if ($this->container['redirectionUrl'] === null) { + $invalidProperties[] = "'redirectionUrl' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email Email address where the confirmation email will be sent. This email address will be the identifier for all other contact attributes. + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets attributes + * + * @return object + */ + public function getAttributes() + { + return $this->container['attributes']; + } + + /** + * Sets attributes + * + * @param object $attributes Pass the set of attributes and their values. These attributes must be present in your Brevo account. For eg. {'FNAME':'Elly', 'LNAME':'Roger'} + * + * @return $this + */ + public function setAttributes($attributes) + { + $this->container['attributes'] = $attributes; + + return $this; + } + + /** + * Gets includeListIds + * + * @return int[] + */ + public function getIncludeListIds() + { + return $this->container['includeListIds']; + } + + /** + * Sets includeListIds + * + * @param int[] $includeListIds Lists under user account where contact should be added + * + * @return $this + */ + public function setIncludeListIds($includeListIds) + { + $this->container['includeListIds'] = $includeListIds; + + return $this; + } + + /** + * Gets excludeListIds + * + * @return int[] + */ + public function getExcludeListIds() + { + return $this->container['excludeListIds']; + } + + /** + * Sets excludeListIds + * + * @param int[] $excludeListIds Lists under user account where contact should not be added + * + * @return $this + */ + public function setExcludeListIds($excludeListIds) + { + $this->container['excludeListIds'] = $excludeListIds; + + return $this; + } + + /** + * Gets templateId + * + * @return int + */ + public function getTemplateId() + { + return $this->container['templateId']; + } + + /** + * Sets templateId + * + * @param int $templateId Id of the Double opt-in (DOI) template + * + * @return $this + */ + public function setTemplateId($templateId) + { + $this->container['templateId'] = $templateId; + + return $this; + } + + /** + * Gets redirectionUrl + * + * @return string + */ + public function getRedirectionUrl() + { + return $this->container['redirectionUrl']; + } + + /** + * Sets redirectionUrl + * + * @param string $redirectionUrl URL of the web page that user will be redirected to after clicking on the double opt in URL. When editing your DOI template you can reference this URL by using the tag {{ params.DOIurl }}. + * + * @return $this + */ + public function setRedirectionUrl($redirectionUrl) + { + $this->container['redirectionUrl'] = $redirectionUrl; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateDomain.php b/vendor/getbrevo/brevo-php/lib/Model/CreateDomain.php new file mode 100644 index 0000000..bc67da0 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateDomain.php @@ -0,0 +1,308 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Domain name + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateDomainModel.php b/vendor/getbrevo/brevo-php/lib/Model/CreateDomainModel.php new file mode 100644 index 0000000..edc3756 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateDomainModel.php @@ -0,0 +1,398 @@ + 'int', + 'domainName' => 'string', + 'message' => 'string', + 'dnsRecords' => '\Brevo\Client\Model\CreateDomainModelDnsRecords' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'int64', + 'domainName' => null, + 'message' => null, + 'dnsRecords' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'domainName' => 'domain_name', + 'message' => 'message', + 'dnsRecords' => 'dns_records' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'domainName' => 'setDomainName', + 'message' => 'setMessage', + 'dnsRecords' => 'setDnsRecords' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'domainName' => 'getDomainName', + 'message' => 'getMessage', + 'dnsRecords' => 'getDnsRecords' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['domainName'] = isset($data['domainName']) ? $data['domainName'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + $this->container['dnsRecords'] = isset($data['dnsRecords']) ? $data['dnsRecords'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id ID of the Domain created + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets domainName + * + * @return string + */ + public function getDomainName() + { + return $this->container['domainName']; + } + + /** + * Sets domainName + * + * @param string $domainName Domain + * + * @return $this + */ + public function setDomainName($domainName) + { + $this->container['domainName'] = $domainName; + + return $this; + } + + /** + * Gets message + * + * @return string + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string $message Success message + * + * @return $this + */ + public function setMessage($message) + { + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets dnsRecords + * + * @return \Brevo\Client\Model\CreateDomainModelDnsRecords + */ + public function getDnsRecords() + { + return $this->container['dnsRecords']; + } + + /** + * Sets dnsRecords + * + * @param \Brevo\Client\Model\CreateDomainModelDnsRecords $dnsRecords dnsRecords + * + * @return $this + */ + public function setDnsRecords($dnsRecords) + { + $this->container['dnsRecords'] = $dnsRecords; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateDomainModelDnsRecords.php b/vendor/getbrevo/brevo-php/lib/Model/CreateDomainModelDnsRecords.php new file mode 100644 index 0000000..5ba3983 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateDomainModelDnsRecords.php @@ -0,0 +1,335 @@ + '\Brevo\Client\Model\CreateDomainModelDnsRecordsDkimRecord', + 'brevoCode' => '\Brevo\Client\Model\CreateDomainModelDnsRecordsDkimRecord' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'dkimRecord' => null, + 'brevoCode' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'dkimRecord' => 'dkim_record', + 'brevoCode' => 'brevo_code' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'dkimRecord' => 'setDkimRecord', + 'brevoCode' => 'setBrevoCode' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'dkimRecord' => 'getDkimRecord', + 'brevoCode' => 'getBrevoCode' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['dkimRecord'] = isset($data['dkimRecord']) ? $data['dkimRecord'] : null; + $this->container['brevoCode'] = isset($data['brevoCode']) ? $data['brevoCode'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets dkimRecord + * + * @return \Brevo\Client\Model\CreateDomainModelDnsRecordsDkimRecord + */ + public function getDkimRecord() + { + return $this->container['dkimRecord']; + } + + /** + * Sets dkimRecord + * + * @param \Brevo\Client\Model\CreateDomainModelDnsRecordsDkimRecord $dkimRecord dkimRecord + * + * @return $this + */ + public function setDkimRecord($dkimRecord) + { + $this->container['dkimRecord'] = $dkimRecord; + + return $this; + } + + /** + * Gets brevoCode + * + * @return \Brevo\Client\Model\CreateDomainModelDnsRecordsDkimRecord + */ + public function getBrevoCode() + { + return $this->container['brevoCode']; + } + + /** + * Sets brevoCode + * + * @param \Brevo\Client\Model\CreateDomainModelDnsRecordsDkimRecord $brevoCode brevoCode + * + * @return $this + */ + public function setBrevoCode($brevoCode) + { + $this->container['brevoCode'] = $brevoCode; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateDomainModelDnsRecordsDkimRecord.php b/vendor/getbrevo/brevo-php/lib/Model/CreateDomainModelDnsRecordsDkimRecord.php new file mode 100644 index 0000000..83bfad1 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateDomainModelDnsRecordsDkimRecord.php @@ -0,0 +1,395 @@ + 'string', + 'value' => 'string', + 'hostName' => 'string', + 'status' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'type' => null, + 'value' => null, + 'hostName' => null, + 'status' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'type' => 'type', + 'value' => 'value', + 'hostName' => 'host_name', + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'type' => 'setType', + 'value' => 'setValue', + 'hostName' => 'setHostName', + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'type' => 'getType', + 'value' => 'getValue', + 'hostName' => 'getHostName', + 'status' => 'getStatus' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['type'] = isset($data['type']) ? $data['type'] : null; + $this->container['value'] = isset($data['value']) ? $data['value'] : null; + $this->container['hostName'] = isset($data['hostName']) ? $data['hostName'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type type + * + * @return $this + */ + public function setType($type) + { + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets value + * + * @return string + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param string $value value + * + * @return $this + */ + public function setValue($value) + { + $this->container['value'] = $value; + + return $this; + } + + /** + * Gets hostName + * + * @return string + */ + public function getHostName() + { + return $this->container['hostName']; + } + + /** + * Sets hostName + * + * @param string $hostName hostName + * + * @return $this + */ + public function setHostName($hostName) + { + $this->container['hostName'] = $hostName; + + return $this; + } + + /** + * Gets status + * + * @return bool + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param bool $status status + * + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateEmailCampaign.php b/vendor/getbrevo/brevo-php/lib/Model/CreateEmailCampaign.php new file mode 100644 index 0000000..5bb1049 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateEmailCampaign.php @@ -0,0 +1,1291 @@ + 'string', + 'sender' => '\Brevo\Client\Model\CreateEmailCampaignSender', + 'name' => 'string', + 'htmlContent' => 'string', + 'htmlUrl' => 'string', + 'templateId' => 'int', + 'scheduledAt' => 'string', + 'subject' => 'string', + 'previewText' => 'string', + 'replyTo' => 'string', + 'toField' => 'string', + 'recipients' => '\Brevo\Client\Model\CreateEmailCampaignRecipients', + 'attachmentUrl' => 'string', + 'inlineImageActivation' => 'bool', + 'mirrorActive' => 'bool', + 'footer' => 'string', + 'header' => 'string', + 'utmCampaign' => 'string', + 'params' => 'object', + 'sendAtBestTime' => 'bool', + 'abTesting' => 'bool', + 'subjectA' => 'string', + 'subjectB' => 'string', + 'splitRule' => 'int', + 'winnerCriteria' => 'string', + 'winnerDelay' => 'int', + 'ipWarmupEnable' => 'bool', + 'initialQuota' => 'int', + 'increaseRate' => 'int', + 'unsubscriptionPageId' => 'string', + 'updateFormId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'tag' => null, + 'sender' => null, + 'name' => null, + 'htmlContent' => null, + 'htmlUrl' => 'url', + 'templateId' => 'int64', + 'scheduledAt' => null, + 'subject' => null, + 'previewText' => null, + 'replyTo' => 'email', + 'toField' => null, + 'recipients' => null, + 'attachmentUrl' => 'url', + 'inlineImageActivation' => null, + 'mirrorActive' => null, + 'footer' => null, + 'header' => null, + 'utmCampaign' => null, + 'params' => null, + 'sendAtBestTime' => null, + 'abTesting' => null, + 'subjectA' => null, + 'subjectB' => null, + 'splitRule' => 'int64', + 'winnerCriteria' => null, + 'winnerDelay' => 'int64', + 'ipWarmupEnable' => null, + 'initialQuota' => 'int64', + 'increaseRate' => 'int64', + 'unsubscriptionPageId' => null, + 'updateFormId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'tag' => 'tag', + 'sender' => 'sender', + 'name' => 'name', + 'htmlContent' => 'htmlContent', + 'htmlUrl' => 'htmlUrl', + 'templateId' => 'templateId', + 'scheduledAt' => 'scheduledAt', + 'subject' => 'subject', + 'previewText' => 'previewText', + 'replyTo' => 'replyTo', + 'toField' => 'toField', + 'recipients' => 'recipients', + 'attachmentUrl' => 'attachmentUrl', + 'inlineImageActivation' => 'inlineImageActivation', + 'mirrorActive' => 'mirrorActive', + 'footer' => 'footer', + 'header' => 'header', + 'utmCampaign' => 'utmCampaign', + 'params' => 'params', + 'sendAtBestTime' => 'sendAtBestTime', + 'abTesting' => 'abTesting', + 'subjectA' => 'subjectA', + 'subjectB' => 'subjectB', + 'splitRule' => 'splitRule', + 'winnerCriteria' => 'winnerCriteria', + 'winnerDelay' => 'winnerDelay', + 'ipWarmupEnable' => 'ipWarmupEnable', + 'initialQuota' => 'initialQuota', + 'increaseRate' => 'increaseRate', + 'unsubscriptionPageId' => 'unsubscriptionPageId', + 'updateFormId' => 'updateFormId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'tag' => 'setTag', + 'sender' => 'setSender', + 'name' => 'setName', + 'htmlContent' => 'setHtmlContent', + 'htmlUrl' => 'setHtmlUrl', + 'templateId' => 'setTemplateId', + 'scheduledAt' => 'setScheduledAt', + 'subject' => 'setSubject', + 'previewText' => 'setPreviewText', + 'replyTo' => 'setReplyTo', + 'toField' => 'setToField', + 'recipients' => 'setRecipients', + 'attachmentUrl' => 'setAttachmentUrl', + 'inlineImageActivation' => 'setInlineImageActivation', + 'mirrorActive' => 'setMirrorActive', + 'footer' => 'setFooter', + 'header' => 'setHeader', + 'utmCampaign' => 'setUtmCampaign', + 'params' => 'setParams', + 'sendAtBestTime' => 'setSendAtBestTime', + 'abTesting' => 'setAbTesting', + 'subjectA' => 'setSubjectA', + 'subjectB' => 'setSubjectB', + 'splitRule' => 'setSplitRule', + 'winnerCriteria' => 'setWinnerCriteria', + 'winnerDelay' => 'setWinnerDelay', + 'ipWarmupEnable' => 'setIpWarmupEnable', + 'initialQuota' => 'setInitialQuota', + 'increaseRate' => 'setIncreaseRate', + 'unsubscriptionPageId' => 'setUnsubscriptionPageId', + 'updateFormId' => 'setUpdateFormId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'tag' => 'getTag', + 'sender' => 'getSender', + 'name' => 'getName', + 'htmlContent' => 'getHtmlContent', + 'htmlUrl' => 'getHtmlUrl', + 'templateId' => 'getTemplateId', + 'scheduledAt' => 'getScheduledAt', + 'subject' => 'getSubject', + 'previewText' => 'getPreviewText', + 'replyTo' => 'getReplyTo', + 'toField' => 'getToField', + 'recipients' => 'getRecipients', + 'attachmentUrl' => 'getAttachmentUrl', + 'inlineImageActivation' => 'getInlineImageActivation', + 'mirrorActive' => 'getMirrorActive', + 'footer' => 'getFooter', + 'header' => 'getHeader', + 'utmCampaign' => 'getUtmCampaign', + 'params' => 'getParams', + 'sendAtBestTime' => 'getSendAtBestTime', + 'abTesting' => 'getAbTesting', + 'subjectA' => 'getSubjectA', + 'subjectB' => 'getSubjectB', + 'splitRule' => 'getSplitRule', + 'winnerCriteria' => 'getWinnerCriteria', + 'winnerDelay' => 'getWinnerDelay', + 'ipWarmupEnable' => 'getIpWarmupEnable', + 'initialQuota' => 'getInitialQuota', + 'increaseRate' => 'getIncreaseRate', + 'unsubscriptionPageId' => 'getUnsubscriptionPageId', + 'updateFormId' => 'getUpdateFormId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const WINNER_CRITERIA_OPEN = 'open'; + const WINNER_CRITERIA_CLICK = 'click'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getWinnerCriteriaAllowableValues() + { + return [ + self::WINNER_CRITERIA_OPEN, + self::WINNER_CRITERIA_CLICK, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; + $this->container['sender'] = isset($data['sender']) ? $data['sender'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['htmlContent'] = isset($data['htmlContent']) ? $data['htmlContent'] : null; + $this->container['htmlUrl'] = isset($data['htmlUrl']) ? $data['htmlUrl'] : null; + $this->container['templateId'] = isset($data['templateId']) ? $data['templateId'] : null; + $this->container['scheduledAt'] = isset($data['scheduledAt']) ? $data['scheduledAt'] : null; + $this->container['subject'] = isset($data['subject']) ? $data['subject'] : null; + $this->container['previewText'] = isset($data['previewText']) ? $data['previewText'] : null; + $this->container['replyTo'] = isset($data['replyTo']) ? $data['replyTo'] : null; + $this->container['toField'] = isset($data['toField']) ? $data['toField'] : null; + $this->container['recipients'] = isset($data['recipients']) ? $data['recipients'] : null; + $this->container['attachmentUrl'] = isset($data['attachmentUrl']) ? $data['attachmentUrl'] : null; + $this->container['inlineImageActivation'] = isset($data['inlineImageActivation']) ? $data['inlineImageActivation'] : false; + $this->container['mirrorActive'] = isset($data['mirrorActive']) ? $data['mirrorActive'] : null; + $this->container['footer'] = isset($data['footer']) ? $data['footer'] : null; + $this->container['header'] = isset($data['header']) ? $data['header'] : null; + $this->container['utmCampaign'] = isset($data['utmCampaign']) ? $data['utmCampaign'] : null; + $this->container['params'] = isset($data['params']) ? $data['params'] : null; + $this->container['sendAtBestTime'] = isset($data['sendAtBestTime']) ? $data['sendAtBestTime'] : false; + $this->container['abTesting'] = isset($data['abTesting']) ? $data['abTesting'] : false; + $this->container['subjectA'] = isset($data['subjectA']) ? $data['subjectA'] : null; + $this->container['subjectB'] = isset($data['subjectB']) ? $data['subjectB'] : null; + $this->container['splitRule'] = isset($data['splitRule']) ? $data['splitRule'] : null; + $this->container['winnerCriteria'] = isset($data['winnerCriteria']) ? $data['winnerCriteria'] : null; + $this->container['winnerDelay'] = isset($data['winnerDelay']) ? $data['winnerDelay'] : null; + $this->container['ipWarmupEnable'] = isset($data['ipWarmupEnable']) ? $data['ipWarmupEnable'] : false; + $this->container['initialQuota'] = isset($data['initialQuota']) ? $data['initialQuota'] : null; + $this->container['increaseRate'] = isset($data['increaseRate']) ? $data['increaseRate'] : null; + $this->container['unsubscriptionPageId'] = isset($data['unsubscriptionPageId']) ? $data['unsubscriptionPageId'] : null; + $this->container['updateFormId'] = isset($data['updateFormId']) ? $data['updateFormId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['sender'] === null) { + $invalidProperties[] = "'sender' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if (!is_null($this->container['splitRule']) && ($this->container['splitRule'] > 50)) { + $invalidProperties[] = "invalid value for 'splitRule', must be smaller than or equal to 50."; + } + + if (!is_null($this->container['splitRule']) && ($this->container['splitRule'] < 1)) { + $invalidProperties[] = "invalid value for 'splitRule', must be bigger than or equal to 1."; + } + + $allowedValues = $this->getWinnerCriteriaAllowableValues(); + if (!is_null($this->container['winnerCriteria']) && !in_array($this->container['winnerCriteria'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'winnerCriteria', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if (!is_null($this->container['winnerDelay']) && ($this->container['winnerDelay'] > 168)) { + $invalidProperties[] = "invalid value for 'winnerDelay', must be smaller than or equal to 168."; + } + + if (!is_null($this->container['winnerDelay']) && ($this->container['winnerDelay'] < 1)) { + $invalidProperties[] = "invalid value for 'winnerDelay', must be bigger than or equal to 1."; + } + + if (!is_null($this->container['increaseRate']) && ($this->container['increaseRate'] > 100)) { + $invalidProperties[] = "invalid value for 'increaseRate', must be smaller than or equal to 100."; + } + + if (!is_null($this->container['increaseRate']) && ($this->container['increaseRate'] < 0)) { + $invalidProperties[] = "invalid value for 'increaseRate', must be bigger than or equal to 0."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets tag + * + * @return string + */ + public function getTag() + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string $tag Tag of the campaign + * + * @return $this + */ + public function setTag($tag) + { + $this->container['tag'] = $tag; + + return $this; + } + + /** + * Gets sender + * + * @return \Brevo\Client\Model\CreateEmailCampaignSender + */ + public function getSender() + { + return $this->container['sender']; + } + + /** + * Sets sender + * + * @param \Brevo\Client\Model\CreateEmailCampaignSender $sender sender + * + * @return $this + */ + public function setSender($sender) + { + $this->container['sender'] = $sender; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the campaign + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets htmlContent + * + * @return string + */ + public function getHtmlContent() + { + return $this->container['htmlContent']; + } + + /** + * Sets htmlContent + * + * @param string $htmlContent Mandatory if htmlUrl and templateId are empty. Body of the message (HTML) + * + * @return $this + */ + public function setHtmlContent($htmlContent) + { + $this->container['htmlContent'] = $htmlContent; + + return $this; + } + + /** + * Gets htmlUrl + * + * @return string + */ + public function getHtmlUrl() + { + return $this->container['htmlUrl']; + } + + /** + * Sets htmlUrl + * + * @param string $htmlUrl Mandatory if htmlContent and templateId are empty. Url to the message (HTML) + * + * @return $this + */ + public function setHtmlUrl($htmlUrl) + { + $this->container['htmlUrl'] = $htmlUrl; + + return $this; + } + + /** + * Gets templateId + * + * @return int + */ + public function getTemplateId() + { + return $this->container['templateId']; + } + + /** + * Sets templateId + * + * @param int $templateId Mandatory if htmlContent and htmlUrl are empty. Id of the transactional email template with status 'active'. Used to copy only its content fetched from htmlContent/htmlUrl to an email campaign for RSS feature. + * + * @return $this + */ + public function setTemplateId($templateId) + { + $this->container['templateId'] = $templateId; + + return $this; + } + + /** + * Gets scheduledAt + * + * @return string + */ + public function getScheduledAt() + { + return $this->container['scheduledAt']; + } + + /** + * Sets scheduledAt + * + * @param string $scheduledAt Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. If sendAtBestTime is set to true, your campaign will be sent according to the date passed (ignoring the time part). + * + * @return $this + */ + public function setScheduledAt($scheduledAt) + { + $this->container['scheduledAt'] = $scheduledAt; + + return $this; + } + + /** + * Gets subject + * + * @return string + */ + public function getSubject() + { + return $this->container['subject']; + } + + /** + * Sets subject + * + * @param string $subject Subject of the campaign. Mandatory if abTesting is false. Ignored if abTesting is true. + * + * @return $this + */ + public function setSubject($subject) + { + $this->container['subject'] = $subject; + + return $this; + } + + /** + * Gets previewText + * + * @return string + */ + public function getPreviewText() + { + return $this->container['previewText']; + } + + /** + * Sets previewText + * + * @param string $previewText Preview text or preheader of the email campaign + * + * @return $this + */ + public function setPreviewText($previewText) + { + $this->container['previewText'] = $previewText; + + return $this; + } + + /** + * Gets replyTo + * + * @return string + */ + public function getReplyTo() + { + return $this->container['replyTo']; + } + + /** + * Sets replyTo + * + * @param string $replyTo Email on which the campaign recipients will be able to reply to + * + * @return $this + */ + public function setReplyTo($replyTo) + { + $this->container['replyTo'] = $replyTo; + + return $this; + } + + /** + * Gets toField + * + * @return string + */ + public function getToField() + { + return $this->container['toField']; + } + + /** + * Sets toField + * + * @param string $toField To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your Brevo account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization + * + * @return $this + */ + public function setToField($toField) + { + $this->container['toField'] = $toField; + + return $this; + } + + /** + * Gets recipients + * + * @return \Brevo\Client\Model\CreateEmailCampaignRecipients + */ + public function getRecipients() + { + return $this->container['recipients']; + } + + /** + * Sets recipients + * + * @param \Brevo\Client\Model\CreateEmailCampaignRecipients $recipients recipients + * + * @return $this + */ + public function setRecipients($recipients) + { + $this->container['recipients'] = $recipients; + + return $this; + } + + /** + * Gets attachmentUrl + * + * @return string + */ + public function getAttachmentUrl() + { + return $this->container['attachmentUrl']; + } + + /** + * Sets attachmentUrl + * + * @param string $attachmentUrl Absolute url of the attachment (no local file). 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 + * + * @return $this + */ + public function setAttachmentUrl($attachmentUrl) + { + $this->container['attachmentUrl'] = $attachmentUrl; + + return $this; + } + + /** + * Gets inlineImageActivation + * + * @return bool + */ + public function getInlineImageActivation() + { + return $this->container['inlineImageActivation']; + } + + /** + * Sets inlineImageActivation + * + * @param bool $inlineImageActivation Use true to embedded the images in your email. Final size of the email should be less than 4MB. Campaigns with embedded images can not be sent to more than 5000 contacts + * + * @return $this + */ + public function setInlineImageActivation($inlineImageActivation) + { + $this->container['inlineImageActivation'] = $inlineImageActivation; + + return $this; + } + + /** + * Gets mirrorActive + * + * @return bool + */ + public function getMirrorActive() + { + return $this->container['mirrorActive']; + } + + /** + * Sets mirrorActive + * + * @param bool $mirrorActive Use true to enable the mirror link + * + * @return $this + */ + public function setMirrorActive($mirrorActive) + { + $this->container['mirrorActive'] = $mirrorActive; + + return $this; + } + + /** + * Gets footer + * + * @return string + */ + public function getFooter() + { + return $this->container['footer']; + } + + /** + * Sets footer + * + * @param string $footer Footer of the email campaign + * + * @return $this + */ + public function setFooter($footer) + { + $this->container['footer'] = $footer; + + return $this; + } + + /** + * Gets header + * + * @return string + */ + public function getHeader() + { + return $this->container['header']; + } + + /** + * Sets header + * + * @param string $header Header of the email campaign + * + * @return $this + */ + public function setHeader($header) + { + $this->container['header'] = $header; + + return $this; + } + + /** + * Gets utmCampaign + * + * @return string + */ + public function getUtmCampaign() + { + return $this->container['utmCampaign']; + } + + /** + * Sets utmCampaign + * + * @param string $utmCampaign Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed + * + * @return $this + */ + public function setUtmCampaign($utmCampaign) + { + $this->container['utmCampaign'] = $utmCampaign; + + return $this; + } + + /** + * Gets params + * + * @return object + */ + public function getParams() + { + return $this->container['params']; + } + + /** + * Sets params + * + * @param object $params Pass the set of attributes to customize the type classic campaign. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. Only available if 'type' is 'classic'. It's considered only if campaign is in New Template Language format. The New Template Language is dependent on the values of 'subject', 'htmlContent/htmlUrl', 'sender.name' & 'toField' + * + * @return $this + */ + public function setParams($params) + { + $this->container['params'] = $params; + + return $this; + } + + /** + * Gets sendAtBestTime + * + * @return bool + */ + public function getSendAtBestTime() + { + return $this->container['sendAtBestTime']; + } + + /** + * Sets sendAtBestTime + * + * @param bool $sendAtBestTime Set this to true if you want to send your campaign at best time. + * + * @return $this + */ + public function setSendAtBestTime($sendAtBestTime) + { + $this->container['sendAtBestTime'] = $sendAtBestTime; + + return $this; + } + + /** + * Gets abTesting + * + * @return bool + */ + public function getAbTesting() + { + return $this->container['abTesting']; + } + + /** + * Sets abTesting + * + * @param bool $abTesting Status of A/B Test. abTesting = false means it is disabled, & abTesting = true means it is enabled. 'subjectA', 'subjectB', 'splitRule', 'winnerCriteria' & 'winnerDelay' will be considered when abTesting is set to true. 'subjectA' & 'subjectB' are mandatory together & 'subject' if passed is ignored. Can be set to true only if 'sendAtBestTime' is 'false'. You will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B + * + * @return $this + */ + public function setAbTesting($abTesting) + { + $this->container['abTesting'] = $abTesting; + + return $this; + } + + /** + * Gets subjectA + * + * @return string + */ + public function getSubjectA() + { + return $this->container['subjectA']; + } + + /** + * Sets subjectA + * + * @param string $subjectA Subject A of the campaign. Mandatory if abTesting = true. subjectA & subjectB should have unique value + * + * @return $this + */ + public function setSubjectA($subjectA) + { + $this->container['subjectA'] = $subjectA; + + return $this; + } + + /** + * Gets subjectB + * + * @return string + */ + public function getSubjectB() + { + return $this->container['subjectB']; + } + + /** + * Sets subjectB + * + * @param string $subjectB Subject B of the campaign. Mandatory if abTesting = true. subjectA & subjectB should have unique value + * + * @return $this + */ + public function setSubjectB($subjectB) + { + $this->container['subjectB'] = $subjectB; + + return $this; + } + + /** + * Gets splitRule + * + * @return int + */ + public function getSplitRule() + { + return $this->container['splitRule']; + } + + /** + * Sets splitRule + * + * @param int $splitRule Add the size of your test groups. Mandatory if abTesting = true & 'recipients' is passed. We'll send version A and B to a random sample of recipients, and then the winning version to everyone else + * + * @return $this + */ + public function setSplitRule($splitRule) + { + + if (!is_null($splitRule) && ($splitRule > 50)) { + throw new \InvalidArgumentException('invalid value for $splitRule when calling CreateEmailCampaign., must be smaller than or equal to 50.'); + } + if (!is_null($splitRule) && ($splitRule < 1)) { + throw new \InvalidArgumentException('invalid value for $splitRule when calling CreateEmailCampaign., must be bigger than or equal to 1.'); + } + + $this->container['splitRule'] = $splitRule; + + return $this; + } + + /** + * Gets winnerCriteria + * + * @return string + */ + public function getWinnerCriteria() + { + return $this->container['winnerCriteria']; + } + + /** + * Sets winnerCriteria + * + * @param string $winnerCriteria Choose the metrics that will determinate the winning version. Mandatory if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerCriteria' is ignored if passed + * + * @return $this + */ + public function setWinnerCriteria($winnerCriteria) + { + $allowedValues = $this->getWinnerCriteriaAllowableValues(); + if (!is_null($winnerCriteria) && !in_array($winnerCriteria, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'winnerCriteria', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['winnerCriteria'] = $winnerCriteria; + + return $this; + } + + /** + * Gets winnerDelay + * + * @return int + */ + public function getWinnerDelay() + { + return $this->container['winnerDelay']; + } + + /** + * Sets winnerDelay + * + * @param int $winnerDelay Choose the duration of the test in hours. Maximum is 7 days, pass 24*7 = 168 hours. The winning version will be sent at the end of the test. Mandatory if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerDelay' is ignored if passed + * + * @return $this + */ + public function setWinnerDelay($winnerDelay) + { + + if (!is_null($winnerDelay) && ($winnerDelay > 168)) { + throw new \InvalidArgumentException('invalid value for $winnerDelay when calling CreateEmailCampaign., must be smaller than or equal to 168.'); + } + if (!is_null($winnerDelay) && ($winnerDelay < 1)) { + throw new \InvalidArgumentException('invalid value for $winnerDelay when calling CreateEmailCampaign., must be bigger than or equal to 1.'); + } + + $this->container['winnerDelay'] = $winnerDelay; + + return $this; + } + + /** + * Gets ipWarmupEnable + * + * @return bool + */ + public function getIpWarmupEnable() + { + return $this->container['ipWarmupEnable']; + } + + /** + * Sets ipWarmupEnable + * + * @param bool $ipWarmupEnable Available for dedicated ip clients. Set this to true if you wish to warm up your ip. + * + * @return $this + */ + public function setIpWarmupEnable($ipWarmupEnable) + { + $this->container['ipWarmupEnable'] = $ipWarmupEnable; + + return $this; + } + + /** + * Gets initialQuota + * + * @return int + */ + public function getInitialQuota() + { + return $this->container['initialQuota']; + } + + /** + * Sets initialQuota + * + * @param int $initialQuota Mandatory if ipWarmupEnable is set to true. Set an initial quota greater than 1 for warming up your ip. We recommend you set a value of 3000. + * + * @return $this + */ + public function setInitialQuota($initialQuota) + { + $this->container['initialQuota'] = $initialQuota; + + return $this; + } + + /** + * Gets increaseRate + * + * @return int + */ + public function getIncreaseRate() + { + return $this->container['increaseRate']; + } + + /** + * Sets increaseRate + * + * @param int $increaseRate Mandatory if ipWarmupEnable is set to true. Set a percentage increase rate for warming up your ip. We recommend you set the increase rate to 30% per day. If you want to send the same number of emails every day, set the daily increase value to 0%. + * + * @return $this + */ + public function setIncreaseRate($increaseRate) + { + + if (!is_null($increaseRate) && ($increaseRate > 100)) { + throw new \InvalidArgumentException('invalid value for $increaseRate when calling CreateEmailCampaign., must be smaller than or equal to 100.'); + } + if (!is_null($increaseRate) && ($increaseRate < 0)) { + throw new \InvalidArgumentException('invalid value for $increaseRate when calling CreateEmailCampaign., must be bigger than or equal to 0.'); + } + + $this->container['increaseRate'] = $increaseRate; + + return $this; + } + + /** + * Gets unsubscriptionPageId + * + * @return string + */ + public function getUnsubscriptionPageId() + { + return $this->container['unsubscriptionPageId']; + } + + /** + * Sets unsubscriptionPageId + * + * @param string $unsubscriptionPageId Enter an unsubscription page id. The page id is a 24 digit alphanumeric id that can be found in the URL when editing the page. If not entered, then the default unsubscription page will be used. + * + * @return $this + */ + public function setUnsubscriptionPageId($unsubscriptionPageId) + { + $this->container['unsubscriptionPageId'] = $unsubscriptionPageId; + + return $this; + } + + /** + * Gets updateFormId + * + * @return string + */ + public function getUpdateFormId() + { + return $this->container['updateFormId']; + } + + /** + * Sets updateFormId + * + * @param string $updateFormId Mandatory if templateId is used containing the {{ update_profile }} tag. Enter an update profile form id. The form id is a 24 digit alphanumeric id that can be found in the URL when editing the form. If not entered, then the default update profile form will be used. + * + * @return $this + */ + public function setUpdateFormId($updateFormId) + { + $this->container['updateFormId'] = $updateFormId; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateEmailCampaignRecipients.php b/vendor/getbrevo/brevo-php/lib/Model/CreateEmailCampaignRecipients.php new file mode 100644 index 0000000..c4d1cb5 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateEmailCampaignRecipients.php @@ -0,0 +1,366 @@ + 'int[]', + 'listIds' => 'int[]', + 'segmentIds' => 'int[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'exclusionListIds' => 'int64', + 'listIds' => 'int64', + 'segmentIds' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'exclusionListIds' => 'exclusionListIds', + 'listIds' => 'listIds', + 'segmentIds' => 'segmentIds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'exclusionListIds' => 'setExclusionListIds', + 'listIds' => 'setListIds', + 'segmentIds' => 'setSegmentIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'exclusionListIds' => 'getExclusionListIds', + 'listIds' => 'getListIds', + 'segmentIds' => 'getSegmentIds' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['exclusionListIds'] = isset($data['exclusionListIds']) ? $data['exclusionListIds'] : null; + $this->container['listIds'] = isset($data['listIds']) ? $data['listIds'] : null; + $this->container['segmentIds'] = isset($data['segmentIds']) ? $data['segmentIds'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets exclusionListIds + * + * @return int[] + */ + public function getExclusionListIds() + { + return $this->container['exclusionListIds']; + } + + /** + * Sets exclusionListIds + * + * @param int[] $exclusionListIds List ids to exclude from the campaign + * + * @return $this + */ + public function setExclusionListIds($exclusionListIds) + { + $this->container['exclusionListIds'] = $exclusionListIds; + + return $this; + } + + /** + * Gets listIds + * + * @return int[] + */ + public function getListIds() + { + return $this->container['listIds']; + } + + /** + * Sets listIds + * + * @param int[] $listIds Mandatory if scheduledAt is not empty. List Ids to send the campaign to + * + * @return $this + */ + public function setListIds($listIds) + { + $this->container['listIds'] = $listIds; + + return $this; + } + + /** + * Gets segmentIds + * + * @return int[] + */ + public function getSegmentIds() + { + return $this->container['segmentIds']; + } + + /** + * Sets segmentIds + * + * @param int[] $segmentIds Mandatory if listIds are not used. Segment ids to send the campaign to. + * + * @return $this + */ + public function setSegmentIds($segmentIds) + { + $this->container['segmentIds'] = $segmentIds; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateEmailCampaignSender.php b/vendor/getbrevo/brevo-php/lib/Model/CreateEmailCampaignSender.php new file mode 100644 index 0000000..5b7185b --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateEmailCampaignSender.php @@ -0,0 +1,369 @@ + 'string', + 'email' => 'string', + 'id' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null, + 'email' => 'email', + 'id' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'email' => 'email', + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'email' => 'setEmail', + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'email' => 'getEmail', + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Sender Name + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email Sender email + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id Select the sender for the campaign on the basis of sender id. In order to select a sender with specific pool of IP’s, dedicated ip users shall pass id (instead of email). + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateExternalFeed.php b/vendor/getbrevo/brevo-php/lib/Model/CreateExternalFeed.php new file mode 100644 index 0000000..fa3fa2d --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateExternalFeed.php @@ -0,0 +1,601 @@ + 'string', + 'url' => 'string', + 'authType' => 'string', + 'username' => 'string', + 'password' => 'string', + 'token' => 'string', + 'headers' => '\Brevo\Client\Model\GetExternalFeedByUUIDHeaders[]', + 'maxRetries' => 'int', + 'cache' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null, + 'url' => 'url', + 'authType' => null, + 'username' => null, + 'password' => null, + 'token' => null, + 'headers' => null, + 'maxRetries' => null, + 'cache' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'url' => 'url', + 'authType' => 'authType', + 'username' => 'username', + 'password' => 'password', + 'token' => 'token', + 'headers' => 'headers', + 'maxRetries' => 'maxRetries', + 'cache' => 'cache' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'url' => 'setUrl', + 'authType' => 'setAuthType', + 'username' => 'setUsername', + 'password' => 'setPassword', + 'token' => 'setToken', + 'headers' => 'setHeaders', + 'maxRetries' => 'setMaxRetries', + 'cache' => 'setCache' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'url' => 'getUrl', + 'authType' => 'getAuthType', + 'username' => 'getUsername', + 'password' => 'getPassword', + 'token' => 'getToken', + 'headers' => 'getHeaders', + 'maxRetries' => 'getMaxRetries', + 'cache' => 'getCache' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const AUTH_TYPE_BASIC = 'basic'; + const AUTH_TYPE_TOKEN = 'token'; + const AUTH_TYPE_NO_AUTH = 'noAuth'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAuthTypeAllowableValues() + { + return [ + self::AUTH_TYPE_BASIC, + self::AUTH_TYPE_TOKEN, + self::AUTH_TYPE_NO_AUTH, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['url'] = isset($data['url']) ? $data['url'] : null; + $this->container['authType'] = isset($data['authType']) ? $data['authType'] : 'noAuth'; + $this->container['username'] = isset($data['username']) ? $data['username'] : null; + $this->container['password'] = isset($data['password']) ? $data['password'] : null; + $this->container['token'] = isset($data['token']) ? $data['token'] : null; + $this->container['headers'] = isset($data['headers']) ? $data['headers'] : null; + $this->container['maxRetries'] = isset($data['maxRetries']) ? $data['maxRetries'] : null; + $this->container['cache'] = isset($data['cache']) ? $data['cache'] : false; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['url'] === null) { + $invalidProperties[] = "'url' can't be null"; + } + $allowedValues = $this->getAuthTypeAllowableValues(); + if (!is_null($this->container['authType']) && !in_array($this->container['authType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'authType', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if (!is_null($this->container['maxRetries']) && ($this->container['maxRetries'] > 5)) { + $invalidProperties[] = "invalid value for 'maxRetries', must be smaller than or equal to 5."; + } + + if (!is_null($this->container['maxRetries']) && ($this->container['maxRetries'] < 0)) { + $invalidProperties[] = "invalid value for 'maxRetries', must be bigger than or equal to 0."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the feed + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets url + * + * @return string + */ + public function getUrl() + { + return $this->container['url']; + } + + /** + * Sets url + * + * @param string $url URL of the feed + * + * @return $this + */ + public function setUrl($url) + { + $this->container['url'] = $url; + + return $this; + } + + /** + * Gets authType + * + * @return string + */ + public function getAuthType() + { + return $this->container['authType']; + } + + /** + * Sets authType + * + * @param string $authType Auth type of the feed: * `basic` * `token` * `noAuth` + * + * @return $this + */ + public function setAuthType($authType) + { + $allowedValues = $this->getAuthTypeAllowableValues(); + if (!is_null($authType) && !in_array($authType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'authType', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['authType'] = $authType; + + return $this; + } + + /** + * Gets username + * + * @return string + */ + public function getUsername() + { + return $this->container['username']; + } + + /** + * Sets username + * + * @param string $username Username for authType `basic` + * + * @return $this + */ + public function setUsername($username) + { + $this->container['username'] = $username; + + return $this; + } + + /** + * Gets password + * + * @return string + */ + public function getPassword() + { + return $this->container['password']; + } + + /** + * Sets password + * + * @param string $password Password for authType `basic` + * + * @return $this + */ + public function setPassword($password) + { + $this->container['password'] = $password; + + return $this; + } + + /** + * Gets token + * + * @return string + */ + public function getToken() + { + return $this->container['token']; + } + + /** + * Sets token + * + * @param string $token Token for authType `token` + * + * @return $this + */ + public function setToken($token) + { + $this->container['token'] = $token; + + return $this; + } + + /** + * Gets headers + * + * @return \Brevo\Client\Model\GetExternalFeedByUUIDHeaders[] + */ + public function getHeaders() + { + return $this->container['headers']; + } + + /** + * Sets headers + * + * @param \Brevo\Client\Model\GetExternalFeedByUUIDHeaders[] $headers Custom headers for the feed + * + * @return $this + */ + public function setHeaders($headers) + { + $this->container['headers'] = $headers; + + return $this; + } + + /** + * Gets maxRetries + * + * @return int + */ + public function getMaxRetries() + { + return $this->container['maxRetries']; + } + + /** + * Sets maxRetries + * + * @param int $maxRetries Maximum number of retries on the feed url + * + * @return $this + */ + public function setMaxRetries($maxRetries) + { + + if (!is_null($maxRetries) && ($maxRetries > 5)) { + throw new \InvalidArgumentException('invalid value for $maxRetries when calling CreateExternalFeed., must be smaller than or equal to 5.'); + } + if (!is_null($maxRetries) && ($maxRetries < 0)) { + throw new \InvalidArgumentException('invalid value for $maxRetries when calling CreateExternalFeed., must be bigger than or equal to 0.'); + } + + $this->container['maxRetries'] = $maxRetries; + + return $this; + } + + /** + * Gets cache + * + * @return bool + */ + public function getCache() + { + return $this->container['cache']; + } + + /** + * Sets cache + * + * @param bool $cache Toggle caching of feed url response + * + * @return $this + */ + public function setCache($cache) + { + $this->container['cache'] = $cache; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateList.php b/vendor/getbrevo/brevo-php/lib/Model/CreateList.php new file mode 100644 index 0000000..cc7f5ee --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateList.php @@ -0,0 +1,341 @@ + 'string', + 'folderId' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null, + 'folderId' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'folderId' => 'folderId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'folderId' => 'setFolderId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'folderId' => 'getFolderId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['folderId'] = isset($data['folderId']) ? $data['folderId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['folderId'] === null) { + $invalidProperties[] = "'folderId' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the list + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets folderId + * + * @return int + */ + public function getFolderId() + { + return $this->container['folderId']; + } + + /** + * Sets folderId + * + * @param int $folderId Id of the parent folder in which this list is to be created + * + * @return $this + */ + public function setFolderId($folderId) + { + $this->container['folderId'] = $folderId; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateModel.php b/vendor/getbrevo/brevo-php/lib/Model/CreateModel.php new file mode 100644 index 0000000..921fdd7 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateModel.php @@ -0,0 +1,308 @@ + 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id ID of the object created + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateProductModel.php b/vendor/getbrevo/brevo-php/lib/Model/CreateProductModel.php new file mode 100644 index 0000000..4d475ea --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateProductModel.php @@ -0,0 +1,305 @@ + 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id ID of the Product when a new product is created + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateReseller.php b/vendor/getbrevo/brevo-php/lib/Model/CreateReseller.php new file mode 100644 index 0000000..e9cc84d --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateReseller.php @@ -0,0 +1,338 @@ + 'string', + 'id' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'authKey' => null, + 'id' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'authKey' => 'authKey', + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'authKey' => 'setAuthKey', + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'authKey' => 'getAuthKey', + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['authKey'] = isset($data['authKey']) ? $data['authKey'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['authKey'] === null) { + $invalidProperties[] = "'authKey' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets authKey + * + * @return string + */ + public function getAuthKey() + { + return $this->container['authKey']; + } + + /** + * Sets authKey + * + * @param string $authKey AuthKey of Reseller child created + * + * @return $this + */ + public function setAuthKey($authKey) + { + $this->container['authKey'] = $authKey; + + return $this; + } + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id Id of Reseller child created + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateSender.php b/vendor/getbrevo/brevo-php/lib/Model/CreateSender.php new file mode 100644 index 0000000..99c6e86 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateSender.php @@ -0,0 +1,371 @@ + 'string', + 'email' => 'string', + 'ips' => '\Brevo\Client\Model\CreateSenderIps[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null, + 'email' => 'email', + 'ips' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'email' => 'email', + 'ips' => 'ips' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'email' => 'setEmail', + 'ips' => 'setIps' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'email' => 'getEmail', + 'ips' => 'getIps' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['ips'] = isset($data['ips']) ? $data['ips'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name From Name to use for the sender + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email From email to use for the sender. A verification email will be sent to this address. + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets ips + * + * @return \Brevo\Client\Model\CreateSenderIps[] + */ + public function getIps() + { + return $this->container['ips']; + } + + /** + * Sets ips + * + * @param \Brevo\Client\Model\CreateSenderIps[] $ips Mandatory in case of dedicated IP, IPs to associate to the sender + * + * @return $this + */ + public function setIps($ips) + { + $this->container['ips'] = $ips; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateSenderIps.php b/vendor/getbrevo/brevo-php/lib/Model/CreateSenderIps.php new file mode 100644 index 0000000..e2f5c77 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateSenderIps.php @@ -0,0 +1,387 @@ + 'string', + 'domain' => 'string', + 'weight' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'ip' => null, + 'domain' => null, + 'weight' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'ip' => 'ip', + 'domain' => 'domain', + 'weight' => 'weight' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'ip' => 'setIp', + 'domain' => 'setDomain', + 'weight' => 'setWeight' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'ip' => 'getIp', + 'domain' => 'getDomain', + 'weight' => 'getWeight' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; + $this->container['domain'] = isset($data['domain']) ? $data['domain'] : null; + $this->container['weight'] = isset($data['weight']) ? $data['weight'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['ip'] === null) { + $invalidProperties[] = "'ip' can't be null"; + } + if ($this->container['domain'] === null) { + $invalidProperties[] = "'domain' can't be null"; + } + if (!is_null($this->container['weight']) && ($this->container['weight'] > 100)) { + $invalidProperties[] = "invalid value for 'weight', must be smaller than or equal to 100."; + } + + if (!is_null($this->container['weight']) && ($this->container['weight'] < 1)) { + $invalidProperties[] = "invalid value for 'weight', must be bigger than or equal to 1."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets ip + * + * @return string + */ + public function getIp() + { + return $this->container['ip']; + } + + /** + * Sets ip + * + * @param string $ip Dedicated IP available in your account + * + * @return $this + */ + public function setIp($ip) + { + $this->container['ip'] = $ip; + + return $this; + } + + /** + * Gets domain + * + * @return string + */ + public function getDomain() + { + return $this->container['domain']; + } + + /** + * Sets domain + * + * @param string $domain Domain of the IP + * + * @return $this + */ + public function setDomain($domain) + { + $this->container['domain'] = $domain; + + return $this; + } + + /** + * Gets weight + * + * @return int + */ + public function getWeight() + { + return $this->container['weight']; + } + + /** + * Sets weight + * + * @param int $weight Weight to apply to the IP. Sum of all IP weights must be 100. Should be passed for either ALL or NONE of the IPs. If it's not passed, the sending will be equally balanced on all IPs. + * + * @return $this + */ + public function setWeight($weight) + { + + if (!is_null($weight) && ($weight > 100)) { + throw new \InvalidArgumentException('invalid value for $weight when calling CreateSenderIps., must be smaller than or equal to 100.'); + } + if (!is_null($weight) && ($weight < 1)) { + throw new \InvalidArgumentException('invalid value for $weight when calling CreateSenderIps., must be bigger than or equal to 1.'); + } + + $this->container['weight'] = $weight; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateSenderModel.php b/vendor/getbrevo/brevo-php/lib/Model/CreateSenderModel.php new file mode 100644 index 0000000..d1c6d02 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateSenderModel.php @@ -0,0 +1,368 @@ + 'int', + 'spfError' => 'bool', + 'dkimError' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'int64', + 'spfError' => null, + 'dkimError' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'spfError' => 'spfError', + 'dkimError' => 'dkimError' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'spfError' => 'setSpfError', + 'dkimError' => 'setDkimError' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'spfError' => 'getSpfError', + 'dkimError' => 'getDkimError' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['spfError'] = isset($data['spfError']) ? $data['spfError'] : null; + $this->container['dkimError'] = isset($data['dkimError']) ? $data['dkimError'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id ID of the Sender created + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets spfError + * + * @return bool + */ + public function getSpfError() + { + return $this->container['spfError']; + } + + /** + * Sets spfError + * + * @param bool $spfError Status of SPF configuration for the sender (true = SPF not well configured, false = SPF well configured) + * + * @return $this + */ + public function setSpfError($spfError) + { + $this->container['spfError'] = $spfError; + + return $this; + } + + /** + * Gets dkimError + * + * @return bool + */ + public function getDkimError() + { + return $this->container['dkimError']; + } + + /** + * Sets dkimError + * + * @param bool $dkimError Status of DKIM configuration for the sender (true = DKIM not well configured, false = DKIM well configured) + * + * @return $this + */ + public function setDkimError($dkimError) + { + $this->container['dkimError'] = $dkimError; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateSmsCampaign.php b/vendor/getbrevo/brevo-php/lib/Model/CreateSmsCampaign.php new file mode 100644 index 0000000..af82549 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateSmsCampaign.php @@ -0,0 +1,532 @@ + 'string', + 'sender' => 'string', + 'content' => 'string', + 'recipients' => '\Brevo\Client\Model\CreateSmsCampaignRecipients', + 'scheduledAt' => 'string', + 'unicodeEnabled' => 'bool', + 'organisationPrefix' => 'string', + 'unsubscribeInstruction' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null, + 'sender' => null, + 'content' => null, + 'recipients' => null, + 'scheduledAt' => null, + 'unicodeEnabled' => null, + 'organisationPrefix' => null, + 'unsubscribeInstruction' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'sender' => 'sender', + 'content' => 'content', + 'recipients' => 'recipients', + 'scheduledAt' => 'scheduledAt', + 'unicodeEnabled' => 'unicodeEnabled', + 'organisationPrefix' => 'organisationPrefix', + 'unsubscribeInstruction' => 'unsubscribeInstruction' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'sender' => 'setSender', + 'content' => 'setContent', + 'recipients' => 'setRecipients', + 'scheduledAt' => 'setScheduledAt', + 'unicodeEnabled' => 'setUnicodeEnabled', + 'organisationPrefix' => 'setOrganisationPrefix', + 'unsubscribeInstruction' => 'setUnsubscribeInstruction' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'sender' => 'getSender', + 'content' => 'getContent', + 'recipients' => 'getRecipients', + 'scheduledAt' => 'getScheduledAt', + 'unicodeEnabled' => 'getUnicodeEnabled', + 'organisationPrefix' => 'getOrganisationPrefix', + 'unsubscribeInstruction' => 'getUnsubscribeInstruction' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['sender'] = isset($data['sender']) ? $data['sender'] : null; + $this->container['content'] = isset($data['content']) ? $data['content'] : null; + $this->container['recipients'] = isset($data['recipients']) ? $data['recipients'] : null; + $this->container['scheduledAt'] = isset($data['scheduledAt']) ? $data['scheduledAt'] : null; + $this->container['unicodeEnabled'] = isset($data['unicodeEnabled']) ? $data['unicodeEnabled'] : false; + $this->container['organisationPrefix'] = isset($data['organisationPrefix']) ? $data['organisationPrefix'] : null; + $this->container['unsubscribeInstruction'] = isset($data['unsubscribeInstruction']) ? $data['unsubscribeInstruction'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['sender'] === null) { + $invalidProperties[] = "'sender' can't be null"; + } + if ((mb_strlen($this->container['sender']) > 15)) { + $invalidProperties[] = "invalid value for 'sender', the character length must be smaller than or equal to 15."; + } + + if ($this->container['content'] === null) { + $invalidProperties[] = "'content' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the campaign + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets sender + * + * @return string + */ + public function getSender() + { + return $this->container['sender']; + } + + /** + * Sets sender + * + * @param string $sender Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters** + * + * @return $this + */ + public function setSender($sender) + { + if ((mb_strlen($sender) > 15)) { + throw new \InvalidArgumentException('invalid length for $sender when calling CreateSmsCampaign., must be smaller than or equal to 15.'); + } + + $this->container['sender'] = $sender; + + return $this; + } + + /** + * Gets content + * + * @return string + */ + public function getContent() + { + return $this->container['content']; + } + + /** + * Sets content + * + * @param string $content Content of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS + * + * @return $this + */ + public function setContent($content) + { + $this->container['content'] = $content; + + return $this; + } + + /** + * Gets recipients + * + * @return \Brevo\Client\Model\CreateSmsCampaignRecipients + */ + public function getRecipients() + { + return $this->container['recipients']; + } + + /** + * Sets recipients + * + * @param \Brevo\Client\Model\CreateSmsCampaignRecipients $recipients recipients + * + * @return $this + */ + public function setRecipients($recipients) + { + $this->container['recipients'] = $recipients; + + return $this; + } + + /** + * Gets scheduledAt + * + * @return string + */ + public function getScheduledAt() + { + return $this->container['scheduledAt']; + } + + /** + * Sets scheduledAt + * + * @param string $scheduledAt UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. + * + * @return $this + */ + public function setScheduledAt($scheduledAt) + { + $this->container['scheduledAt'] = $scheduledAt; + + return $this; + } + + /** + * Gets unicodeEnabled + * + * @return bool + */ + public function getUnicodeEnabled() + { + return $this->container['unicodeEnabled']; + } + + /** + * Sets unicodeEnabled + * + * @param bool $unicodeEnabled Format of the message. It indicates whether the content should be treated as unicode or not. + * + * @return $this + */ + public function setUnicodeEnabled($unicodeEnabled) + { + $this->container['unicodeEnabled'] = $unicodeEnabled; + + return $this; + } + + /** + * Gets organisationPrefix + * + * @return string + */ + public function getOrganisationPrefix() + { + return $this->container['organisationPrefix']; + } + + /** + * Sets organisationPrefix + * + * @param string $organisationPrefix A recognizable prefix will ensure your audience knows who you are. Recommended by U.S. carriers. This will be added as your Brand Name before the message content. **Prefer verifying maximum length of 160 characters including this prefix in message content to avoid multiple sending of same sms.** + * + * @return $this + */ + public function setOrganisationPrefix($organisationPrefix) + { + $this->container['organisationPrefix'] = $organisationPrefix; + + return $this; + } + + /** + * Gets unsubscribeInstruction + * + * @return string + */ + public function getUnsubscribeInstruction() + { + return $this->container['unsubscribeInstruction']; + } + + /** + * Sets unsubscribeInstruction + * + * @param string $unsubscribeInstruction Instructions to unsubscribe from future communications. Recommended by U.S. carriers. Must include **STOP** keyword. This will be added as instructions after the end of message content. **Prefer verifying maximum length of 160 characters including this instructions in message content to avoid multiple sending of same sms.** + * + * @return $this + */ + public function setUnsubscribeInstruction($unsubscribeInstruction) + { + $this->container['unsubscribeInstruction'] = $unsubscribeInstruction; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateSmsCampaignRecipients.php b/vendor/getbrevo/brevo-php/lib/Model/CreateSmsCampaignRecipients.php new file mode 100644 index 0000000..080776a --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateSmsCampaignRecipients.php @@ -0,0 +1,338 @@ + 'int[]', + 'exclusionListIds' => 'int[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'listIds' => 'int64', + 'exclusionListIds' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'listIds' => 'listIds', + 'exclusionListIds' => 'exclusionListIds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'listIds' => 'setListIds', + 'exclusionListIds' => 'setExclusionListIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'listIds' => 'getListIds', + 'exclusionListIds' => 'getExclusionListIds' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['listIds'] = isset($data['listIds']) ? $data['listIds'] : null; + $this->container['exclusionListIds'] = isset($data['exclusionListIds']) ? $data['exclusionListIds'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['listIds'] === null) { + $invalidProperties[] = "'listIds' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets listIds + * + * @return int[] + */ + public function getListIds() + { + return $this->container['listIds']; + } + + /** + * Sets listIds + * + * @param int[] $listIds Lists Ids to send the campaign to. REQUIRED if scheduledAt is not empty + * + * @return $this + */ + public function setListIds($listIds) + { + $this->container['listIds'] = $listIds; + + return $this; + } + + /** + * Gets exclusionListIds + * + * @return int[] + */ + public function getExclusionListIds() + { + return $this->container['exclusionListIds']; + } + + /** + * Sets exclusionListIds + * + * @param int[] $exclusionListIds List ids which have to be excluded from a campaign + * + * @return $this + */ + public function setExclusionListIds($exclusionListIds) + { + $this->container['exclusionListIds'] = $exclusionListIds; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateSmtpEmail.php b/vendor/getbrevo/brevo-php/lib/Model/CreateSmtpEmail.php new file mode 100644 index 0000000..5f2a3a5 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateSmtpEmail.php @@ -0,0 +1,335 @@ + 'string', + 'messageIds' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'messageId' => null, + 'messageIds' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'messageId' => 'messageId', + 'messageIds' => 'messageIds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'messageId' => 'setMessageId', + 'messageIds' => 'setMessageIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'messageId' => 'getMessageId', + 'messageIds' => 'getMessageIds' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['messageId'] = isset($data['messageId']) ? $data['messageId'] : null; + $this->container['messageIds'] = isset($data['messageIds']) ? $data['messageIds'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets messageId + * + * @return string + */ + public function getMessageId() + { + return $this->container['messageId']; + } + + /** + * Sets messageId + * + * @param string $messageId Message ID of the transactional email sent + * + * @return $this + */ + public function setMessageId($messageId) + { + $this->container['messageId'] = $messageId; + + return $this; + } + + /** + * Gets messageIds + * + * @return string[] + */ + public function getMessageIds() + { + return $this->container['messageIds']; + } + + /** + * Sets messageIds + * + * @param string[] $messageIds messageIds + * + * @return $this + */ + public function setMessageIds($messageIds) + { + $this->container['messageIds'] = $messageIds; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateSmtpTemplate.php b/vendor/getbrevo/brevo-php/lib/Model/CreateSmtpTemplate.php new file mode 100644 index 0000000..1953e4f --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateSmtpTemplate.php @@ -0,0 +1,584 @@ + 'string', + 'sender' => '\Brevo\Client\Model\CreateSmtpTemplateSender', + 'templateName' => 'string', + 'htmlContent' => 'string', + 'htmlUrl' => 'string', + 'subject' => 'string', + 'replyTo' => 'string', + 'toField' => 'string', + 'attachmentUrl' => 'string', + 'isActive' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'tag' => null, + 'sender' => null, + 'templateName' => null, + 'htmlContent' => null, + 'htmlUrl' => 'url', + 'subject' => null, + 'replyTo' => 'email', + 'toField' => null, + 'attachmentUrl' => 'url', + 'isActive' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'tag' => 'tag', + 'sender' => 'sender', + 'templateName' => 'templateName', + 'htmlContent' => 'htmlContent', + 'htmlUrl' => 'htmlUrl', + 'subject' => 'subject', + 'replyTo' => 'replyTo', + 'toField' => 'toField', + 'attachmentUrl' => 'attachmentUrl', + 'isActive' => 'isActive' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'tag' => 'setTag', + 'sender' => 'setSender', + 'templateName' => 'setTemplateName', + 'htmlContent' => 'setHtmlContent', + 'htmlUrl' => 'setHtmlUrl', + 'subject' => 'setSubject', + 'replyTo' => 'setReplyTo', + 'toField' => 'setToField', + 'attachmentUrl' => 'setAttachmentUrl', + 'isActive' => 'setIsActive' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'tag' => 'getTag', + 'sender' => 'getSender', + 'templateName' => 'getTemplateName', + 'htmlContent' => 'getHtmlContent', + 'htmlUrl' => 'getHtmlUrl', + 'subject' => 'getSubject', + 'replyTo' => 'getReplyTo', + 'toField' => 'getToField', + 'attachmentUrl' => 'getAttachmentUrl', + 'isActive' => 'getIsActive' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; + $this->container['sender'] = isset($data['sender']) ? $data['sender'] : null; + $this->container['templateName'] = isset($data['templateName']) ? $data['templateName'] : null; + $this->container['htmlContent'] = isset($data['htmlContent']) ? $data['htmlContent'] : null; + $this->container['htmlUrl'] = isset($data['htmlUrl']) ? $data['htmlUrl'] : null; + $this->container['subject'] = isset($data['subject']) ? $data['subject'] : null; + $this->container['replyTo'] = isset($data['replyTo']) ? $data['replyTo'] : null; + $this->container['toField'] = isset($data['toField']) ? $data['toField'] : null; + $this->container['attachmentUrl'] = isset($data['attachmentUrl']) ? $data['attachmentUrl'] : null; + $this->container['isActive'] = isset($data['isActive']) ? $data['isActive'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['sender'] === null) { + $invalidProperties[] = "'sender' can't be null"; + } + if ($this->container['templateName'] === null) { + $invalidProperties[] = "'templateName' can't be null"; + } + if ($this->container['subject'] === null) { + $invalidProperties[] = "'subject' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets tag + * + * @return string + */ + public function getTag() + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string $tag Tag of the template + * + * @return $this + */ + public function setTag($tag) + { + $this->container['tag'] = $tag; + + return $this; + } + + /** + * Gets sender + * + * @return \Brevo\Client\Model\CreateSmtpTemplateSender + */ + public function getSender() + { + return $this->container['sender']; + } + + /** + * Sets sender + * + * @param \Brevo\Client\Model\CreateSmtpTemplateSender $sender sender + * + * @return $this + */ + public function setSender($sender) + { + $this->container['sender'] = $sender; + + return $this; + } + + /** + * Gets templateName + * + * @return string + */ + public function getTemplateName() + { + return $this->container['templateName']; + } + + /** + * Sets templateName + * + * @param string $templateName Name of the template + * + * @return $this + */ + public function setTemplateName($templateName) + { + $this->container['templateName'] = $templateName; + + return $this; + } + + /** + * Gets htmlContent + * + * @return string + */ + public function getHtmlContent() + { + return $this->container['htmlContent']; + } + + /** + * Sets htmlContent + * + * @param string $htmlContent Body of the message (HTML version). The field must have more than 10 characters. REQUIRED if htmlUrl is empty + * + * @return $this + */ + public function setHtmlContent($htmlContent) + { + $this->container['htmlContent'] = $htmlContent; + + return $this; + } + + /** + * Gets htmlUrl + * + * @return string + */ + public function getHtmlUrl() + { + return $this->container['htmlUrl']; + } + + /** + * Sets htmlUrl + * + * @param string $htmlUrl Url which contents the body of the email message. REQUIRED if htmlContent is empty + * + * @return $this + */ + public function setHtmlUrl($htmlUrl) + { + $this->container['htmlUrl'] = $htmlUrl; + + return $this; + } + + /** + * Gets subject + * + * @return string + */ + public function getSubject() + { + return $this->container['subject']; + } + + /** + * Sets subject + * + * @param string $subject Subject of the template + * + * @return $this + */ + public function setSubject($subject) + { + $this->container['subject'] = $subject; + + return $this; + } + + /** + * Gets replyTo + * + * @return string + */ + public function getReplyTo() + { + return $this->container['replyTo']; + } + + /** + * Sets replyTo + * + * @param string $replyTo Email on which campaign recipients will be able to reply to + * + * @return $this + */ + public function setReplyTo($replyTo) + { + $this->container['replyTo'] = $replyTo; + + return $this; + } + + /** + * Gets toField + * + * @return string + */ + public function getToField() + { + return $this->container['toField']; + } + + /** + * Sets toField + * + * @param string $toField To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your Brevo account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization + * + * @return $this + */ + public function setToField($toField) + { + $this->container['toField'] = $toField; + + return $this; + } + + /** + * Gets attachmentUrl + * + * @return string + */ + public function getAttachmentUrl() + { + return $this->container['attachmentUrl']; + } + + /** + * Sets attachmentUrl + * + * @param string $attachmentUrl Absolute url of the attachment (no local file). 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 + * + * @return $this + */ + public function setAttachmentUrl($attachmentUrl) + { + $this->container['attachmentUrl'] = $attachmentUrl; + + return $this; + } + + /** + * Gets isActive + * + * @return bool + */ + public function getIsActive() + { + return $this->container['isActive']; + } + + /** + * Sets isActive + * + * @param bool $isActive Status of template. isActive = true means template is active and isActive = false means template is inactive + * + * @return $this + */ + public function setIsActive($isActive) + { + $this->container['isActive'] = $isActive; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateSmtpTemplateSender.php b/vendor/getbrevo/brevo-php/lib/Model/CreateSmtpTemplateSender.php new file mode 100644 index 0000000..e208b3a --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateSmtpTemplateSender.php @@ -0,0 +1,366 @@ + 'string', + 'email' => 'string', + 'id' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null, + 'email' => 'email', + 'id' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'email' => 'email', + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'email' => 'setEmail', + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'email' => 'getEmail', + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the sender. If not passed, will be set to default + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email Email of the sender + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id Select the sender for the template on the basis of sender id. In order to select a sender with specific pool of IP’s, dedicated ip users shall pass id (instead of email). + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateSubAccount.php b/vendor/getbrevo/brevo-php/lib/Model/CreateSubAccount.php new file mode 100644 index 0000000..ee0fbb6 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateSubAccount.php @@ -0,0 +1,441 @@ + 'string', + 'email' => 'string', + 'language' => 'string', + 'timezone' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'companyName' => null, + 'email' => null, + 'language' => null, + 'timezone' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'companyName' => 'companyName', + 'email' => 'email', + 'language' => 'language', + 'timezone' => 'timezone' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'companyName' => 'setCompanyName', + 'email' => 'setEmail', + 'language' => 'setLanguage', + 'timezone' => 'setTimezone' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'companyName' => 'getCompanyName', + 'email' => 'getEmail', + 'language' => 'getLanguage', + 'timezone' => 'getTimezone' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const LANGUAGE_EN = 'en'; + const LANGUAGE_FR = 'fr'; + const LANGUAGE_IT = 'it'; + const LANGUAGE_ES = 'es'; + const LANGUAGE_PT = 'pt'; + const LANGUAGE_DE = 'de'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getLanguageAllowableValues() + { + return [ + self::LANGUAGE_EN, + self::LANGUAGE_FR, + self::LANGUAGE_IT, + self::LANGUAGE_ES, + self::LANGUAGE_PT, + self::LANGUAGE_DE, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['companyName'] = isset($data['companyName']) ? $data['companyName'] : null; + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['language'] = isset($data['language']) ? $data['language'] : null; + $this->container['timezone'] = isset($data['timezone']) ? $data['timezone'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['companyName'] === null) { + $invalidProperties[] = "'companyName' can't be null"; + } + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + $allowedValues = $this->getLanguageAllowableValues(); + if (!is_null($this->container['language']) && !in_array($this->container['language'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'language', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets companyName + * + * @return string + */ + public function getCompanyName() + { + return $this->container['companyName']; + } + + /** + * Sets companyName + * + * @param string $companyName Set the name of the sub-account company + * + * @return $this + */ + public function setCompanyName($companyName) + { + $this->container['companyName'] = $companyName; + + return $this; + } + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email Email address for the organization + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets language + * + * @return string + */ + public function getLanguage() + { + return $this->container['language']; + } + + /** + * Sets language + * + * @param string $language Set the language of the sub-account + * + * @return $this + */ + public function setLanguage($language) + { + $allowedValues = $this->getLanguageAllowableValues(); + if (!is_null($language) && !in_array($language, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'language', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['language'] = $language; + + return $this; + } + + /** + * Gets timezone + * + * @return string + */ + public function getTimezone() + { + return $this->container['timezone']; + } + + /** + * Sets timezone + * + * @param string $timezone Set the timezone of the sub-account + * + * @return $this + */ + public function setTimezone($timezone) + { + $this->container['timezone'] = $timezone; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateSubAccountResponse.php b/vendor/getbrevo/brevo-php/lib/Model/CreateSubAccountResponse.php new file mode 100644 index 0000000..f542695 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateSubAccountResponse.php @@ -0,0 +1,308 @@ + 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id ID of the sub-account created + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateUpdateBatchCategory.php b/vendor/getbrevo/brevo-php/lib/Model/CreateUpdateBatchCategory.php new file mode 100644 index 0000000..900b9aa --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateUpdateBatchCategory.php @@ -0,0 +1,338 @@ + '\Brevo\Client\Model\CreateUpdateCategories[]', + 'updateEnabled' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'categories' => null, + 'updateEnabled' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'categories' => 'categories', + 'updateEnabled' => 'updateEnabled' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'categories' => 'setCategories', + 'updateEnabled' => 'setUpdateEnabled' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'categories' => 'getCategories', + 'updateEnabled' => 'getUpdateEnabled' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['categories'] = isset($data['categories']) ? $data['categories'] : null; + $this->container['updateEnabled'] = isset($data['updateEnabled']) ? $data['updateEnabled'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['categories'] === null) { + $invalidProperties[] = "'categories' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets categories + * + * @return \Brevo\Client\Model\CreateUpdateCategories[] + */ + public function getCategories() + { + return $this->container['categories']; + } + + /** + * Sets categories + * + * @param \Brevo\Client\Model\CreateUpdateCategories[] $categories array of categories objects + * + * @return $this + */ + public function setCategories($categories) + { + $this->container['categories'] = $categories; + + return $this; + } + + /** + * Gets updateEnabled + * + * @return bool + */ + public function getUpdateEnabled() + { + return $this->container['updateEnabled']; + } + + /** + * Sets updateEnabled + * + * @param bool $updateEnabled Facilitate to update the existing categories in the same request (updateEnabled = true) + * + * @return $this + */ + public function setUpdateEnabled($updateEnabled) + { + $this->container['updateEnabled'] = $updateEnabled; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateUpdateBatchCategoryModel.php b/vendor/getbrevo/brevo-php/lib/Model/CreateUpdateBatchCategoryModel.php new file mode 100644 index 0000000..5777db1 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateUpdateBatchCategoryModel.php @@ -0,0 +1,335 @@ + 'int', + 'updatedCount' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'createdCount' => 'int64', + 'updatedCount' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'createdCount' => 'createdCount', + 'updatedCount' => 'updatedCount' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'createdCount' => 'setCreatedCount', + 'updatedCount' => 'setUpdatedCount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'createdCount' => 'getCreatedCount', + 'updatedCount' => 'getUpdatedCount' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['createdCount'] = isset($data['createdCount']) ? $data['createdCount'] : null; + $this->container['updatedCount'] = isset($data['updatedCount']) ? $data['updatedCount'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets createdCount + * + * @return int + */ + public function getCreatedCount() + { + return $this->container['createdCount']; + } + + /** + * Sets createdCount + * + * @param int $createdCount Number of the new created categories + * + * @return $this + */ + public function setCreatedCount($createdCount) + { + $this->container['createdCount'] = $createdCount; + + return $this; + } + + /** + * Gets updatedCount + * + * @return int + */ + public function getUpdatedCount() + { + return $this->container['updatedCount']; + } + + /** + * Sets updatedCount + * + * @param int $updatedCount Number of the existing categories updated + * + * @return $this + */ + public function setUpdatedCount($updatedCount) + { + $this->container['updatedCount'] = $updatedCount; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateUpdateBatchProducts.php b/vendor/getbrevo/brevo-php/lib/Model/CreateUpdateBatchProducts.php new file mode 100644 index 0000000..082c8d2 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateUpdateBatchProducts.php @@ -0,0 +1,338 @@ + '\Brevo\Client\Model\CreateUpdateProducts[]', + 'updateEnabled' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'products' => null, + 'updateEnabled' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'products' => 'products', + 'updateEnabled' => 'updateEnabled' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'products' => 'setProducts', + 'updateEnabled' => 'setUpdateEnabled' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'products' => 'getProducts', + 'updateEnabled' => 'getUpdateEnabled' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['products'] = isset($data['products']) ? $data['products'] : null; + $this->container['updateEnabled'] = isset($data['updateEnabled']) ? $data['updateEnabled'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['products'] === null) { + $invalidProperties[] = "'products' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets products + * + * @return \Brevo\Client\Model\CreateUpdateProducts[] + */ + public function getProducts() + { + return $this->container['products']; + } + + /** + * Sets products + * + * @param \Brevo\Client\Model\CreateUpdateProducts[] $products array of products objects + * + * @return $this + */ + public function setProducts($products) + { + $this->container['products'] = $products; + + return $this; + } + + /** + * Gets updateEnabled + * + * @return bool + */ + public function getUpdateEnabled() + { + return $this->container['updateEnabled']; + } + + /** + * Sets updateEnabled + * + * @param bool $updateEnabled Facilitate to update the existing categories in the same request (updateEnabled = true) + * + * @return $this + */ + public function setUpdateEnabled($updateEnabled) + { + $this->container['updateEnabled'] = $updateEnabled; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateUpdateBatchProductsModel.php b/vendor/getbrevo/brevo-php/lib/Model/CreateUpdateBatchProductsModel.php new file mode 100644 index 0000000..e11a883 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateUpdateBatchProductsModel.php @@ -0,0 +1,335 @@ + 'int', + 'updatedCount' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'createdCount' => 'int64', + 'updatedCount' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'createdCount' => 'createdCount', + 'updatedCount' => 'updatedCount' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'createdCount' => 'setCreatedCount', + 'updatedCount' => 'setUpdatedCount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'createdCount' => 'getCreatedCount', + 'updatedCount' => 'getUpdatedCount' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['createdCount'] = isset($data['createdCount']) ? $data['createdCount'] : null; + $this->container['updatedCount'] = isset($data['updatedCount']) ? $data['updatedCount'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets createdCount + * + * @return int + */ + public function getCreatedCount() + { + return $this->container['createdCount']; + } + + /** + * Sets createdCount + * + * @param int $createdCount Number of the new created products + * + * @return $this + */ + public function setCreatedCount($createdCount) + { + $this->container['createdCount'] = $createdCount; + + return $this; + } + + /** + * Gets updatedCount + * + * @return int + */ + public function getUpdatedCount() + { + return $this->container['updatedCount']; + } + + /** + * Sets updatedCount + * + * @param int $updatedCount Number of the existing products updated + * + * @return $this + */ + public function setUpdatedCount($updatedCount) + { + $this->container['updatedCount'] = $updatedCount; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateUpdateCategories.php b/vendor/getbrevo/brevo-php/lib/Model/CreateUpdateCategories.php new file mode 100644 index 0000000..7aa5c11 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateUpdateCategories.php @@ -0,0 +1,398 @@ + 'string', + 'name' => 'string', + 'url' => 'string', + 'deletedAt' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'email', + 'name' => null, + 'url' => null, + 'deletedAt' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'url' => 'url', + 'deletedAt' => 'deletedAt' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'url' => 'setUrl', + 'deletedAt' => 'setDeletedAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'url' => 'getUrl', + 'deletedAt' => 'getDeletedAt' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['url'] = isset($data['url']) ? $data['url'] : null; + $this->container['deletedAt'] = isset($data['deletedAt']) ? $data['deletedAt'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Unique Category ID as saved in the shop + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name **Mandatory in case of creation**. Name of the Category, as displayed in the shop + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets url + * + * @return string + */ + public function getUrl() + { + return $this->container['url']; + } + + /** + * Sets url + * + * @param string $url URL to the category + * + * @return $this + */ + public function setUrl($url) + { + $this->container['url'] = $url; + + return $this; + } + + /** + * Gets deletedAt + * + * @return string + */ + public function getDeletedAt() + { + return $this->container['deletedAt']; + } + + /** + * Sets deletedAt + * + * @param string $deletedAt UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the category deleted from the shop's database + * + * @return $this + */ + public function setDeletedAt($deletedAt) + { + $this->container['deletedAt'] = $deletedAt; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateUpdateCategory.php b/vendor/getbrevo/brevo-php/lib/Model/CreateUpdateCategory.php new file mode 100644 index 0000000..3bfdcf4 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateUpdateCategory.php @@ -0,0 +1,428 @@ + 'string', + 'name' => 'string', + 'url' => 'string', + 'updateEnabled' => 'bool', + 'deletedAt' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'email', + 'name' => null, + 'url' => null, + 'updateEnabled' => null, + 'deletedAt' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'url' => 'url', + 'updateEnabled' => 'updateEnabled', + 'deletedAt' => 'deletedAt' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'url' => 'setUrl', + 'updateEnabled' => 'setUpdateEnabled', + 'deletedAt' => 'setDeletedAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'url' => 'getUrl', + 'updateEnabled' => 'getUpdateEnabled', + 'deletedAt' => 'getDeletedAt' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['url'] = isset($data['url']) ? $data['url'] : null; + $this->container['updateEnabled'] = isset($data['updateEnabled']) ? $data['updateEnabled'] : false; + $this->container['deletedAt'] = isset($data['deletedAt']) ? $data['deletedAt'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Unique Category ID as saved in the shop + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name **Mandatory in case of creation**. Name of the Category, as displayed in the shop + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets url + * + * @return string + */ + public function getUrl() + { + return $this->container['url']; + } + + /** + * Sets url + * + * @param string $url URL to the category + * + * @return $this + */ + public function setUrl($url) + { + $this->container['url'] = $url; + + return $this; + } + + /** + * Gets updateEnabled + * + * @return bool + */ + public function getUpdateEnabled() + { + return $this->container['updateEnabled']; + } + + /** + * Sets updateEnabled + * + * @param bool $updateEnabled Facilitate to update the existing category in the same request (updateEnabled = true) + * + * @return $this + */ + public function setUpdateEnabled($updateEnabled) + { + $this->container['updateEnabled'] = $updateEnabled; + + return $this; + } + + /** + * Gets deletedAt + * + * @return string + */ + public function getDeletedAt() + { + return $this->container['deletedAt']; + } + + /** + * Sets deletedAt + * + * @param string $deletedAt UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the category deleted from the shop's database + * + * @return $this + */ + public function setDeletedAt($deletedAt) + { + $this->container['deletedAt'] = $deletedAt; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateUpdateContactModel.php b/vendor/getbrevo/brevo-php/lib/Model/CreateUpdateContactModel.php new file mode 100644 index 0000000..19a6284 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateUpdateContactModel.php @@ -0,0 +1,305 @@ + 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id ID of the contact when a new contact is created + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateUpdateFolder.php b/vendor/getbrevo/brevo-php/lib/Model/CreateUpdateFolder.php new file mode 100644 index 0000000..fbad1c3 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateUpdateFolder.php @@ -0,0 +1,305 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the folder + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateUpdateProduct.php b/vendor/getbrevo/brevo-php/lib/Model/CreateUpdateProduct.php new file mode 100644 index 0000000..8fd883d --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateUpdateProduct.php @@ -0,0 +1,611 @@ + 'string', + 'name' => 'string', + 'url' => 'string', + 'imageUrl' => 'string', + 'sku' => 'string', + 'price' => 'float', + 'categories' => 'string[]', + 'parentId' => 'string', + 'metaInfo' => 'map[string,string]', + 'updateEnabled' => 'bool', + 'deletedAt' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'string', + 'name' => 'string', + 'url' => 'string', + 'imageUrl' => 'string', + 'sku' => 'string', + 'price' => 'float', + 'categories' => null, + 'parentId' => 'string', + 'metaInfo' => null, + 'updateEnabled' => null, + 'deletedAt' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'url' => 'url', + 'imageUrl' => 'imageUrl', + 'sku' => 'sku', + 'price' => 'price', + 'categories' => 'categories', + 'parentId' => 'parentId', + 'metaInfo' => 'metaInfo', + 'updateEnabled' => 'updateEnabled', + 'deletedAt' => 'deletedAt' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'url' => 'setUrl', + 'imageUrl' => 'setImageUrl', + 'sku' => 'setSku', + 'price' => 'setPrice', + 'categories' => 'setCategories', + 'parentId' => 'setParentId', + 'metaInfo' => 'setMetaInfo', + 'updateEnabled' => 'setUpdateEnabled', + 'deletedAt' => 'setDeletedAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'url' => 'getUrl', + 'imageUrl' => 'getImageUrl', + 'sku' => 'getSku', + 'price' => 'getPrice', + 'categories' => 'getCategories', + 'parentId' => 'getParentId', + 'metaInfo' => 'getMetaInfo', + 'updateEnabled' => 'getUpdateEnabled', + 'deletedAt' => 'getDeletedAt' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['url'] = isset($data['url']) ? $data['url'] : null; + $this->container['imageUrl'] = isset($data['imageUrl']) ? $data['imageUrl'] : null; + $this->container['sku'] = isset($data['sku']) ? $data['sku'] : null; + $this->container['price'] = isset($data['price']) ? $data['price'] : null; + $this->container['categories'] = isset($data['categories']) ? $data['categories'] : null; + $this->container['parentId'] = isset($data['parentId']) ? $data['parentId'] : null; + $this->container['metaInfo'] = isset($data['metaInfo']) ? $data['metaInfo'] : null; + $this->container['updateEnabled'] = isset($data['updateEnabled']) ? $data['updateEnabled'] : false; + $this->container['deletedAt'] = isset($data['deletedAt']) ? $data['deletedAt'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Product ID for which you requested the details + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Mandatory in case of creation**. Name of the product for which you requested the details + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets url + * + * @return string + */ + public function getUrl() + { + return $this->container['url']; + } + + /** + * Sets url + * + * @param string $url URL to the product + * + * @return $this + */ + public function setUrl($url) + { + $this->container['url'] = $url; + + return $this; + } + + /** + * Gets imageUrl + * + * @return string + */ + public function getImageUrl() + { + return $this->container['imageUrl']; + } + + /** + * Sets imageUrl + * + * @param string $imageUrl Absolute URL to the cover image of the product + * + * @return $this + */ + public function setImageUrl($imageUrl) + { + $this->container['imageUrl'] = $imageUrl; + + return $this; + } + + /** + * Gets sku + * + * @return string + */ + public function getSku() + { + return $this->container['sku']; + } + + /** + * Sets sku + * + * @param string $sku Product identifier from the shop + * + * @return $this + */ + public function setSku($sku) + { + $this->container['sku'] = $sku; + + return $this; + } + + /** + * Gets price + * + * @return float + */ + public function getPrice() + { + return $this->container['price']; + } + + /** + * Sets price + * + * @param float $price Price of the product + * + * @return $this + */ + public function setPrice($price) + { + $this->container['price'] = $price; + + return $this; + } + + /** + * Gets categories + * + * @return string[] + */ + public function getCategories() + { + return $this->container['categories']; + } + + /** + * Sets categories + * + * @param string[] $categories Category ID-s of the product + * + * @return $this + */ + public function setCategories($categories) + { + $this->container['categories'] = $categories; + + return $this; + } + + /** + * Gets parentId + * + * @return string + */ + public function getParentId() + { + return $this->container['parentId']; + } + + /** + * Sets parentId + * + * @param string $parentId Parent product id of the product + * + * @return $this + */ + public function setParentId($parentId) + { + $this->container['parentId'] = $parentId; + + return $this; + } + + /** + * Gets metaInfo + * + * @return map[string,string] + */ + public function getMetaInfo() + { + return $this->container['metaInfo']; + } + + /** + * Sets metaInfo + * + * @param map[string,string] $metaInfo Meta data of product such as description, vendor, producer, stock level. The size of cumulative metaInfo shall not exceed **1000 KB**. Maximum length of metaInfo object can be 10. + * + * @return $this + */ + public function setMetaInfo($metaInfo) + { + $this->container['metaInfo'] = $metaInfo; + + return $this; + } + + /** + * Gets updateEnabled + * + * @return bool + */ + public function getUpdateEnabled() + { + return $this->container['updateEnabled']; + } + + /** + * Sets updateEnabled + * + * @param bool $updateEnabled Facilitate to update the existing category in the same request (updateEnabled = true) + * + * @return $this + */ + public function setUpdateEnabled($updateEnabled) + { + $this->container['updateEnabled'] = $updateEnabled; + + return $this; + } + + /** + * Gets deletedAt + * + * @return string + */ + public function getDeletedAt() + { + return $this->container['deletedAt']; + } + + /** + * Sets deletedAt + * + * @param string $deletedAt UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the product deleted from the shop's database + * + * @return $this + */ + public function setDeletedAt($deletedAt) + { + $this->container['deletedAt'] = $deletedAt; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateUpdateProducts.php b/vendor/getbrevo/brevo-php/lib/Model/CreateUpdateProducts.php new file mode 100644 index 0000000..d519d05 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateUpdateProducts.php @@ -0,0 +1,581 @@ + 'string', + 'name' => 'string', + 'url' => 'string', + 'imageUrl' => 'string', + 'sku' => 'string', + 'price' => 'float', + 'categories' => 'string[]', + 'parentId' => 'string', + 'metaInfo' => 'map[string,string]', + 'deletedAt' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'string', + 'name' => 'string', + 'url' => 'string', + 'imageUrl' => 'string', + 'sku' => 'string', + 'price' => 'float', + 'categories' => null, + 'parentId' => 'string', + 'metaInfo' => null, + 'deletedAt' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'url' => 'url', + 'imageUrl' => 'imageUrl', + 'sku' => 'sku', + 'price' => 'price', + 'categories' => 'categories', + 'parentId' => 'parentId', + 'metaInfo' => 'metaInfo', + 'deletedAt' => 'deletedAt' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'url' => 'setUrl', + 'imageUrl' => 'setImageUrl', + 'sku' => 'setSku', + 'price' => 'setPrice', + 'categories' => 'setCategories', + 'parentId' => 'setParentId', + 'metaInfo' => 'setMetaInfo', + 'deletedAt' => 'setDeletedAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'url' => 'getUrl', + 'imageUrl' => 'getImageUrl', + 'sku' => 'getSku', + 'price' => 'getPrice', + 'categories' => 'getCategories', + 'parentId' => 'getParentId', + 'metaInfo' => 'getMetaInfo', + 'deletedAt' => 'getDeletedAt' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['url'] = isset($data['url']) ? $data['url'] : null; + $this->container['imageUrl'] = isset($data['imageUrl']) ? $data['imageUrl'] : null; + $this->container['sku'] = isset($data['sku']) ? $data['sku'] : null; + $this->container['price'] = isset($data['price']) ? $data['price'] : null; + $this->container['categories'] = isset($data['categories']) ? $data['categories'] : null; + $this->container['parentId'] = isset($data['parentId']) ? $data['parentId'] : null; + $this->container['metaInfo'] = isset($data['metaInfo']) ? $data['metaInfo'] : null; + $this->container['deletedAt'] = isset($data['deletedAt']) ? $data['deletedAt'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Product ID for which you requested the details + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Mandatory in case of creation**. Name of the product for which you requested the details + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets url + * + * @return string + */ + public function getUrl() + { + return $this->container['url']; + } + + /** + * Sets url + * + * @param string $url URL to the product + * + * @return $this + */ + public function setUrl($url) + { + $this->container['url'] = $url; + + return $this; + } + + /** + * Gets imageUrl + * + * @return string + */ + public function getImageUrl() + { + return $this->container['imageUrl']; + } + + /** + * Sets imageUrl + * + * @param string $imageUrl Absolute URL to the cover image of the product + * + * @return $this + */ + public function setImageUrl($imageUrl) + { + $this->container['imageUrl'] = $imageUrl; + + return $this; + } + + /** + * Gets sku + * + * @return string + */ + public function getSku() + { + return $this->container['sku']; + } + + /** + * Sets sku + * + * @param string $sku Product identifier from the shop + * + * @return $this + */ + public function setSku($sku) + { + $this->container['sku'] = $sku; + + return $this; + } + + /** + * Gets price + * + * @return float + */ + public function getPrice() + { + return $this->container['price']; + } + + /** + * Sets price + * + * @param float $price Price of the product + * + * @return $this + */ + public function setPrice($price) + { + $this->container['price'] = $price; + + return $this; + } + + /** + * Gets categories + * + * @return string[] + */ + public function getCategories() + { + return $this->container['categories']; + } + + /** + * Sets categories + * + * @param string[] $categories Category ID-s of the product + * + * @return $this + */ + public function setCategories($categories) + { + $this->container['categories'] = $categories; + + return $this; + } + + /** + * Gets parentId + * + * @return string + */ + public function getParentId() + { + return $this->container['parentId']; + } + + /** + * Sets parentId + * + * @param string $parentId Parent product id of the product + * + * @return $this + */ + public function setParentId($parentId) + { + $this->container['parentId'] = $parentId; + + return $this; + } + + /** + * Gets metaInfo + * + * @return map[string,string] + */ + public function getMetaInfo() + { + return $this->container['metaInfo']; + } + + /** + * Sets metaInfo + * + * @param map[string,string] $metaInfo Meta data of product such as description, vendor, producer, stock level. The size of cumulative metaInfo shall not exceed **1000 KB**. Maximum length of metaInfo object can be 10. + * + * @return $this + */ + public function setMetaInfo($metaInfo) + { + $this->container['metaInfo'] = $metaInfo; + + return $this; + } + + /** + * Gets deletedAt + * + * @return string + */ + public function getDeletedAt() + { + return $this->container['deletedAt']; + } + + /** + * Sets deletedAt + * + * @param string $deletedAt UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the product deleted from the shop's database + * + * @return $this + */ + public function setDeletedAt($deletedAt) + { + $this->container['deletedAt'] = $deletedAt; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateWebhook.php b/vendor/getbrevo/brevo-php/lib/Model/CreateWebhook.php new file mode 100644 index 0000000..4f93c07 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateWebhook.php @@ -0,0 +1,609 @@ + 'string', + 'description' => 'string', + 'events' => 'string[]', + 'type' => 'string', + 'domain' => 'string', + 'batched' => 'bool', + 'auth' => '\Brevo\Client\Model\GetWebhookAuth', + 'headers' => '\Brevo\Client\Model\GetWebhookHeaders[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'url' => 'url', + 'description' => null, + 'events' => null, + 'type' => null, + 'domain' => null, + 'batched' => null, + 'auth' => null, + 'headers' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'url' => 'url', + 'description' => 'description', + 'events' => 'events', + 'type' => 'type', + 'domain' => 'domain', + 'batched' => 'batched', + 'auth' => 'auth', + 'headers' => 'headers' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'url' => 'setUrl', + 'description' => 'setDescription', + 'events' => 'setEvents', + 'type' => 'setType', + 'domain' => 'setDomain', + 'batched' => 'setBatched', + 'auth' => 'setAuth', + 'headers' => 'setHeaders' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'url' => 'getUrl', + 'description' => 'getDescription', + 'events' => 'getEvents', + 'type' => 'getType', + 'domain' => 'getDomain', + 'batched' => 'getBatched', + 'auth' => 'getAuth', + 'headers' => 'getHeaders' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const EVENTS_SENT = 'sent'; + const EVENTS_HARD_BOUNCE = 'hardBounce'; + const EVENTS_SOFT_BOUNCE = 'softBounce'; + const EVENTS_BLOCKED = 'blocked'; + const EVENTS_SPAM = 'spam'; + const EVENTS_DELIVERED = 'delivered'; + const EVENTS_REQUEST = 'request'; + const EVENTS_CLICK = 'click'; + const EVENTS_INVALID = 'invalid'; + const EVENTS_DEFERRED = 'deferred'; + const EVENTS_OPENED = 'opened'; + const EVENTS_UNIQUE_OPENED = 'uniqueOpened'; + const EVENTS_UNSUBSCRIBED = 'unsubscribed'; + const EVENTS_LIST_ADDITION = 'listAddition'; + const EVENTS_CONTACT_UPDATED = 'contactUpdated'; + const EVENTS_CONTACT_DELETED = 'contactDeleted'; + const EVENTS_INBOUND_EMAIL_PROCESSED = 'inboundEmailProcessed'; + const TYPE_TRANSACTIONAL = 'transactional'; + const TYPE_MARKETING = 'marketing'; + const TYPE_INBOUND = 'inbound'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getEventsAllowableValues() + { + return [ + self::EVENTS_SENT, + self::EVENTS_HARD_BOUNCE, + self::EVENTS_SOFT_BOUNCE, + self::EVENTS_BLOCKED, + self::EVENTS_SPAM, + self::EVENTS_DELIVERED, + self::EVENTS_REQUEST, + self::EVENTS_CLICK, + self::EVENTS_INVALID, + self::EVENTS_DEFERRED, + self::EVENTS_OPENED, + self::EVENTS_UNIQUE_OPENED, + self::EVENTS_UNSUBSCRIBED, + self::EVENTS_LIST_ADDITION, + self::EVENTS_CONTACT_UPDATED, + self::EVENTS_CONTACT_DELETED, + self::EVENTS_INBOUND_EMAIL_PROCESSED, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_TRANSACTIONAL, + self::TYPE_MARKETING, + self::TYPE_INBOUND, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['url'] = isset($data['url']) ? $data['url'] : null; + $this->container['description'] = isset($data['description']) ? $data['description'] : null; + $this->container['events'] = isset($data['events']) ? $data['events'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : 'transactional'; + $this->container['domain'] = isset($data['domain']) ? $data['domain'] : null; + $this->container['batched'] = isset($data['batched']) ? $data['batched'] : null; + $this->container['auth'] = isset($data['auth']) ? $data['auth'] : null; + $this->container['headers'] = isset($data['headers']) ? $data['headers'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['url'] === null) { + $invalidProperties[] = "'url' can't be null"; + } + if ($this->container['events'] === null) { + $invalidProperties[] = "'events' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets url + * + * @return string + */ + public function getUrl() + { + return $this->container['url']; + } + + /** + * Sets url + * + * @param string $url URL of the webhook + * + * @return $this + */ + public function setUrl($url) + { + $this->container['url'] = $url; + + return $this; + } + + /** + * Gets description + * + * @return string + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string $description Description of the webhook + * + * @return $this + */ + public function setDescription($description) + { + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets events + * + * @return string[] + */ + public function getEvents() + { + return $this->container['events']; + } + + /** + * Sets events + * + * @param string[] $events - Events triggering the webhook. Possible values for **Transactional** type webhook: #### `sent` OR `request`, `delivered`, `hardBounce`, `softBounce`, `blocked`, `spam`, `invalid`, `deferred`, `click`, `opened`, `uniqueOpened` and `unsubscribed` - Possible values for **Marketing** type webhook: #### `spam`, `opened`, `click`, `hardBounce`, `softBounce`, `unsubscribed`, `listAddition` & `delivered` - Possible values for **Inbound** type webhook: #### `inboundEmailProcessed` + * + * @return $this + */ + public function setEvents($events) + { + $allowedValues = $this->getEventsAllowableValues(); + if (array_diff($events, $allowedValues)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'events', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['events'] = $events; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Type of the webhook + * + * @return $this + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($type) && !in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets domain + * + * @return string + */ + public function getDomain() + { + return $this->container['domain']; + } + + /** + * Sets domain + * + * @param string $domain Inbound domain of webhook, required in case of event type `inbound` + * + * @return $this + */ + public function setDomain($domain) + { + $this->container['domain'] = $domain; + + return $this; + } + + /** + * Gets batched + * + * @return bool + */ + public function getBatched() + { + return $this->container['batched']; + } + + /** + * Sets batched + * + * @param bool $batched To send batched webhooks + * + * @return $this + */ + public function setBatched($batched) + { + $this->container['batched'] = $batched; + + return $this; + } + + /** + * Gets auth + * + * @return \Brevo\Client\Model\GetWebhookAuth + */ + public function getAuth() + { + return $this->container['auth']; + } + + /** + * Sets auth + * + * @param \Brevo\Client\Model\GetWebhookAuth $auth auth + * + * @return $this + */ + public function setAuth($auth) + { + $this->container['auth'] = $auth; + + return $this; + } + + /** + * Gets headers + * + * @return \Brevo\Client\Model\GetWebhookHeaders[] + */ + public function getHeaders() + { + return $this->container['headers']; + } + + /** + * Sets headers + * + * @param \Brevo\Client\Model\GetWebhookHeaders[] $headers Custom headers to be send with webhooks + * + * @return $this + */ + public function setHeaders($headers) + { + $this->container['headers'] = $headers; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateWhatsAppCampaign.php b/vendor/getbrevo/brevo-php/lib/Model/CreateWhatsAppCampaign.php new file mode 100644 index 0000000..d6faa21 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateWhatsAppCampaign.php @@ -0,0 +1,407 @@ + 'string', + 'templateId' => 'int', + 'scheduledAt' => 'string', + 'recipients' => '\Brevo\Client\Model\CreateWhatsAppCampaignRecipients' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null, + 'templateId' => null, + 'scheduledAt' => null, + 'recipients' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'templateId' => 'templateId', + 'scheduledAt' => 'scheduledAt', + 'recipients' => 'recipients' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'templateId' => 'setTemplateId', + 'scheduledAt' => 'setScheduledAt', + 'recipients' => 'setRecipients' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'templateId' => 'getTemplateId', + 'scheduledAt' => 'getScheduledAt', + 'recipients' => 'getRecipients' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['templateId'] = isset($data['templateId']) ? $data['templateId'] : null; + $this->container['scheduledAt'] = isset($data['scheduledAt']) ? $data['scheduledAt'] : null; + $this->container['recipients'] = isset($data['recipients']) ? $data['recipients'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['templateId'] === null) { + $invalidProperties[] = "'templateId' can't be null"; + } + if ($this->container['scheduledAt'] === null) { + $invalidProperties[] = "'scheduledAt' can't be null"; + } + if ($this->container['recipients'] === null) { + $invalidProperties[] = "'recipients' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the WhatsApp campaign creation + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets templateId + * + * @return int + */ + public function getTemplateId() + { + return $this->container['templateId']; + } + + /** + * Sets templateId + * + * @param int $templateId Id of the WhatsApp template in **approved** state + * + * @return $this + */ + public function setTemplateId($templateId) + { + $this->container['templateId'] = $templateId; + + return $this; + } + + /** + * Gets scheduledAt + * + * @return string + */ + public function getScheduledAt() + { + return $this->container['scheduledAt']; + } + + /** + * Sets scheduledAt + * + * @param string $scheduledAt Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.For example: **2017-06-01T12:30:00+02:00** + * + * @return $this + */ + public function setScheduledAt($scheduledAt) + { + $this->container['scheduledAt'] = $scheduledAt; + + return $this; + } + + /** + * Gets recipients + * + * @return \Brevo\Client\Model\CreateWhatsAppCampaignRecipients + */ + public function getRecipients() + { + return $this->container['recipients']; + } + + /** + * Sets recipients + * + * @param \Brevo\Client\Model\CreateWhatsAppCampaignRecipients $recipients recipients + * + * @return $this + */ + public function setRecipients($recipients) + { + $this->container['recipients'] = $recipients; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateWhatsAppCampaignRecipients.php b/vendor/getbrevo/brevo-php/lib/Model/CreateWhatsAppCampaignRecipients.php new file mode 100644 index 0000000..78311df --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateWhatsAppCampaignRecipients.php @@ -0,0 +1,366 @@ + 'int[]', + 'listIds' => 'int[]', + 'segments' => 'int[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'excludedListIds' => 'int64', + 'listIds' => 'int64', + 'segments' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'excludedListIds' => 'excludedListIds', + 'listIds' => 'listIds', + 'segments' => 'segments' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'excludedListIds' => 'setExcludedListIds', + 'listIds' => 'setListIds', + 'segments' => 'setSegments' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'excludedListIds' => 'getExcludedListIds', + 'listIds' => 'getListIds', + 'segments' => 'getSegments' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['excludedListIds'] = isset($data['excludedListIds']) ? $data['excludedListIds'] : null; + $this->container['listIds'] = isset($data['listIds']) ? $data['listIds'] : null; + $this->container['segments'] = isset($data['segments']) ? $data['segments'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets excludedListIds + * + * @return int[] + */ + public function getExcludedListIds() + { + return $this->container['excludedListIds']; + } + + /** + * Sets excludedListIds + * + * @param int[] $excludedListIds List ids to exclude from the campaign + * + * @return $this + */ + public function setExcludedListIds($excludedListIds) + { + $this->container['excludedListIds'] = $excludedListIds; + + return $this; + } + + /** + * Gets listIds + * + * @return int[] + */ + public function getListIds() + { + return $this->container['listIds']; + } + + /** + * Sets listIds + * + * @param int[] $listIds **Mandatory if scheduledAt is not empty**. List Ids to send the campaign to + * + * @return $this + */ + public function setListIds($listIds) + { + $this->container['listIds'] = $listIds; + + return $this; + } + + /** + * Gets segments + * + * @return int[] + */ + public function getSegments() + { + return $this->container['segments']; + } + + /** + * Sets segments + * + * @param int[] $segments **Mandatory if listIds are not used**. Segment ids to send the campaign to. + * + * @return $this + */ + public function setSegments($segments) + { + $this->container['segments'] = $segments; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreateWhatsAppTemplate.php b/vendor/getbrevo/brevo-php/lib/Model/CreateWhatsAppTemplate.php new file mode 100644 index 0000000..73d7f8a --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreateWhatsAppTemplate.php @@ -0,0 +1,561 @@ + 'string', + 'language' => 'string', + 'category' => 'string', + 'mediaUrl' => 'string', + 'bodyText' => 'string', + 'headerText' => 'string', + 'source' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null, + 'language' => null, + 'category' => null, + 'mediaUrl' => null, + 'bodyText' => null, + 'headerText' => null, + 'source' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'language' => 'language', + 'category' => 'category', + 'mediaUrl' => 'mediaUrl', + 'bodyText' => 'bodyText', + 'headerText' => 'headerText', + 'source' => 'source' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'language' => 'setLanguage', + 'category' => 'setCategory', + 'mediaUrl' => 'setMediaUrl', + 'bodyText' => 'setBodyText', + 'headerText' => 'setHeaderText', + 'source' => 'setSource' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'language' => 'getLanguage', + 'category' => 'getCategory', + 'mediaUrl' => 'getMediaUrl', + 'bodyText' => 'getBodyText', + 'headerText' => 'getHeaderText', + 'source' => 'getSource' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const CATEGORY_MARKETING = 'MARKETING'; + const CATEGORY_UTILITY = 'UTILITY'; + const SOURCE_AUTOMATION = 'Automation'; + const SOURCE_CONVERSATIONS = 'Conversations'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getCategoryAllowableValues() + { + return [ + self::CATEGORY_MARKETING, + self::CATEGORY_UTILITY, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSourceAllowableValues() + { + return [ + self::SOURCE_AUTOMATION, + self::SOURCE_CONVERSATIONS, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['language'] = isset($data['language']) ? $data['language'] : null; + $this->container['category'] = isset($data['category']) ? $data['category'] : null; + $this->container['mediaUrl'] = isset($data['mediaUrl']) ? $data['mediaUrl'] : null; + $this->container['bodyText'] = isset($data['bodyText']) ? $data['bodyText'] : null; + $this->container['headerText'] = isset($data['headerText']) ? $data['headerText'] : null; + $this->container['source'] = isset($data['source']) ? $data['source'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['language'] === null) { + $invalidProperties[] = "'language' can't be null"; + } + if ($this->container['category'] === null) { + $invalidProperties[] = "'category' can't be null"; + } + $allowedValues = $this->getCategoryAllowableValues(); + if (!is_null($this->container['category']) && !in_array($this->container['category'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'category', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['bodyText'] === null) { + $invalidProperties[] = "'bodyText' can't be null"; + } + $allowedValues = $this->getSourceAllowableValues(); + if (!is_null($this->container['source']) && !in_array($this->container['source'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'source', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the template + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets language + * + * @return string + */ + public function getLanguage() + { + return $this->container['language']; + } + + /** + * Sets language + * + * @param string $language Language of the template. For Example : **en** for English + * + * @return $this + */ + public function setLanguage($language) + { + $this->container['language'] = $language; + + return $this; + } + + /** + * Gets category + * + * @return string + */ + public function getCategory() + { + return $this->container['category']; + } + + /** + * Sets category + * + * @param string $category Category of the template + * + * @return $this + */ + public function setCategory($category) + { + $allowedValues = $this->getCategoryAllowableValues(); + if (!in_array($category, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'category', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['category'] = $category; + + return $this; + } + + /** + * Gets mediaUrl + * + * @return string + */ + public function getMediaUrl() + { + return $this->container['mediaUrl']; + } + + /** + * Sets mediaUrl + * + * @param string $mediaUrl Absolute url of the media file **(no local file)** for the header. **Use this field in you want to add media in Template header and headerText is empty.** Allowed extensions for media files are: #### jpeg | png | mp4 | pdf + * + * @return $this + */ + public function setMediaUrl($mediaUrl) + { + $this->container['mediaUrl'] = $mediaUrl; + + return $this; + } + + /** + * Gets bodyText + * + * @return string + */ + public function getBodyText() + { + return $this->container['bodyText']; + } + + /** + * Sets bodyText + * + * @param string $bodyText Body of the template. **Maximum allowed characters are 1024** + * + * @return $this + */ + public function setBodyText($bodyText) + { + $this->container['bodyText'] = $bodyText; + + return $this; + } + + /** + * Gets headerText + * + * @return string + */ + public function getHeaderText() + { + return $this->container['headerText']; + } + + /** + * Sets headerText + * + * @param string $headerText Text content of the header in the template. **Maximum allowed characters are 45** **Use this field to add text content in template header and if mediaUrl is empty** + * + * @return $this + */ + public function setHeaderText($headerText) + { + $this->container['headerText'] = $headerText; + + return $this; + } + + /** + * Gets source + * + * @return string + */ + public function getSource() + { + return $this->container['source']; + } + + /** + * Sets source + * + * @param string $source source of the template + * + * @return $this + */ + public function setSource($source) + { + $allowedValues = $this->getSourceAllowableValues(); + if (!is_null($source) && !in_array($source, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'source', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['source'] = $source; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreatedBatchId.php b/vendor/getbrevo/brevo-php/lib/Model/CreatedBatchId.php new file mode 100644 index 0000000..28812b8 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreatedBatchId.php @@ -0,0 +1,308 @@ + 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'batchId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'batchId' => 'batchId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'batchId' => 'setBatchId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'batchId' => 'getBatchId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['batchId'] = isset($data['batchId']) ? $data['batchId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['batchId'] === null) { + $invalidProperties[] = "'batchId' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets batchId + * + * @return float + */ + public function getBatchId() + { + return $this->container['batchId']; + } + + /** + * Sets batchId + * + * @param float $batchId Batch ID of the request + * + * @return $this + */ + public function setBatchId($batchId) + { + $this->container['batchId'] = $batchId; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/CreatedProcessId.php b/vendor/getbrevo/brevo-php/lib/Model/CreatedProcessId.php new file mode 100644 index 0000000..96341df --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/CreatedProcessId.php @@ -0,0 +1,308 @@ + 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'processId' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'processId' => 'processId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'processId' => 'setProcessId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'processId' => 'getProcessId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['processId'] = isset($data['processId']) ? $data['processId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['processId'] === null) { + $invalidProperties[] = "'processId' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets processId + * + * @return int + */ + public function getProcessId() + { + return $this->container['processId']; + } + + /** + * Sets processId + * + * @param int $processId Id of the process created + * + * @return $this + */ + public function setProcessId($processId) + { + $this->container['processId'] = $processId; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/Deal.php b/vendor/getbrevo/brevo-php/lib/Model/Deal.php new file mode 100644 index 0000000..a315359 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/Deal.php @@ -0,0 +1,396 @@ + 'string', + 'attributes' => 'object', + 'linkedContactsIds' => 'int[]', + 'linkedCompaniesIds' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => null, + 'attributes' => null, + 'linkedContactsIds' => null, + 'linkedCompaniesIds' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'attributes' => 'attributes', + 'linkedContactsIds' => 'linkedContactsIds', + 'linkedCompaniesIds' => 'linkedCompaniesIds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'attributes' => 'setAttributes', + 'linkedContactsIds' => 'setLinkedContactsIds', + 'linkedCompaniesIds' => 'setLinkedCompaniesIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'attributes' => 'getAttributes', + 'linkedContactsIds' => 'getLinkedContactsIds', + 'linkedCompaniesIds' => 'getLinkedCompaniesIds' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; + $this->container['linkedContactsIds'] = isset($data['linkedContactsIds']) ? $data['linkedContactsIds'] : null; + $this->container['linkedCompaniesIds'] = isset($data['linkedCompaniesIds']) ? $data['linkedCompaniesIds'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Unique deal id + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets attributes + * + * @return object + */ + public function getAttributes() + { + return $this->container['attributes']; + } + + /** + * Sets attributes + * + * @param object $attributes Deal attributes with values + * + * @return $this + */ + public function setAttributes($attributes) + { + $this->container['attributes'] = $attributes; + + return $this; + } + + /** + * Gets linkedContactsIds + * + * @return int[] + */ + public function getLinkedContactsIds() + { + return $this->container['linkedContactsIds']; + } + + /** + * Sets linkedContactsIds + * + * @param int[] $linkedContactsIds Contact ids for contacts linked to this deal + * + * @return $this + */ + public function setLinkedContactsIds($linkedContactsIds) + { + $this->container['linkedContactsIds'] = $linkedContactsIds; + + return $this; + } + + /** + * Gets linkedCompaniesIds + * + * @return string[] + */ + public function getLinkedCompaniesIds() + { + return $this->container['linkedCompaniesIds']; + } + + /** + * Sets linkedCompaniesIds + * + * @param string[] $linkedCompaniesIds Companies ids for companies linked to this deal + * + * @return $this + */ + public function setLinkedCompaniesIds($linkedCompaniesIds) + { + $this->container['linkedCompaniesIds'] = $linkedCompaniesIds; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/DealAttributes.php b/vendor/getbrevo/brevo-php/lib/Model/DealAttributes.php new file mode 100644 index 0000000..1ff6bf9 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/DealAttributes.php @@ -0,0 +1,281 @@ +listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/DealAttributesInner.php b/vendor/getbrevo/brevo-php/lib/Model/DealAttributesInner.php new file mode 100644 index 0000000..23144be --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/DealAttributesInner.php @@ -0,0 +1,426 @@ + 'string', + 'label' => 'string', + 'attributeTypeName' => 'string', + 'attributeOptions' => 'object[]', + 'isRequired' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'internalName' => null, + 'label' => null, + 'attributeTypeName' => null, + 'attributeOptions' => null, + 'isRequired' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'internalName' => 'internalName', + 'label' => 'label', + 'attributeTypeName' => 'attributeTypeName', + 'attributeOptions' => 'attributeOptions', + 'isRequired' => 'isRequired' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'internalName' => 'setInternalName', + 'label' => 'setLabel', + 'attributeTypeName' => 'setAttributeTypeName', + 'attributeOptions' => 'setAttributeOptions', + 'isRequired' => 'setIsRequired' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'internalName' => 'getInternalName', + 'label' => 'getLabel', + 'attributeTypeName' => 'getAttributeTypeName', + 'attributeOptions' => 'getAttributeOptions', + 'isRequired' => 'getIsRequired' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['internalName'] = isset($data['internalName']) ? $data['internalName'] : null; + $this->container['label'] = isset($data['label']) ? $data['label'] : null; + $this->container['attributeTypeName'] = isset($data['attributeTypeName']) ? $data['attributeTypeName'] : null; + $this->container['attributeOptions'] = isset($data['attributeOptions']) ? $data['attributeOptions'] : null; + $this->container['isRequired'] = isset($data['isRequired']) ? $data['isRequired'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets internalName + * + * @return string + */ + public function getInternalName() + { + return $this->container['internalName']; + } + + /** + * Sets internalName + * + * @param string $internalName internalName + * + * @return $this + */ + public function setInternalName($internalName) + { + $this->container['internalName'] = $internalName; + + return $this; + } + + /** + * Gets label + * + * @return string + */ + public function getLabel() + { + return $this->container['label']; + } + + /** + * Sets label + * + * @param string $label label + * + * @return $this + */ + public function setLabel($label) + { + $this->container['label'] = $label; + + return $this; + } + + /** + * Gets attributeTypeName + * + * @return string + */ + public function getAttributeTypeName() + { + return $this->container['attributeTypeName']; + } + + /** + * Sets attributeTypeName + * + * @param string $attributeTypeName attributeTypeName + * + * @return $this + */ + public function setAttributeTypeName($attributeTypeName) + { + $this->container['attributeTypeName'] = $attributeTypeName; + + return $this; + } + + /** + * Gets attributeOptions + * + * @return object[] + */ + public function getAttributeOptions() + { + return $this->container['attributeOptions']; + } + + /** + * Sets attributeOptions + * + * @param object[] $attributeOptions attributeOptions + * + * @return $this + */ + public function setAttributeOptions($attributeOptions) + { + $this->container['attributeOptions'] = $attributeOptions; + + return $this; + } + + /** + * Gets isRequired + * + * @return bool + */ + public function getIsRequired() + { + return $this->container['isRequired']; + } + + /** + * Sets isRequired + * + * @param bool $isRequired isRequired + * + * @return $this + */ + public function setIsRequired($isRequired) + { + $this->container['isRequired'] = $isRequired; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/DealsList.php b/vendor/getbrevo/brevo-php/lib/Model/DealsList.php new file mode 100644 index 0000000..f517903 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/DealsList.php @@ -0,0 +1,306 @@ + '\Brevo\Client\Model\Deal[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'items' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'items' => 'items' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'items' => 'setItems' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'items' => 'getItems' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['items'] = isset($data['items']) ? $data['items'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets items + * + * @return \Brevo\Client\Model\Deal[] + */ + public function getItems() + { + return $this->container['items']; + } + + /** + * Sets items + * + * @param \Brevo\Client\Model\Deal[] $items List of deals + * + * @return $this + */ + public function setItems($items) + { + $this->container['items'] = $items; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/DeleteHardbounces.php b/vendor/getbrevo/brevo-php/lib/Model/DeleteHardbounces.php new file mode 100644 index 0000000..fd256f5 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/DeleteHardbounces.php @@ -0,0 +1,365 @@ + 'string', + 'endDate' => 'string', + 'contactEmail' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'startDate' => null, + 'endDate' => null, + 'contactEmail' => 'email' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'startDate' => 'startDate', + 'endDate' => 'endDate', + 'contactEmail' => 'contactEmail' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'startDate' => 'setStartDate', + 'endDate' => 'setEndDate', + 'contactEmail' => 'setContactEmail' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'startDate' => 'getStartDate', + 'endDate' => 'getEndDate', + 'contactEmail' => 'getContactEmail' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['startDate'] = isset($data['startDate']) ? $data['startDate'] : null; + $this->container['endDate'] = isset($data['endDate']) ? $data['endDate'] : null; + $this->container['contactEmail'] = isset($data['contactEmail']) ? $data['contactEmail'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets startDate + * + * @return string + */ + public function getStartDate() + { + return $this->container['startDate']; + } + + /** + * Sets startDate + * + * @param string $startDate Starting date (YYYY-MM-DD) of the time period for deletion. The hardbounces occurred after this date will be deleted. Must be less than or equal to the endDate + * + * @return $this + */ + public function setStartDate($startDate) + { + $this->container['startDate'] = $startDate; + + return $this; + } + + /** + * Gets endDate + * + * @return string + */ + public function getEndDate() + { + return $this->container['endDate']; + } + + /** + * Sets endDate + * + * @param string $endDate Ending date (YYYY-MM-DD) of the time period for deletion. The hardbounces until this date will be deleted. Must be greater than or equal to the startDate + * + * @return $this + */ + public function setEndDate($endDate) + { + $this->container['endDate'] = $endDate; + + return $this; + } + + /** + * Gets contactEmail + * + * @return string + */ + public function getContactEmail() + { + return $this->container['contactEmail']; + } + + /** + * Sets contactEmail + * + * @param string $contactEmail Target a specific email address + * + * @return $this + */ + public function setContactEmail($contactEmail) + { + $this->container['contactEmail'] = $contactEmail; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/EmailExportRecipients.php b/vendor/getbrevo/brevo-php/lib/Model/EmailExportRecipients.php new file mode 100644 index 0000000..4489fd9 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/EmailExportRecipients.php @@ -0,0 +1,382 @@ + 'string', + 'recipientsType' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'notifyURL' => 'url', + 'recipientsType' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'notifyURL' => 'notifyURL', + 'recipientsType' => 'recipientsType' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'notifyURL' => 'setNotifyURL', + 'recipientsType' => 'setRecipientsType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'notifyURL' => 'getNotifyURL', + 'recipientsType' => 'getRecipientsType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const RECIPIENTS_TYPE_ALL = 'all'; + const RECIPIENTS_TYPE_NON_CLICKERS = 'nonClickers'; + const RECIPIENTS_TYPE_NON_OPENERS = 'nonOpeners'; + const RECIPIENTS_TYPE_CLICKERS = 'clickers'; + const RECIPIENTS_TYPE_OPENERS = 'openers'; + const RECIPIENTS_TYPE_SOFT_BOUNCES = 'softBounces'; + const RECIPIENTS_TYPE_HARD_BOUNCES = 'hardBounces'; + const RECIPIENTS_TYPE_UNSUBSCRIBED = 'unsubscribed'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getRecipientsTypeAllowableValues() + { + return [ + self::RECIPIENTS_TYPE_ALL, + self::RECIPIENTS_TYPE_NON_CLICKERS, + self::RECIPIENTS_TYPE_NON_OPENERS, + self::RECIPIENTS_TYPE_CLICKERS, + self::RECIPIENTS_TYPE_OPENERS, + self::RECIPIENTS_TYPE_SOFT_BOUNCES, + self::RECIPIENTS_TYPE_HARD_BOUNCES, + self::RECIPIENTS_TYPE_UNSUBSCRIBED, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['notifyURL'] = isset($data['notifyURL']) ? $data['notifyURL'] : null; + $this->container['recipientsType'] = isset($data['recipientsType']) ? $data['recipientsType'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['recipientsType'] === null) { + $invalidProperties[] = "'recipientsType' can't be null"; + } + $allowedValues = $this->getRecipientsTypeAllowableValues(); + if (!is_null($this->container['recipientsType']) && !in_array($this->container['recipientsType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'recipientsType', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets notifyURL + * + * @return string + */ + public function getNotifyURL() + { + return $this->container['notifyURL']; + } + + /** + * Sets notifyURL + * + * @param string $notifyURL Webhook called once the export process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479 + * + * @return $this + */ + public function setNotifyURL($notifyURL) + { + $this->container['notifyURL'] = $notifyURL; + + return $this; + } + + /** + * Gets recipientsType + * + * @return string + */ + public function getRecipientsType() + { + return $this->container['recipientsType']; + } + + /** + * Sets recipientsType + * + * @param string $recipientsType Type of recipients to export for a campaign + * + * @return $this + */ + public function setRecipientsType($recipientsType) + { + $allowedValues = $this->getRecipientsTypeAllowableValues(); + if (!in_array($recipientsType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'recipientsType', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['recipientsType'] = $recipientsType; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/ErrorModel.php b/vendor/getbrevo/brevo-php/lib/Model/ErrorModel.php new file mode 100644 index 0000000..7d4591b --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/ErrorModel.php @@ -0,0 +1,401 @@ + 'string', + 'message' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'code' => null, + 'message' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'code' => 'code', + 'message' => 'message' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'code' => 'setCode', + 'message' => 'setMessage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'code' => 'getCode', + 'message' => 'getMessage' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const CODE_INVALID_PARAMETER = 'invalid_parameter'; + const CODE_MISSING_PARAMETER = 'missing_parameter'; + const CODE_OUT_OF_RANGE = 'out_of_range'; + const CODE_CAMPAIGN_PROCESSING = 'campaign_processing'; + const CODE_CAMPAIGN_SENT = 'campaign_sent'; + const CODE_DOCUMENT_NOT_FOUND = 'document_not_found'; + const CODE_RESELLER_PERMISSION_DENIED = 'reseller_permission_denied'; + const CODE_NOT_ENOUGH_CREDITS = 'not_enough_credits'; + const CODE_PERMISSION_DENIED = 'permission_denied'; + const CODE_DUPLICATE_PARAMETER = 'duplicate_parameter'; + const CODE_DUPLICATE_REQUEST = 'duplicate_request'; + const CODE_METHOD_NOT_ALLOWED = 'method_not_allowed'; + const CODE_UNAUTHORIZED = 'unauthorized'; + const CODE_ACCOUNT_UNDER_VALIDATION = 'account_under_validation'; + const CODE_NOT_ACCEPTABLE = 'not_acceptable'; + const CODE_BAD_REQUEST = 'bad_request'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getCodeAllowableValues() + { + return [ + self::CODE_INVALID_PARAMETER, + self::CODE_MISSING_PARAMETER, + self::CODE_OUT_OF_RANGE, + self::CODE_CAMPAIGN_PROCESSING, + self::CODE_CAMPAIGN_SENT, + self::CODE_DOCUMENT_NOT_FOUND, + self::CODE_RESELLER_PERMISSION_DENIED, + self::CODE_NOT_ENOUGH_CREDITS, + self::CODE_PERMISSION_DENIED, + self::CODE_DUPLICATE_PARAMETER, + self::CODE_DUPLICATE_REQUEST, + self::CODE_METHOD_NOT_ALLOWED, + self::CODE_UNAUTHORIZED, + self::CODE_ACCOUNT_UNDER_VALIDATION, + self::CODE_NOT_ACCEPTABLE, + self::CODE_BAD_REQUEST, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['code'] === null) { + $invalidProperties[] = "'code' can't be null"; + } + $allowedValues = $this->getCodeAllowableValues(); + if (!is_null($this->container['code']) && !in_array($this->container['code'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'code', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['message'] === null) { + $invalidProperties[] = "'message' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets code + * + * @return string + */ + public function getCode() + { + return $this->container['code']; + } + + /** + * Sets code + * + * @param string $code Error code displayed in case of a failure + * + * @return $this + */ + public function setCode($code) + { + $allowedValues = $this->getCodeAllowableValues(); + if (!in_array($code, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'code', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['code'] = $code; + + return $this; + } + + /** + * Gets message + * + * @return string + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string $message Readable message associated to the failure + * + * @return $this + */ + public function setMessage($message) + { + $this->container['message'] = $message; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/Event.php b/vendor/getbrevo/brevo-php/lib/Model/Event.php new file mode 100644 index 0000000..8335cfe --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/Event.php @@ -0,0 +1,431 @@ + 'string', + 'eventDate' => 'string', + 'identifiers' => '\Brevo\Client\Model\EventIdentifiers', + 'contactProperties' => 'object', + 'eventProperties' => 'object' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'eventName' => null, + 'eventDate' => null, + 'identifiers' => null, + 'contactProperties' => null, + 'eventProperties' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'eventName' => 'event_name', + 'eventDate' => 'event_date', + 'identifiers' => 'identifiers', + 'contactProperties' => 'contact_properties', + 'eventProperties' => 'event_properties' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'eventName' => 'setEventName', + 'eventDate' => 'setEventDate', + 'identifiers' => 'setIdentifiers', + 'contactProperties' => 'setContactProperties', + 'eventProperties' => 'setEventProperties' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'eventName' => 'getEventName', + 'eventDate' => 'getEventDate', + 'identifiers' => 'getIdentifiers', + 'contactProperties' => 'getContactProperties', + 'eventProperties' => 'getEventProperties' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['eventName'] = isset($data['eventName']) ? $data['eventName'] : null; + $this->container['eventDate'] = isset($data['eventDate']) ? $data['eventDate'] : null; + $this->container['identifiers'] = isset($data['identifiers']) ? $data['identifiers'] : null; + $this->container['contactProperties'] = isset($data['contactProperties']) ? $data['contactProperties'] : null; + $this->container['eventProperties'] = isset($data['eventProperties']) ? $data['eventProperties'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['eventName'] === null) { + $invalidProperties[] = "'eventName' can't be null"; + } + if ($this->container['identifiers'] === null) { + $invalidProperties[] = "'identifiers' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets eventName + * + * @return string + */ + public function getEventName() + { + return $this->container['eventName']; + } + + /** + * Sets eventName + * + * @param string $eventName The name of the event that occurred. This is how you will find your event in Brevo. Limited to 255 characters, alphanumerical characters and - _ only. + * + * @return $this + */ + public function setEventName($eventName) + { + $this->container['eventName'] = $eventName; + + return $this; + } + + /** + * Gets eventDate + * + * @return string + */ + public function getEventDate() + { + return $this->container['eventDate']; + } + + /** + * Sets eventDate + * + * @param string $eventDate Timestamp of when the event occurred (e.g. \"2024-01-24T17:39:57+01:00\"). If no value is passed, the timestamp of the event creation is used. + * + * @return $this + */ + public function setEventDate($eventDate) + { + $this->container['eventDate'] = $eventDate; + + return $this; + } + + /** + * Gets identifiers + * + * @return \Brevo\Client\Model\EventIdentifiers + */ + public function getIdentifiers() + { + return $this->container['identifiers']; + } + + /** + * Sets identifiers + * + * @param \Brevo\Client\Model\EventIdentifiers $identifiers identifiers + * + * @return $this + */ + public function setIdentifiers($identifiers) + { + $this->container['identifiers'] = $identifiers; + + return $this; + } + + /** + * Gets contactProperties + * + * @return object + */ + public function getContactProperties() + { + return $this->container['contactProperties']; + } + + /** + * Sets contactProperties + * + * @param object $contactProperties Properties defining the state of the contact associated to this event. Useful to update contact attributes defined in your contacts database while passing the event. For example: **\"FIRSTNAME\": \"Jane\" , \"AGE\": 37** + * + * @return $this + */ + public function setContactProperties($contactProperties) + { + $this->container['contactProperties'] = $contactProperties; + + return $this; + } + + /** + * Gets eventProperties + * + * @return object + */ + public function getEventProperties() + { + return $this->container['eventProperties']; + } + + /** + * Sets eventProperties + * + * @param object $eventProperties Properties of the event. Top level properties and nested properties can be used to better segment contacts and personalise workflow conditions. The following field type are supported: string, number, boolean (true/false), date (Timestamp e.g. \"2024-01-24T17:39:57+01:00\"). Keys are limited to 255 characters, alphanumerical characters and - _ only. Size is limited to 50Kb. + * + * @return $this + */ + public function setEventProperties($eventProperties) + { + $this->container['eventProperties'] = $eventProperties; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/EventIdentifiers.php b/vendor/getbrevo/brevo-php/lib/Model/EventIdentifiers.php new file mode 100644 index 0000000..a71997e --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/EventIdentifiers.php @@ -0,0 +1,426 @@ + 'string', + 'phoneId' => 'string', + 'whatsappId' => 'string', + 'landlineNumberId' => 'string', + 'extId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'emailId' => null, + 'phoneId' => null, + 'whatsappId' => null, + 'landlineNumberId' => null, + 'extId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'emailId' => 'email_id', + 'phoneId' => 'phone_id', + 'whatsappId' => 'whatsapp_id', + 'landlineNumberId' => 'landline_number_id', + 'extId' => 'ext_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'emailId' => 'setEmailId', + 'phoneId' => 'setPhoneId', + 'whatsappId' => 'setWhatsappId', + 'landlineNumberId' => 'setLandlineNumberId', + 'extId' => 'setExtId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'emailId' => 'getEmailId', + 'phoneId' => 'getPhoneId', + 'whatsappId' => 'getWhatsappId', + 'landlineNumberId' => 'getLandlineNumberId', + 'extId' => 'getExtId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['emailId'] = isset($data['emailId']) ? $data['emailId'] : null; + $this->container['phoneId'] = isset($data['phoneId']) ? $data['phoneId'] : null; + $this->container['whatsappId'] = isset($data['whatsappId']) ? $data['whatsappId'] : null; + $this->container['landlineNumberId'] = isset($data['landlineNumberId']) ? $data['landlineNumberId'] : null; + $this->container['extId'] = isset($data['extId']) ? $data['extId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets emailId + * + * @return string + */ + public function getEmailId() + { + return $this->container['emailId']; + } + + /** + * Sets emailId + * + * @param string $emailId Email Id associated with the event + * + * @return $this + */ + public function setEmailId($emailId) + { + $this->container['emailId'] = $emailId; + + return $this; + } + + /** + * Gets phoneId + * + * @return string + */ + public function getPhoneId() + { + return $this->container['phoneId']; + } + + /** + * Sets phoneId + * + * @param string $phoneId SMS associated with the event + * + * @return $this + */ + public function setPhoneId($phoneId) + { + $this->container['phoneId'] = $phoneId; + + return $this; + } + + /** + * Gets whatsappId + * + * @return string + */ + public function getWhatsappId() + { + return $this->container['whatsappId']; + } + + /** + * Sets whatsappId + * + * @param string $whatsappId whatsapp associated with the event + * + * @return $this + */ + public function setWhatsappId($whatsappId) + { + $this->container['whatsappId'] = $whatsappId; + + return $this; + } + + /** + * Gets landlineNumberId + * + * @return string + */ + public function getLandlineNumberId() + { + return $this->container['landlineNumberId']; + } + + /** + * Sets landlineNumberId + * + * @param string $landlineNumberId landline_number associated with the event + * + * @return $this + */ + public function setLandlineNumberId($landlineNumberId) + { + $this->container['landlineNumberId'] = $landlineNumberId; + + return $this; + } + + /** + * Gets extId + * + * @return string + */ + public function getExtId() + { + return $this->container['extId']; + } + + /** + * Sets extId + * + * @param string $extId ext_id associated with the event + * + * @return $this + */ + public function setExtId($extId) + { + $this->container['extId'] = $extId; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/ExportWebhooksHistory.php b/vendor/getbrevo/brevo-php/lib/Model/ExportWebhooksHistory.php new file mode 100644 index 0000000..4d36844 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/ExportWebhooksHistory.php @@ -0,0 +1,678 @@ + 'int', + 'startDate' => 'string', + 'endDate' => 'string', + 'sort' => 'string', + 'type' => 'string', + 'event' => 'string', + 'notifyURL' => 'string', + 'webhookId' => 'int', + 'email' => 'string', + 'messageId' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'days' => null, + 'startDate' => null, + 'endDate' => null, + 'sort' => null, + 'type' => null, + 'event' => null, + 'notifyURL' => null, + 'webhookId' => null, + 'email' => null, + 'messageId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'days' => 'days', + 'startDate' => 'startDate', + 'endDate' => 'endDate', + 'sort' => 'sort', + 'type' => 'type', + 'event' => 'event', + 'notifyURL' => 'notifyURL', + 'webhookId' => 'webhookId', + 'email' => 'email', + 'messageId' => 'messageId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'days' => 'setDays', + 'startDate' => 'setStartDate', + 'endDate' => 'setEndDate', + 'sort' => 'setSort', + 'type' => 'setType', + 'event' => 'setEvent', + 'notifyURL' => 'setNotifyURL', + 'webhookId' => 'setWebhookId', + 'email' => 'setEmail', + 'messageId' => 'setMessageId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'days' => 'getDays', + 'startDate' => 'getStartDate', + 'endDate' => 'getEndDate', + 'sort' => 'getSort', + 'type' => 'getType', + 'event' => 'getEvent', + 'notifyURL' => 'getNotifyURL', + 'webhookId' => 'getWebhookId', + 'email' => 'getEmail', + 'messageId' => 'getMessageId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const TYPE_TRANSACTIONAL = 'transactional'; + const TYPE_MARKETING = 'marketing'; + const EVENT_INVALID_PARAMETER = 'invalid_parameter'; + const EVENT_MISSING_PARAMETER = 'missing_parameter'; + const EVENT_HARD_BOUNCE = 'hardBounce'; + const EVENT_SOFT_BOUNCE = 'softBounce'; + const EVENT_DELIVERED = 'delivered\"'; + const EVENT_SPAM = 'spam'; + const EVENT_REQUEST = 'request'; + const EVENT_OPENED = 'opened'; + const EVENT_CLICK = 'click'; + const EVENT_INVALID = 'invalid'; + const EVENT_DEFERRED = 'deferred'; + const EVENT_BLOCKED = 'blocked'; + const EVENT_UNSUBSCRIBED = 'unsubscribed'; + const EVENT_ERROR = 'error'; + const EVENT_UNIQUE_OPENED = 'uniqueOpened'; + const EVENT_LOADED_BY_PROXY = 'loadedByProxy'; + const EVENT_ALL_EVENTS = 'allEvents'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_TRANSACTIONAL, + self::TYPE_MARKETING, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getEventAllowableValues() + { + return [ + self::EVENT_INVALID_PARAMETER, + self::EVENT_MISSING_PARAMETER, + self::EVENT_HARD_BOUNCE, + self::EVENT_SOFT_BOUNCE, + self::EVENT_DELIVERED, + self::EVENT_SPAM, + self::EVENT_REQUEST, + self::EVENT_OPENED, + self::EVENT_CLICK, + self::EVENT_INVALID, + self::EVENT_DEFERRED, + self::EVENT_BLOCKED, + self::EVENT_UNSUBSCRIBED, + self::EVENT_ERROR, + self::EVENT_UNIQUE_OPENED, + self::EVENT_LOADED_BY_PROXY, + self::EVENT_ALL_EVENTS, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['days'] = isset($data['days']) ? $data['days'] : null; + $this->container['startDate'] = isset($data['startDate']) ? $data['startDate'] : null; + $this->container['endDate'] = isset($data['endDate']) ? $data['endDate'] : null; + $this->container['sort'] = isset($data['sort']) ? $data['sort'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : null; + $this->container['event'] = isset($data['event']) ? $data['event'] : null; + $this->container['notifyURL'] = isset($data['notifyURL']) ? $data['notifyURL'] : null; + $this->container['webhookId'] = isset($data['webhookId']) ? $data['webhookId'] : null; + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['messageId'] = isset($data['messageId']) ? $data['messageId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['event'] === null) { + $invalidProperties[] = "'event' can't be null"; + } + $allowedValues = $this->getEventAllowableValues(); + if (!is_null($this->container['event']) && !in_array($this->container['event'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'event', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['notifyURL'] === null) { + $invalidProperties[] = "'notifyURL' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets days + * + * @return int + */ + public function getDays() + { + return $this->container['days']; + } + + /** + * Sets days + * + * @param int $days Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ + * + * @return $this + */ + public function setDays($days) + { + $this->container['days'] = $days; + + return $this; + } + + /** + * Gets startDate + * + * @return string + */ + public function getStartDate() + { + return $this->container['startDate']; + } + + /** + * Sets startDate + * + * @param string $startDate Mandatory if endDate is used. Starting date of the history (YYYY-MM-DD). Must be lower than equal to endDate + * + * @return $this + */ + public function setStartDate($startDate) + { + $this->container['startDate'] = $startDate; + + return $this; + } + + /** + * Gets endDate + * + * @return string + */ + public function getEndDate() + { + return $this->container['endDate']; + } + + /** + * Sets endDate + * + * @param string $endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate + * + * @return $this + */ + public function setEndDate($endDate) + { + $this->container['endDate'] = $endDate; + + return $this; + } + + /** + * Gets sort + * + * @return string + */ + public function getSort() + { + return $this->container['sort']; + } + + /** + * Sets sort + * + * @param string $sort Sorting order of records (asc or desc) + * + * @return $this + */ + public function setSort($sort) + { + $this->container['sort'] = $sort; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Filter the history based on webhook type + * + * @return $this + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets event + * + * @return string + */ + public function getEvent() + { + return $this->container['event']; + } + + /** + * Sets event + * + * @param string $event Filter the history for a specific event type + * + * @return $this + */ + public function setEvent($event) + { + $allowedValues = $this->getEventAllowableValues(); + if (!in_array($event, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'event', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['event'] = $event; + + return $this; + } + + /** + * Gets notifyURL + * + * @return string + */ + public function getNotifyURL() + { + return $this->container['notifyURL']; + } + + /** + * Sets notifyURL + * + * @param string $notifyURL Webhook URL to receive CSV file link + * + * @return $this + */ + public function setNotifyURL($notifyURL) + { + $this->container['notifyURL'] = $notifyURL; + + return $this; + } + + /** + * Gets webhookId + * + * @return int + */ + public function getWebhookId() + { + return $this->container['webhookId']; + } + + /** + * Sets webhookId + * + * @param int $webhookId Filter the history for a specific webhook id + * + * @return $this + */ + public function setWebhookId($webhookId) + { + $this->container['webhookId'] = $webhookId; + + return $this; + } + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email Filter the history for a specific email + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets messageId + * + * @return int + */ + public function getMessageId() + { + return $this->container['messageId']; + } + + /** + * Sets messageId + * + * @param int $messageId Filter the history for a specific message id. Applicable only for transactional webhooks. + * + * @return $this + */ + public function setMessageId($messageId) + { + $this->container['messageId'] = $messageId; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/FileData.php b/vendor/getbrevo/brevo-php/lib/Model/FileData.php new file mode 100644 index 0000000..7b7ef4f --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/FileData.php @@ -0,0 +1,582 @@ + 'string', + 'id' => 'string', + 'name' => 'string', + 'authorId' => 'string', + 'author' => 'object', + 'contactId' => 'int', + 'dealId' => 'string', + 'companyId' => 'string', + 'size' => 'int', + 'createdAt' => '\DateTime', + 'updatedAt' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'url' => null, + 'id' => null, + 'name' => null, + 'authorId' => null, + 'author' => null, + 'contactId' => 'int64', + 'dealId' => null, + 'companyId' => null, + 'size' => 'int64', + 'createdAt' => 'date-time', + 'updatedAt' => 'date-time' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'url' => 'url', + 'id' => 'id', + 'name' => 'name', + 'authorId' => 'authorId', + 'author' => 'author', + 'contactId' => 'contactId', + 'dealId' => 'dealId', + 'companyId' => 'companyId', + 'size' => 'size', + 'createdAt' => 'createdAt', + 'updatedAt' => 'updatedAt' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'url' => 'setUrl', + 'id' => 'setId', + 'name' => 'setName', + 'authorId' => 'setAuthorId', + 'author' => 'setAuthor', + 'contactId' => 'setContactId', + 'dealId' => 'setDealId', + 'companyId' => 'setCompanyId', + 'size' => 'setSize', + 'createdAt' => 'setCreatedAt', + 'updatedAt' => 'setUpdatedAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'url' => 'getUrl', + 'id' => 'getId', + 'name' => 'getName', + 'authorId' => 'getAuthorId', + 'author' => 'getAuthor', + 'contactId' => 'getContactId', + 'dealId' => 'getDealId', + 'companyId' => 'getCompanyId', + 'size' => 'getSize', + 'createdAt' => 'getCreatedAt', + 'updatedAt' => 'getUpdatedAt' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['url'] = isset($data['url']) ? $data['url'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['authorId'] = isset($data['authorId']) ? $data['authorId'] : null; + $this->container['author'] = isset($data['author']) ? $data['author'] : null; + $this->container['contactId'] = isset($data['contactId']) ? $data['contactId'] : null; + $this->container['dealId'] = isset($data['dealId']) ? $data['dealId'] : null; + $this->container['companyId'] = isset($data['companyId']) ? $data['companyId'] : null; + $this->container['size'] = isset($data['size']) ? $data['size'] : null; + $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; + $this->container['updatedAt'] = isset($data['updatedAt']) ? $data['updatedAt'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets url + * + * @return string + */ + public function getUrl() + { + return $this->container['url']; + } + + /** + * Sets url + * + * @param string $url Url of uploaded file + * + * @return $this + */ + public function setUrl($url) + { + $this->container['url'] = $url; + + return $this; + } + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Id of uploaded file + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of uploaded file + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets authorId + * + * @return string + */ + public function getAuthorId() + { + return $this->container['authorId']; + } + + /** + * Sets authorId + * + * @param string $authorId Account id of user which created the file + * + * @return $this + */ + public function setAuthorId($authorId) + { + $this->container['authorId'] = $authorId; + + return $this; + } + + /** + * Gets contactId + * + * @return int + */ + public function getContactId() + { + return $this->container['contactId']; + } + + /** + * Sets contactId + * + * @param int $contactId Contact id of contact on which file is uploaded + * + * @return $this + */ + public function setContactId($contactId) + { + $this->container['contactId'] = $contactId; + + return $this; + } + + /** + * Gets dealId + * + * @return string + */ + public function getDealId() + { + return $this->container['dealId']; + } + + /** + * Sets dealId + * + * @param string $dealId Deal id linked to a file + * + * @return $this + */ + public function setDealId($dealId) + { + $this->container['dealId'] = $dealId; + + return $this; + } + + /** + * Gets companyId + * + * @return string + */ + public function getCompanyId() + { + return $this->container['companyId']; + } + + /** + * Sets companyId + * + * @param string $companyId Company id linked to a file + * + * @return $this + */ + public function setCompanyId($companyId) + { + $this->container['companyId'] = $companyId; + + return $this; + } + + /** + * Gets size + * + * @return int + */ + public function getSize() + { + return $this->container['size']; + } + + /** + * Sets size + * + * @param int $size Size of file in bytes + * + * @return $this + */ + public function setSize($size) + { + $this->container['size'] = $size; + + return $this; + } + + /** + * Gets createdAt + * + * @return \DateTime + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param \DateTime $createdAt File created date/time + * + * @return $this + */ + public function setCreatedAt($createdAt) + { + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets updatedAt + * + * @return \DateTime + */ + public function getUpdatedAt() + { + return $this->container['updatedAt']; + } + + /** + * Sets updatedAt + * + * @param \DateTime $updatedAt File updated date/time + * + * @return $this + */ + public function setUpdatedAt($updatedAt) + { + $this->container['updatedAt'] = $updatedAt; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/FileDownloadableLink.php b/vendor/getbrevo/brevo-php/lib/Model/FileDownloadableLink.php new file mode 100644 index 0000000..003c6c6 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/FileDownloadableLink.php @@ -0,0 +1,308 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'fileUrl' => 'url' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'fileUrl' => 'fileUrl' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'fileUrl' => 'setFileUrl' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'fileUrl' => 'getFileUrl' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['fileUrl'] = isset($data['fileUrl']) ? $data['fileUrl'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['fileUrl'] === null) { + $invalidProperties[] = "'fileUrl' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets fileUrl + * + * @return string + */ + public function getFileUrl() + { + return $this->container['fileUrl']; + } + + /** + * Sets fileUrl + * + * @param string $fileUrl A unique link to download the requested file. + * + * @return $this + */ + public function setFileUrl($fileUrl) + { + $this->container['fileUrl'] = $fileUrl; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/FileList.php b/vendor/getbrevo/brevo-php/lib/Model/FileList.php new file mode 100644 index 0000000..9fe810f --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/FileList.php @@ -0,0 +1,281 @@ +listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetAccount.php b/vendor/getbrevo/brevo-php/lib/Model/GetAccount.php new file mode 100644 index 0000000..fe969b4 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetAccount.php @@ -0,0 +1,365 @@ + '\Brevo\Client\Model\GetAccountPlan[]', + 'relay' => '\Brevo\Client\Model\GetAccountRelay', + 'marketingAutomation' => '\Brevo\Client\Model\GetAccountMarketingAutomation' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'plan' => null, + 'relay' => null, + 'marketingAutomation' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats + parent::swaggerFormats(); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'plan' => 'plan', + 'relay' => 'relay', + 'marketingAutomation' => 'marketingAutomation' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'plan' => 'setPlan', + 'relay' => 'setRelay', + 'marketingAutomation' => 'setMarketingAutomation' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'plan' => 'getPlan', + 'relay' => 'getRelay', + 'marketingAutomation' => 'getMarketingAutomation' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return parent::attributeMap() + self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return parent::setters() + self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return parent::getters() + self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + parent::__construct($data); + + $this->container['plan'] = isset($data['plan']) ? $data['plan'] : null; + $this->container['relay'] = isset($data['relay']) ? $data['relay'] : null; + $this->container['marketingAutomation'] = isset($data['marketingAutomation']) ? $data['marketingAutomation'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = parent::listInvalidProperties(); + + if ($this->container['plan'] === null) { + $invalidProperties[] = "'plan' can't be null"; + } + if ($this->container['relay'] === null) { + $invalidProperties[] = "'relay' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets plan + * + * @return \Brevo\Client\Model\GetAccountPlan[] + */ + public function getPlan() + { + return $this->container['plan']; + } + + /** + * Sets plan + * + * @param \Brevo\Client\Model\GetAccountPlan[] $plan Information about your plans and credits + * + * @return $this + */ + public function setPlan($plan) + { + $this->container['plan'] = $plan; + + return $this; + } + + /** + * Gets relay + * + * @return \Brevo\Client\Model\GetAccountRelay + */ + public function getRelay() + { + return $this->container['relay']; + } + + /** + * Sets relay + * + * @param \Brevo\Client\Model\GetAccountRelay $relay relay + * + * @return $this + */ + public function setRelay($relay) + { + $this->container['relay'] = $relay; + + return $this; + } + + /** + * Gets marketingAutomation + * + * @return \Brevo\Client\Model\GetAccountMarketingAutomation + */ + public function getMarketingAutomation() + { + return $this->container['marketingAutomation']; + } + + /** + * Sets marketingAutomation + * + * @param \Brevo\Client\Model\GetAccountMarketingAutomation $marketingAutomation marketingAutomation + * + * @return $this + */ + public function setMarketingAutomation($marketingAutomation) + { + $this->container['marketingAutomation'] = $marketingAutomation; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetAccountActivity.php b/vendor/getbrevo/brevo-php/lib/Model/GetAccountActivity.php new file mode 100644 index 0000000..6d48d87 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetAccountActivity.php @@ -0,0 +1,305 @@ + '\Brevo\Client\Model\GetAccountActivityLogs[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'logs' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'logs' => 'logs' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'logs' => 'setLogs' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'logs' => 'getLogs' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['logs'] = isset($data['logs']) ? $data['logs'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets logs + * + * @return \Brevo\Client\Model\GetAccountActivityLogs[] + */ + public function getLogs() + { + return $this->container['logs']; + } + + /** + * Sets logs + * + * @param \Brevo\Client\Model\GetAccountActivityLogs[] $logs Get user activity logs + * + * @return $this + */ + public function setLogs($logs) + { + $this->container['logs'] = $logs; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetAccountActivityLogs.php b/vendor/getbrevo/brevo-php/lib/Model/GetAccountActivityLogs.php new file mode 100644 index 0000000..4e4baa1 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetAccountActivityLogs.php @@ -0,0 +1,440 @@ + 'string', + 'date' => 'string', + 'userEmail' => 'string', + 'userIp' => 'string', + 'userAgent' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'action' => null, + 'date' => null, + 'userEmail' => null, + 'userIp' => null, + 'userAgent' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'action' => 'action', + 'date' => 'date', + 'userEmail' => 'user_email', + 'userIp' => 'user_ip', + 'userAgent' => 'user_agent' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'action' => 'setAction', + 'date' => 'setDate', + 'userEmail' => 'setUserEmail', + 'userIp' => 'setUserIp', + 'userAgent' => 'setUserAgent' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'action' => 'getAction', + 'date' => 'getDate', + 'userEmail' => 'getUserEmail', + 'userIp' => 'getUserIp', + 'userAgent' => 'getUserAgent' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['action'] = isset($data['action']) ? $data['action'] : null; + $this->container['date'] = isset($data['date']) ? $data['date'] : null; + $this->container['userEmail'] = isset($data['userEmail']) ? $data['userEmail'] : null; + $this->container['userIp'] = isset($data['userIp']) ? $data['userIp'] : null; + $this->container['userAgent'] = isset($data['userAgent']) ? $data['userAgent'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['action'] === null) { + $invalidProperties[] = "'action' can't be null"; + } + if ($this->container['date'] === null) { + $invalidProperties[] = "'date' can't be null"; + } + if ($this->container['userEmail'] === null) { + $invalidProperties[] = "'userEmail' can't be null"; + } + if ($this->container['userIp'] === null) { + $invalidProperties[] = "'userIp' can't be null"; + } + if ($this->container['userAgent'] === null) { + $invalidProperties[] = "'userAgent' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets action + * + * @return string + */ + public function getAction() + { + return $this->container['action']; + } + + /** + * Sets action + * + * @param string $action Type of activity in the account. + * + * @return $this + */ + public function setAction($action) + { + $this->container['action'] = $action; + + return $this; + } + + /** + * Gets date + * + * @return string + */ + public function getDate() + { + return $this->container['date']; + } + + /** + * Sets date + * + * @param string $date Time of the activity. + * + * @return $this + */ + public function setDate($date) + { + $this->container['date'] = $date; + + return $this; + } + + /** + * Gets userEmail + * + * @return string + */ + public function getUserEmail() + { + return $this->container['userEmail']; + } + + /** + * Sets userEmail + * + * @param string $userEmail Email address of the user who performed activity in the account. + * + * @return $this + */ + public function setUserEmail($userEmail) + { + $this->container['userEmail'] = $userEmail; + + return $this; + } + + /** + * Gets userIp + * + * @return string + */ + public function getUserIp() + { + return $this->container['userIp']; + } + + /** + * Sets userIp + * + * @param string $userIp IP address of the user who performed activity in the account. + * + * @return $this + */ + public function setUserIp($userIp) + { + $this->container['userIp'] = $userIp; + + return $this; + } + + /** + * Gets userAgent + * + * @return string + */ + public function getUserAgent() + { + return $this->container['userAgent']; + } + + /** + * Sets userAgent + * + * @param string $userAgent Browser details of the user who performed the activity. + * + * @return $this + */ + public function setUserAgent($userAgent) + { + $this->container['userAgent'] = $userAgent; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetAccountMarketingAutomation.php b/vendor/getbrevo/brevo-php/lib/Model/GetAccountMarketingAutomation.php new file mode 100644 index 0000000..fa2ee05 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetAccountMarketingAutomation.php @@ -0,0 +1,338 @@ + 'string', + 'enabled' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'key' => null, + 'enabled' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'key' => 'key', + 'enabled' => 'enabled' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'key' => 'setKey', + 'enabled' => 'setEnabled' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'key' => 'getKey', + 'enabled' => 'getEnabled' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['key'] = isset($data['key']) ? $data['key'] : null; + $this->container['enabled'] = isset($data['enabled']) ? $data['enabled'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['enabled'] === null) { + $invalidProperties[] = "'enabled' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets key + * + * @return string + */ + public function getKey() + { + return $this->container['key']; + } + + /** + * Sets key + * + * @param string $key Marketing Automation Tracker ID + * + * @return $this + */ + public function setKey($key) + { + $this->container['key'] = $key; + + return $this; + } + + /** + * Gets enabled + * + * @return bool + */ + public function getEnabled() + { + return $this->container['enabled']; + } + + /** + * Sets enabled + * + * @param bool $enabled Status of Marketing Automation Plateform activation for your account (true=enabled, false=disabled) + * + * @return $this + */ + public function setEnabled($enabled) + { + $this->container['enabled'] = $enabled; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetAccountPlan.php b/vendor/getbrevo/brevo-php/lib/Model/GetAccountPlan.php new file mode 100644 index 0000000..caadcb8 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetAccountPlan.php @@ -0,0 +1,532 @@ + 'string', + 'creditsType' => 'string', + 'credits' => 'float', + 'startDate' => '\DateTime', + 'endDate' => '\DateTime', + 'userLimit' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'type' => null, + 'creditsType' => null, + 'credits' => 'float', + 'startDate' => 'date', + 'endDate' => 'date', + 'userLimit' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'type' => 'type', + 'creditsType' => 'creditsType', + 'credits' => 'credits', + 'startDate' => 'startDate', + 'endDate' => 'endDate', + 'userLimit' => 'userLimit' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'type' => 'setType', + 'creditsType' => 'setCreditsType', + 'credits' => 'setCredits', + 'startDate' => 'setStartDate', + 'endDate' => 'setEndDate', + 'userLimit' => 'setUserLimit' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'type' => 'getType', + 'creditsType' => 'getCreditsType', + 'credits' => 'getCredits', + 'startDate' => 'getStartDate', + 'endDate' => 'getEndDate', + 'userLimit' => 'getUserLimit' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const TYPE_PAY_AS_YOU_GO = 'payAsYouGo'; + const TYPE_FREE = 'free'; + const TYPE_SUBSCRIPTION = 'subscription'; + const TYPE_SMS = 'sms'; + const TYPE_RESELLER = 'reseller'; + const CREDITS_TYPE_SEND_LIMIT = 'sendLimit'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_PAY_AS_YOU_GO, + self::TYPE_FREE, + self::TYPE_SUBSCRIPTION, + self::TYPE_SMS, + self::TYPE_RESELLER, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getCreditsTypeAllowableValues() + { + return [ + self::CREDITS_TYPE_SEND_LIMIT, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['type'] = isset($data['type']) ? $data['type'] : null; + $this->container['creditsType'] = isset($data['creditsType']) ? $data['creditsType'] : null; + $this->container['credits'] = isset($data['credits']) ? $data['credits'] : null; + $this->container['startDate'] = isset($data['startDate']) ? $data['startDate'] : null; + $this->container['endDate'] = isset($data['endDate']) ? $data['endDate'] : null; + $this->container['userLimit'] = isset($data['userLimit']) ? $data['userLimit'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['creditsType'] === null) { + $invalidProperties[] = "'creditsType' can't be null"; + } + $allowedValues = $this->getCreditsTypeAllowableValues(); + if (!is_null($this->container['creditsType']) && !in_array($this->container['creditsType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'creditsType', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['credits'] === null) { + $invalidProperties[] = "'credits' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Displays the plan type of the user + * + * @return $this + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets creditsType + * + * @return string + */ + public function getCreditsType() + { + return $this->container['creditsType']; + } + + /** + * Sets creditsType + * + * @param string $creditsType This is the type of the credit, \"Send Limit\" is one of the possible types of credit of a user. \"Send Limit\" implies the total number of emails you can send to the subscribers in your account. + * + * @return $this + */ + public function setCreditsType($creditsType) + { + $allowedValues = $this->getCreditsTypeAllowableValues(); + if (!in_array($creditsType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'creditsType', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['creditsType'] = $creditsType; + + return $this; + } + + /** + * Gets credits + * + * @return float + */ + public function getCredits() + { + return $this->container['credits']; + } + + /** + * Sets credits + * + * @param float $credits Remaining credits of the user + * + * @return $this + */ + public function setCredits($credits) + { + $this->container['credits'] = $credits; + + return $this; + } + + /** + * Gets startDate + * + * @return \DateTime + */ + public function getStartDate() + { + return $this->container['startDate']; + } + + /** + * Sets startDate + * + * @param \DateTime $startDate Date of the period from which the plan will start (only available for \"subscription\" and \"reseller\" plan type) + * + * @return $this + */ + public function setStartDate($startDate) + { + $this->container['startDate'] = $startDate; + + return $this; + } + + /** + * Gets endDate + * + * @return \DateTime + */ + public function getEndDate() + { + return $this->container['endDate']; + } + + /** + * Sets endDate + * + * @param \DateTime $endDate Date of the period from which the plan will end (only available for \"subscription\" and \"reseller\" plan type) + * + * @return $this + */ + public function setEndDate($endDate) + { + $this->container['endDate'] = $endDate; + + return $this; + } + + /** + * Gets userLimit + * + * @return int + */ + public function getUserLimit() + { + return $this->container['userLimit']; + } + + /** + * Sets userLimit + * + * @param int $userLimit Only in case of reseller account. It implies the total number of child accounts you can add to your account. + * + * @return $this + */ + public function setUserLimit($userLimit) + { + $this->container['userLimit'] = $userLimit; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetAccountRelay.php b/vendor/getbrevo/brevo-php/lib/Model/GetAccountRelay.php new file mode 100644 index 0000000..7af1aa4 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetAccountRelay.php @@ -0,0 +1,342 @@ + 'bool', + 'data' => '\Brevo\Client\Model\GetAccountRelayData' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'enabled' => null, + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'enabled' => 'enabled', + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'enabled' => 'setEnabled', + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'enabled' => 'getEnabled', + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['enabled'] = isset($data['enabled']) ? $data['enabled'] : null; + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['enabled'] === null) { + $invalidProperties[] = "'enabled' can't be null"; + } + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets enabled + * + * @return bool + */ + public function getEnabled() + { + return $this->container['enabled']; + } + + /** + * Sets enabled + * + * @param bool $enabled Status of your transactional email Account (true=Enabled, false=Disabled) + * + * @return $this + */ + public function setEnabled($enabled) + { + $this->container['enabled'] = $enabled; + + return $this; + } + + /** + * Gets data + * + * @return \Brevo\Client\Model\GetAccountRelayData + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \Brevo\Client\Model\GetAccountRelayData $data data + * + * @return $this + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetAccountRelayData.php b/vendor/getbrevo/brevo-php/lib/Model/GetAccountRelayData.php new file mode 100644 index 0000000..c9ef3b9 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetAccountRelayData.php @@ -0,0 +1,375 @@ + 'string', + 'relay' => 'string', + 'port' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'userName' => 'email', + 'relay' => null, + 'port' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'userName' => 'userName', + 'relay' => 'relay', + 'port' => 'port' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'userName' => 'setUserName', + 'relay' => 'setRelay', + 'port' => 'setPort' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'userName' => 'getUserName', + 'relay' => 'getRelay', + 'port' => 'getPort' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['userName'] = isset($data['userName']) ? $data['userName'] : null; + $this->container['relay'] = isset($data['relay']) ? $data['relay'] : null; + $this->container['port'] = isset($data['port']) ? $data['port'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['userName'] === null) { + $invalidProperties[] = "'userName' can't be null"; + } + if ($this->container['relay'] === null) { + $invalidProperties[] = "'relay' can't be null"; + } + if ($this->container['port'] === null) { + $invalidProperties[] = "'port' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets userName + * + * @return string + */ + public function getUserName() + { + return $this->container['userName']; + } + + /** + * Sets userName + * + * @param string $userName Email to use as login on transactional platform + * + * @return $this + */ + public function setUserName($userName) + { + $this->container['userName'] = $userName; + + return $this; + } + + /** + * Gets relay + * + * @return string + */ + public function getRelay() + { + return $this->container['relay']; + } + + /** + * Sets relay + * + * @param string $relay URL of the SMTP Relay + * + * @return $this + */ + public function setRelay($relay) + { + $this->container['relay'] = $relay; + + return $this; + } + + /** + * Gets port + * + * @return int + */ + public function getPort() + { + return $this->container['port']; + } + + /** + * Sets port + * + * @param int $port Port used for SMTP Relay + * + * @return $this + */ + public function setPort($port) + { + $this->container['port'] = $port; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetAggregatedReport.php b/vendor/getbrevo/brevo-php/lib/Model/GetAggregatedReport.php new file mode 100644 index 0000000..3ab89d2 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetAggregatedReport.php @@ -0,0 +1,665 @@ + 'string', + 'requests' => 'int', + 'delivered' => 'int', + 'hardBounces' => 'int', + 'softBounces' => 'int', + 'clicks' => 'int', + 'uniqueClicks' => 'int', + 'opens' => 'int', + 'uniqueOpens' => 'int', + 'spamReports' => 'int', + 'blocked' => 'int', + 'invalid' => 'int', + 'unsubscribed' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'range' => null, + 'requests' => 'int64', + 'delivered' => 'int64', + 'hardBounces' => 'int64', + 'softBounces' => 'int64', + 'clicks' => 'int64', + 'uniqueClicks' => 'int64', + 'opens' => 'int64', + 'uniqueOpens' => 'int64', + 'spamReports' => 'int64', + 'blocked' => 'int64', + 'invalid' => 'int64', + 'unsubscribed' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'range' => 'range', + 'requests' => 'requests', + 'delivered' => 'delivered', + 'hardBounces' => 'hardBounces', + 'softBounces' => 'softBounces', + 'clicks' => 'clicks', + 'uniqueClicks' => 'uniqueClicks', + 'opens' => 'opens', + 'uniqueOpens' => 'uniqueOpens', + 'spamReports' => 'spamReports', + 'blocked' => 'blocked', + 'invalid' => 'invalid', + 'unsubscribed' => 'unsubscribed' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'range' => 'setRange', + 'requests' => 'setRequests', + 'delivered' => 'setDelivered', + 'hardBounces' => 'setHardBounces', + 'softBounces' => 'setSoftBounces', + 'clicks' => 'setClicks', + 'uniqueClicks' => 'setUniqueClicks', + 'opens' => 'setOpens', + 'uniqueOpens' => 'setUniqueOpens', + 'spamReports' => 'setSpamReports', + 'blocked' => 'setBlocked', + 'invalid' => 'setInvalid', + 'unsubscribed' => 'setUnsubscribed' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'range' => 'getRange', + 'requests' => 'getRequests', + 'delivered' => 'getDelivered', + 'hardBounces' => 'getHardBounces', + 'softBounces' => 'getSoftBounces', + 'clicks' => 'getClicks', + 'uniqueClicks' => 'getUniqueClicks', + 'opens' => 'getOpens', + 'uniqueOpens' => 'getUniqueOpens', + 'spamReports' => 'getSpamReports', + 'blocked' => 'getBlocked', + 'invalid' => 'getInvalid', + 'unsubscribed' => 'getUnsubscribed' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['range'] = isset($data['range']) ? $data['range'] : null; + $this->container['requests'] = isset($data['requests']) ? $data['requests'] : null; + $this->container['delivered'] = isset($data['delivered']) ? $data['delivered'] : null; + $this->container['hardBounces'] = isset($data['hardBounces']) ? $data['hardBounces'] : null; + $this->container['softBounces'] = isset($data['softBounces']) ? $data['softBounces'] : null; + $this->container['clicks'] = isset($data['clicks']) ? $data['clicks'] : null; + $this->container['uniqueClicks'] = isset($data['uniqueClicks']) ? $data['uniqueClicks'] : null; + $this->container['opens'] = isset($data['opens']) ? $data['opens'] : null; + $this->container['uniqueOpens'] = isset($data['uniqueOpens']) ? $data['uniqueOpens'] : null; + $this->container['spamReports'] = isset($data['spamReports']) ? $data['spamReports'] : null; + $this->container['blocked'] = isset($data['blocked']) ? $data['blocked'] : null; + $this->container['invalid'] = isset($data['invalid']) ? $data['invalid'] : null; + $this->container['unsubscribed'] = isset($data['unsubscribed']) ? $data['unsubscribed'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets range + * + * @return string + */ + public function getRange() + { + return $this->container['range']; + } + + /** + * Sets range + * + * @param string $range Time frame of the report + * + * @return $this + */ + public function setRange($range) + { + $this->container['range'] = $range; + + return $this; + } + + /** + * Gets requests + * + * @return int + */ + public function getRequests() + { + return $this->container['requests']; + } + + /** + * Sets requests + * + * @param int $requests Number of requests for the timeframe + * + * @return $this + */ + public function setRequests($requests) + { + $this->container['requests'] = $requests; + + return $this; + } + + /** + * Gets delivered + * + * @return int + */ + public function getDelivered() + { + return $this->container['delivered']; + } + + /** + * Sets delivered + * + * @param int $delivered Number of delivered emails for the timeframe + * + * @return $this + */ + public function setDelivered($delivered) + { + $this->container['delivered'] = $delivered; + + return $this; + } + + /** + * Gets hardBounces + * + * @return int + */ + public function getHardBounces() + { + return $this->container['hardBounces']; + } + + /** + * Sets hardBounces + * + * @param int $hardBounces Number of hardbounces for the timeframe + * + * @return $this + */ + public function setHardBounces($hardBounces) + { + $this->container['hardBounces'] = $hardBounces; + + return $this; + } + + /** + * Gets softBounces + * + * @return int + */ + public function getSoftBounces() + { + return $this->container['softBounces']; + } + + /** + * Sets softBounces + * + * @param int $softBounces Number of softbounces for the timeframe + * + * @return $this + */ + public function setSoftBounces($softBounces) + { + $this->container['softBounces'] = $softBounces; + + return $this; + } + + /** + * Gets clicks + * + * @return int + */ + public function getClicks() + { + return $this->container['clicks']; + } + + /** + * Sets clicks + * + * @param int $clicks Number of clicks for the timeframe + * + * @return $this + */ + public function setClicks($clicks) + { + $this->container['clicks'] = $clicks; + + return $this; + } + + /** + * Gets uniqueClicks + * + * @return int + */ + public function getUniqueClicks() + { + return $this->container['uniqueClicks']; + } + + /** + * Sets uniqueClicks + * + * @param int $uniqueClicks Number of unique clicks for the timeframe + * + * @return $this + */ + public function setUniqueClicks($uniqueClicks) + { + $this->container['uniqueClicks'] = $uniqueClicks; + + return $this; + } + + /** + * Gets opens + * + * @return int + */ + public function getOpens() + { + return $this->container['opens']; + } + + /** + * Sets opens + * + * @param int $opens Number of openings for the timeframe + * + * @return $this + */ + public function setOpens($opens) + { + $this->container['opens'] = $opens; + + return $this; + } + + /** + * Gets uniqueOpens + * + * @return int + */ + public function getUniqueOpens() + { + return $this->container['uniqueOpens']; + } + + /** + * Sets uniqueOpens + * + * @param int $uniqueOpens Number of unique openings for the timeframe + * + * @return $this + */ + public function setUniqueOpens($uniqueOpens) + { + $this->container['uniqueOpens'] = $uniqueOpens; + + return $this; + } + + /** + * Gets spamReports + * + * @return int + */ + public function getSpamReports() + { + return $this->container['spamReports']; + } + + /** + * Sets spamReports + * + * @param int $spamReports Number of complaint (spam report) for the timeframe + * + * @return $this + */ + public function setSpamReports($spamReports) + { + $this->container['spamReports'] = $spamReports; + + return $this; + } + + /** + * Gets blocked + * + * @return int + */ + public function getBlocked() + { + return $this->container['blocked']; + } + + /** + * Sets blocked + * + * @param int $blocked Number of blocked contact emails for the timeframe + * + * @return $this + */ + public function setBlocked($blocked) + { + $this->container['blocked'] = $blocked; + + return $this; + } + + /** + * Gets invalid + * + * @return int + */ + public function getInvalid() + { + return $this->container['invalid']; + } + + /** + * Sets invalid + * + * @param int $invalid Number of invalid emails for the timeframe + * + * @return $this + */ + public function setInvalid($invalid) + { + $this->container['invalid'] = $invalid; + + return $this; + } + + /** + * Gets unsubscribed + * + * @return int + */ + public function getUnsubscribed() + { + return $this->container['unsubscribed']; + } + + /** + * Sets unsubscribed + * + * @param int $unsubscribed Number of unsubscribed emails for the timeframe + * + * @return $this + */ + public function setUnsubscribed($unsubscribed) + { + $this->container['unsubscribed'] = $unsubscribed; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetAllExternalFeeds.php b/vendor/getbrevo/brevo-php/lib/Model/GetAllExternalFeeds.php new file mode 100644 index 0000000..5d2a4d9 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetAllExternalFeeds.php @@ -0,0 +1,335 @@ + 'int', + 'feeds' => '\Brevo\Client\Model\GetAllExternalFeedsFeeds[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'count' => null, + 'feeds' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'count' => 'count', + 'feeds' => 'feeds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'count' => 'setCount', + 'feeds' => 'setFeeds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'count' => 'getCount', + 'feeds' => 'getFeeds' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['count'] = isset($data['count']) ? $data['count'] : null; + $this->container['feeds'] = isset($data['feeds']) ? $data['feeds'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets count + * + * @return int + */ + public function getCount() + { + return $this->container['count']; + } + + /** + * Sets count + * + * @param int $count Total number of batches + * + * @return $this + */ + public function setCount($count) + { + $this->container['count'] = $count; + + return $this; + } + + /** + * Gets feeds + * + * @return \Brevo\Client\Model\GetAllExternalFeedsFeeds[] + */ + public function getFeeds() + { + return $this->container['feeds']; + } + + /** + * Sets feeds + * + * @param \Brevo\Client\Model\GetAllExternalFeedsFeeds[] $feeds feeds + * + * @return $this + */ + public function setFeeds($feeds) + { + $this->container['feeds'] = $feeds; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetAllExternalFeedsFeeds.php b/vendor/getbrevo/brevo-php/lib/Model/GetAllExternalFeedsFeeds.php new file mode 100644 index 0000000..fa998bd --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetAllExternalFeedsFeeds.php @@ -0,0 +1,712 @@ + 'string', + 'name' => 'string', + 'url' => 'string', + 'authType' => 'string', + 'username' => 'string', + 'password' => 'string', + 'token' => 'string', + 'headers' => '\Brevo\Client\Model\GetExternalFeedByUUIDHeaders[]', + 'maxRetries' => 'int', + 'cache' => 'bool', + 'createdAt' => '\DateTime', + 'modifiedAt' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'uuidv4', + 'name' => null, + 'url' => 'url', + 'authType' => null, + 'username' => null, + 'password' => null, + 'token' => null, + 'headers' => null, + 'maxRetries' => null, + 'cache' => null, + 'createdAt' => 'date-time', + 'modifiedAt' => 'date-time' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'url' => 'url', + 'authType' => 'authType', + 'username' => 'username', + 'password' => 'password', + 'token' => 'token', + 'headers' => 'headers', + 'maxRetries' => 'maxRetries', + 'cache' => 'cache', + 'createdAt' => 'createdAt', + 'modifiedAt' => 'modifiedAt' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'url' => 'setUrl', + 'authType' => 'setAuthType', + 'username' => 'setUsername', + 'password' => 'setPassword', + 'token' => 'setToken', + 'headers' => 'setHeaders', + 'maxRetries' => 'setMaxRetries', + 'cache' => 'setCache', + 'createdAt' => 'setCreatedAt', + 'modifiedAt' => 'setModifiedAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'url' => 'getUrl', + 'authType' => 'getAuthType', + 'username' => 'getUsername', + 'password' => 'getPassword', + 'token' => 'getToken', + 'headers' => 'getHeaders', + 'maxRetries' => 'getMaxRetries', + 'cache' => 'getCache', + 'createdAt' => 'getCreatedAt', + 'modifiedAt' => 'getModifiedAt' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const AUTH_TYPE_BASIC = 'basic'; + const AUTH_TYPE_TOKEN = 'token'; + const AUTH_TYPE_NO_AUTH = 'noAuth'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAuthTypeAllowableValues() + { + return [ + self::AUTH_TYPE_BASIC, + self::AUTH_TYPE_TOKEN, + self::AUTH_TYPE_NO_AUTH, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['url'] = isset($data['url']) ? $data['url'] : null; + $this->container['authType'] = isset($data['authType']) ? $data['authType'] : null; + $this->container['username'] = isset($data['username']) ? $data['username'] : null; + $this->container['password'] = isset($data['password']) ? $data['password'] : null; + $this->container['token'] = isset($data['token']) ? $data['token'] : null; + $this->container['headers'] = isset($data['headers']) ? $data['headers'] : null; + $this->container['maxRetries'] = isset($data['maxRetries']) ? $data['maxRetries'] : null; + $this->container['cache'] = isset($data['cache']) ? $data['cache'] : null; + $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; + $this->container['modifiedAt'] = isset($data['modifiedAt']) ? $data['modifiedAt'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['url'] === null) { + $invalidProperties[] = "'url' can't be null"; + } + if ($this->container['authType'] === null) { + $invalidProperties[] = "'authType' can't be null"; + } + $allowedValues = $this->getAuthTypeAllowableValues(); + if (!is_null($this->container['authType']) && !in_array($this->container['authType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'authType', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['headers'] === null) { + $invalidProperties[] = "'headers' can't be null"; + } + if ($this->container['maxRetries'] === null) { + $invalidProperties[] = "'maxRetries' can't be null"; + } + if (($this->container['maxRetries'] > 5)) { + $invalidProperties[] = "invalid value for 'maxRetries', must be smaller than or equal to 5."; + } + + if (($this->container['maxRetries'] < 0)) { + $invalidProperties[] = "invalid value for 'maxRetries', must be bigger than or equal to 0."; + } + + if ($this->container['cache'] === null) { + $invalidProperties[] = "'cache' can't be null"; + } + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + if ($this->container['modifiedAt'] === null) { + $invalidProperties[] = "'modifiedAt' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id ID of the feed + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the feed + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets url + * + * @return string + */ + public function getUrl() + { + return $this->container['url']; + } + + /** + * Sets url + * + * @param string $url URL of the feed + * + * @return $this + */ + public function setUrl($url) + { + $this->container['url'] = $url; + + return $this; + } + + /** + * Gets authType + * + * @return string + */ + public function getAuthType() + { + return $this->container['authType']; + } + + /** + * Sets authType + * + * @param string $authType Auth type of the feed: * `basic` * `token` * `noAuth` + * + * @return $this + */ + public function setAuthType($authType) + { + $allowedValues = $this->getAuthTypeAllowableValues(); + if (!in_array($authType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'authType', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['authType'] = $authType; + + return $this; + } + + /** + * Gets username + * + * @return string + */ + public function getUsername() + { + return $this->container['username']; + } + + /** + * Sets username + * + * @param string $username Username for authType `basic` + * + * @return $this + */ + public function setUsername($username) + { + $this->container['username'] = $username; + + return $this; + } + + /** + * Gets password + * + * @return string + */ + public function getPassword() + { + return $this->container['password']; + } + + /** + * Sets password + * + * @param string $password Password for authType `basic` + * + * @return $this + */ + public function setPassword($password) + { + $this->container['password'] = $password; + + return $this; + } + + /** + * Gets token + * + * @return string + */ + public function getToken() + { + return $this->container['token']; + } + + /** + * Sets token + * + * @param string $token Token for authType `token` + * + * @return $this + */ + public function setToken($token) + { + $this->container['token'] = $token; + + return $this; + } + + /** + * Gets headers + * + * @return \Brevo\Client\Model\GetExternalFeedByUUIDHeaders[] + */ + public function getHeaders() + { + return $this->container['headers']; + } + + /** + * Sets headers + * + * @param \Brevo\Client\Model\GetExternalFeedByUUIDHeaders[] $headers Custom headers for the feed + * + * @return $this + */ + public function setHeaders($headers) + { + $this->container['headers'] = $headers; + + return $this; + } + + /** + * Gets maxRetries + * + * @return int + */ + public function getMaxRetries() + { + return $this->container['maxRetries']; + } + + /** + * Sets maxRetries + * + * @param int $maxRetries Maximum number of retries on the feed url + * + * @return $this + */ + public function setMaxRetries($maxRetries) + { + + if (($maxRetries > 5)) { + throw new \InvalidArgumentException('invalid value for $maxRetries when calling GetAllExternalFeedsFeeds., must be smaller than or equal to 5.'); + } + if (($maxRetries < 0)) { + throw new \InvalidArgumentException('invalid value for $maxRetries when calling GetAllExternalFeedsFeeds., must be bigger than or equal to 0.'); + } + + $this->container['maxRetries'] = $maxRetries; + + return $this; + } + + /** + * Gets cache + * + * @return bool + */ + public function getCache() + { + return $this->container['cache']; + } + + /** + * Sets cache + * + * @param bool $cache Toggle caching of feed url response + * + * @return $this + */ + public function setCache($cache) + { + $this->container['cache'] = $cache; + + return $this; + } + + /** + * Gets createdAt + * + * @return \DateTime + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param \DateTime $createdAt Datetime on which the feed was created + * + * @return $this + */ + public function setCreatedAt($createdAt) + { + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets modifiedAt + * + * @return \DateTime + */ + public function getModifiedAt() + { + return $this->container['modifiedAt']; + } + + /** + * Sets modifiedAt + * + * @param \DateTime $modifiedAt Datetime on which the feed was modified + * + * @return $this + */ + public function setModifiedAt($modifiedAt) + { + $this->container['modifiedAt'] = $modifiedAt; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetAttributes.php b/vendor/getbrevo/brevo-php/lib/Model/GetAttributes.php new file mode 100644 index 0000000..76861a9 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetAttributes.php @@ -0,0 +1,308 @@ + '\Brevo\Client\Model\GetAttributesAttributes[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'attributes' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'attributes' => 'attributes' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'attributes' => 'setAttributes' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'attributes' => 'getAttributes' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['attributes'] === null) { + $invalidProperties[] = "'attributes' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets attributes + * + * @return \Brevo\Client\Model\GetAttributesAttributes[] + */ + public function getAttributes() + { + return $this->container['attributes']; + } + + /** + * Sets attributes + * + * @param \Brevo\Client\Model\GetAttributesAttributes[] $attributes Listing of available contact attributes in your account + * + * @return $this + */ + public function setAttributes($attributes) + { + $this->container['attributes'] = $attributes; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetAttributesAttributes.php b/vendor/getbrevo/brevo-php/lib/Model/GetAttributesAttributes.php new file mode 100644 index 0000000..7588373 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetAttributesAttributes.php @@ -0,0 +1,507 @@ + 'string', + 'category' => 'string', + 'type' => 'string', + 'enumeration' => '\Brevo\Client\Model\GetAttributesEnumeration[]', + 'calculatedValue' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null, + 'category' => null, + 'type' => null, + 'enumeration' => null, + 'calculatedValue' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'category' => 'category', + 'type' => 'type', + 'enumeration' => 'enumeration', + 'calculatedValue' => 'calculatedValue' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'category' => 'setCategory', + 'type' => 'setType', + 'enumeration' => 'setEnumeration', + 'calculatedValue' => 'setCalculatedValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'category' => 'getCategory', + 'type' => 'getType', + 'enumeration' => 'getEnumeration', + 'calculatedValue' => 'getCalculatedValue' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const CATEGORY_NORMAL = 'normal'; + const CATEGORY_TRANSACTIONAL = 'transactional'; + const CATEGORY_CATEGORY = 'category'; + const CATEGORY_CALCULATED = 'calculated'; + const CATEGORY__GLOBAL = 'global'; + const TYPE_TEXT = 'text'; + const TYPE_DATE = 'date'; + const TYPE_FLOAT = 'float'; + const TYPE_ID = 'id'; + const TYPE_BOOLEAN = 'boolean'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getCategoryAllowableValues() + { + return [ + self::CATEGORY_NORMAL, + self::CATEGORY_TRANSACTIONAL, + self::CATEGORY_CATEGORY, + self::CATEGORY_CALCULATED, + self::CATEGORY__GLOBAL, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_TEXT, + self::TYPE_DATE, + self::TYPE_FLOAT, + self::TYPE_ID, + self::TYPE_BOOLEAN, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['category'] = isset($data['category']) ? $data['category'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : null; + $this->container['enumeration'] = isset($data['enumeration']) ? $data['enumeration'] : null; + $this->container['calculatedValue'] = isset($data['calculatedValue']) ? $data['calculatedValue'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['category'] === null) { + $invalidProperties[] = "'category' can't be null"; + } + $allowedValues = $this->getCategoryAllowableValues(); + if (!is_null($this->container['category']) && !in_array($this->container['category'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'category', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the attribute + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets category + * + * @return string + */ + public function getCategory() + { + return $this->container['category']; + } + + /** + * Sets category + * + * @param string $category Category of the attribute + * + * @return $this + */ + public function setCategory($category) + { + $allowedValues = $this->getCategoryAllowableValues(); + if (!in_array($category, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'category', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['category'] = $category; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Type of the attribute + * + * @return $this + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($type) && !in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets enumeration + * + * @return \Brevo\Client\Model\GetAttributesEnumeration[] + */ + public function getEnumeration() + { + return $this->container['enumeration']; + } + + /** + * Sets enumeration + * + * @param \Brevo\Client\Model\GetAttributesEnumeration[] $enumeration Parameter only available for \"category\" type attributes. + * + * @return $this + */ + public function setEnumeration($enumeration) + { + $this->container['enumeration'] = $enumeration; + + return $this; + } + + /** + * Gets calculatedValue + * + * @return string + */ + public function getCalculatedValue() + { + return $this->container['calculatedValue']; + } + + /** + * Sets calculatedValue + * + * @param string $calculatedValue Calculated value formula + * + * @return $this + */ + public function setCalculatedValue($calculatedValue) + { + $this->container['calculatedValue'] = $calculatedValue; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetAttributesEnumeration.php b/vendor/getbrevo/brevo-php/lib/Model/GetAttributesEnumeration.php new file mode 100644 index 0000000..32e3179 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetAttributesEnumeration.php @@ -0,0 +1,341 @@ + 'int', + 'label' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'value' => 'int64', + 'label' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'value' => 'value', + 'label' => 'label' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'value' => 'setValue', + 'label' => 'setLabel' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'value' => 'getValue', + 'label' => 'getLabel' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['value'] = isset($data['value']) ? $data['value'] : null; + $this->container['label'] = isset($data['label']) ? $data['label'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['value'] === null) { + $invalidProperties[] = "'value' can't be null"; + } + if ($this->container['label'] === null) { + $invalidProperties[] = "'label' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets value + * + * @return int + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param int $value ID of Value of the \"category\" type attribute + * + * @return $this + */ + public function setValue($value) + { + $this->container['value'] = $value; + + return $this; + } + + /** + * Gets label + * + * @return string + */ + public function getLabel() + { + return $this->container['label']; + } + + /** + * Sets label + * + * @param string $label Label of the \"category\" type attribute + * + * @return $this + */ + public function setLabel($label) + { + $this->container['label'] = $label; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetBlockedDomains.php b/vendor/getbrevo/brevo-php/lib/Model/GetBlockedDomains.php new file mode 100644 index 0000000..a2e5808 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetBlockedDomains.php @@ -0,0 +1,309 @@ + 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'domains' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'domains' => 'domains' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'domains' => 'setDomains' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'domains' => 'getDomains' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['domains'] = isset($data['domains']) ? $data['domains'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['domains'] === null) { + $invalidProperties[] = "'domains' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets domains + * + * @return string[] + */ + public function getDomains() + { + return $this->container['domains']; + } + + /** + * Sets domains + * + * @param string[] $domains List of all blocked domains + * + * @return $this + */ + public function setDomains($domains) + { + $this->container['domains'] = $domains; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetCampaignOverview.php b/vendor/getbrevo/brevo-php/lib/Model/GetCampaignOverview.php new file mode 100644 index 0000000..7c9bf6c --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetCampaignOverview.php @@ -0,0 +1,779 @@ + 'int', + 'name' => 'string', + 'subject' => 'string', + 'previewText' => 'string', + 'type' => 'string', + 'status' => 'string', + 'scheduledAt' => 'string', + 'abTesting' => 'bool', + 'subjectA' => 'string', + 'subjectB' => 'string', + 'splitRule' => 'int', + 'winnerCriteria' => 'string', + 'winnerDelay' => 'int', + 'sendAtBestTime' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'int64', + 'name' => null, + 'subject' => null, + 'previewText' => null, + 'type' => null, + 'status' => null, + 'scheduledAt' => null, + 'abTesting' => null, + 'subjectA' => null, + 'subjectB' => null, + 'splitRule' => null, + 'winnerCriteria' => null, + 'winnerDelay' => null, + 'sendAtBestTime' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'subject' => 'subject', + 'previewText' => 'previewText', + 'type' => 'type', + 'status' => 'status', + 'scheduledAt' => 'scheduledAt', + 'abTesting' => 'abTesting', + 'subjectA' => 'subjectA', + 'subjectB' => 'subjectB', + 'splitRule' => 'splitRule', + 'winnerCriteria' => 'winnerCriteria', + 'winnerDelay' => 'winnerDelay', + 'sendAtBestTime' => 'sendAtBestTime' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'subject' => 'setSubject', + 'previewText' => 'setPreviewText', + 'type' => 'setType', + 'status' => 'setStatus', + 'scheduledAt' => 'setScheduledAt', + 'abTesting' => 'setAbTesting', + 'subjectA' => 'setSubjectA', + 'subjectB' => 'setSubjectB', + 'splitRule' => 'setSplitRule', + 'winnerCriteria' => 'setWinnerCriteria', + 'winnerDelay' => 'setWinnerDelay', + 'sendAtBestTime' => 'setSendAtBestTime' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'subject' => 'getSubject', + 'previewText' => 'getPreviewText', + 'type' => 'getType', + 'status' => 'getStatus', + 'scheduledAt' => 'getScheduledAt', + 'abTesting' => 'getAbTesting', + 'subjectA' => 'getSubjectA', + 'subjectB' => 'getSubjectB', + 'splitRule' => 'getSplitRule', + 'winnerCriteria' => 'getWinnerCriteria', + 'winnerDelay' => 'getWinnerDelay', + 'sendAtBestTime' => 'getSendAtBestTime' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const TYPE_CLASSIC = 'classic'; + const TYPE_TRIGGER = 'trigger'; + const STATUS_DRAFT = 'draft'; + const STATUS_SENT = 'sent'; + const STATUS_ARCHIVE = 'archive'; + const STATUS_QUEUED = 'queued'; + const STATUS_SUSPENDED = 'suspended'; + const STATUS_IN_PROCESS = 'in_process'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_CLASSIC, + self::TYPE_TRIGGER, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_DRAFT, + self::STATUS_SENT, + self::STATUS_ARCHIVE, + self::STATUS_QUEUED, + self::STATUS_SUSPENDED, + self::STATUS_IN_PROCESS, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['subject'] = isset($data['subject']) ? $data['subject'] : null; + $this->container['previewText'] = isset($data['previewText']) ? $data['previewText'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['scheduledAt'] = isset($data['scheduledAt']) ? $data['scheduledAt'] : null; + $this->container['abTesting'] = isset($data['abTesting']) ? $data['abTesting'] : null; + $this->container['subjectA'] = isset($data['subjectA']) ? $data['subjectA'] : null; + $this->container['subjectB'] = isset($data['subjectB']) ? $data['subjectB'] : null; + $this->container['splitRule'] = isset($data['splitRule']) ? $data['splitRule'] : null; + $this->container['winnerCriteria'] = isset($data['winnerCriteria']) ? $data['winnerCriteria'] : null; + $this->container['winnerDelay'] = isset($data['winnerDelay']) ? $data['winnerDelay'] : null; + $this->container['sendAtBestTime'] = isset($data['sendAtBestTime']) ? $data['sendAtBestTime'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'status', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id ID of the campaign + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the campaign + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets subject + * + * @return string + */ + public function getSubject() + { + return $this->container['subject']; + } + + /** + * Sets subject + * + * @param string $subject Subject of the campaign. Only available if `abTesting` flag of the campaign is `false` + * + * @return $this + */ + public function setSubject($subject) + { + $this->container['subject'] = $subject; + + return $this; + } + + /** + * Gets previewText + * + * @return string + */ + public function getPreviewText() + { + return $this->container['previewText']; + } + + /** + * Sets previewText + * + * @param string $previewText Preview text or preheader of the email campaign + * + * @return $this + */ + public function setPreviewText($previewText) + { + $this->container['previewText'] = $previewText; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Type of campaign + * + * @return $this + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status Status of the campaign + * + * @return $this + */ + public function setStatus($status) + { + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'status', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets scheduledAt + * + * @return string + */ + public function getScheduledAt() + { + return $this->container['scheduledAt']; + } + + /** + * Sets scheduledAt + * + * @param string $scheduledAt UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ) + * + * @return $this + */ + public function setScheduledAt($scheduledAt) + { + $this->container['scheduledAt'] = $scheduledAt; + + return $this; + } + + /** + * Gets abTesting + * + * @return bool + */ + public function getAbTesting() + { + return $this->container['abTesting']; + } + + /** + * Sets abTesting + * + * @param bool $abTesting Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled. + * + * @return $this + */ + public function setAbTesting($abTesting) + { + $this->container['abTesting'] = $abTesting; + + return $this; + } + + /** + * Gets subjectA + * + * @return string + */ + public function getSubjectA() + { + return $this->container['subjectA']; + } + + /** + * Sets subjectA + * + * @param string $subjectA Subject A of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` + * + * @return $this + */ + public function setSubjectA($subjectA) + { + $this->container['subjectA'] = $subjectA; + + return $this; + } + + /** + * Gets subjectB + * + * @return string + */ + public function getSubjectB() + { + return $this->container['subjectB']; + } + + /** + * Sets subjectB + * + * @param string $subjectB Subject B of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` + * + * @return $this + */ + public function setSubjectB($subjectB) + { + $this->container['subjectB'] = $subjectB; + + return $this; + } + + /** + * Gets splitRule + * + * @return int + */ + public function getSplitRule() + { + return $this->container['splitRule']; + } + + /** + * Sets splitRule + * + * @param int $splitRule The size of your ab-test groups. Only available if `abTesting` flag of the campaign is `true` + * + * @return $this + */ + public function setSplitRule($splitRule) + { + $this->container['splitRule'] = $splitRule; + + return $this; + } + + /** + * Gets winnerCriteria + * + * @return string + */ + public function getWinnerCriteria() + { + return $this->container['winnerCriteria']; + } + + /** + * Sets winnerCriteria + * + * @param string $winnerCriteria Criteria for the winning version. Only available if `abTesting` flag of the campaign is `true` + * + * @return $this + */ + public function setWinnerCriteria($winnerCriteria) + { + $this->container['winnerCriteria'] = $winnerCriteria; + + return $this; + } + + /** + * Gets winnerDelay + * + * @return int + */ + public function getWinnerDelay() + { + return $this->container['winnerDelay']; + } + + /** + * Sets winnerDelay + * + * @param int $winnerDelay The duration of the test in hours at the end of which the winning version will be sent. Only available if `abTesting` flag of the campaign is `true` + * + * @return $this + */ + public function setWinnerDelay($winnerDelay) + { + $this->container['winnerDelay'] = $winnerDelay; + + return $this; + } + + /** + * Gets sendAtBestTime + * + * @return bool + */ + public function getSendAtBestTime() + { + return $this->container['sendAtBestTime']; + } + + /** + * Sets sendAtBestTime + * + * @param bool $sendAtBestTime It is true if you have chosen to send your campaign at best time, otherwise it is false + * + * @return $this + */ + public function setSendAtBestTime($sendAtBestTime) + { + $this->container['sendAtBestTime'] = $sendAtBestTime; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetCampaignRecipients.php b/vendor/getbrevo/brevo-php/lib/Model/GetCampaignRecipients.php new file mode 100644 index 0000000..70bc51a --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetCampaignRecipients.php @@ -0,0 +1,341 @@ + 'int[]', + 'exclusionLists' => 'int[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'lists' => 'int64', + 'exclusionLists' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'lists' => 'lists', + 'exclusionLists' => 'exclusionLists' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'lists' => 'setLists', + 'exclusionLists' => 'setExclusionLists' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'lists' => 'getLists', + 'exclusionLists' => 'getExclusionLists' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['lists'] = isset($data['lists']) ? $data['lists'] : null; + $this->container['exclusionLists'] = isset($data['exclusionLists']) ? $data['exclusionLists'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['lists'] === null) { + $invalidProperties[] = "'lists' can't be null"; + } + if ($this->container['exclusionLists'] === null) { + $invalidProperties[] = "'exclusionLists' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets lists + * + * @return int[] + */ + public function getLists() + { + return $this->container['lists']; + } + + /** + * Sets lists + * + * @param int[] $lists lists + * + * @return $this + */ + public function setLists($lists) + { + $this->container['lists'] = $lists; + + return $this; + } + + /** + * Gets exclusionLists + * + * @return int[] + */ + public function getExclusionLists() + { + return $this->container['exclusionLists']; + } + + /** + * Sets exclusionLists + * + * @param int[] $exclusionLists exclusionLists + * + * @return $this + */ + public function setExclusionLists($exclusionLists) + { + $this->container['exclusionLists'] = $exclusionLists; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetCampaignStats.php b/vendor/getbrevo/brevo-php/lib/Model/GetCampaignStats.php new file mode 100644 index 0000000..fb2a6a7 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetCampaignStats.php @@ -0,0 +1,788 @@ + 'int', + 'uniqueClicks' => 'int', + 'clickers' => 'int', + 'complaints' => 'int', + 'delivered' => 'int', + 'sent' => 'int', + 'softBounces' => 'int', + 'hardBounces' => 'int', + 'uniqueViews' => 'int', + 'trackableViews' => 'int', + 'trackableViewsRate' => 'float', + 'estimatedViews' => 'int', + 'unsubscriptions' => 'int', + 'viewed' => 'int', + 'deferred' => 'int', + 'returnBounce' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'listId' => 'int64', + 'uniqueClicks' => 'int64', + 'clickers' => 'int64', + 'complaints' => 'int64', + 'delivered' => 'int64', + 'sent' => 'int64', + 'softBounces' => 'int64', + 'hardBounces' => 'int64', + 'uniqueViews' => 'int64', + 'trackableViews' => 'int64', + 'trackableViewsRate' => 'float', + 'estimatedViews' => 'int64', + 'unsubscriptions' => 'int64', + 'viewed' => 'int64', + 'deferred' => 'int64', + 'returnBounce' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'listId' => 'listId', + 'uniqueClicks' => 'uniqueClicks', + 'clickers' => 'clickers', + 'complaints' => 'complaints', + 'delivered' => 'delivered', + 'sent' => 'sent', + 'softBounces' => 'softBounces', + 'hardBounces' => 'hardBounces', + 'uniqueViews' => 'uniqueViews', + 'trackableViews' => 'trackableViews', + 'trackableViewsRate' => 'trackableViewsRate', + 'estimatedViews' => 'estimatedViews', + 'unsubscriptions' => 'unsubscriptions', + 'viewed' => 'viewed', + 'deferred' => 'deferred', + 'returnBounce' => 'returnBounce' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'listId' => 'setListId', + 'uniqueClicks' => 'setUniqueClicks', + 'clickers' => 'setClickers', + 'complaints' => 'setComplaints', + 'delivered' => 'setDelivered', + 'sent' => 'setSent', + 'softBounces' => 'setSoftBounces', + 'hardBounces' => 'setHardBounces', + 'uniqueViews' => 'setUniqueViews', + 'trackableViews' => 'setTrackableViews', + 'trackableViewsRate' => 'setTrackableViewsRate', + 'estimatedViews' => 'setEstimatedViews', + 'unsubscriptions' => 'setUnsubscriptions', + 'viewed' => 'setViewed', + 'deferred' => 'setDeferred', + 'returnBounce' => 'setReturnBounce' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'listId' => 'getListId', + 'uniqueClicks' => 'getUniqueClicks', + 'clickers' => 'getClickers', + 'complaints' => 'getComplaints', + 'delivered' => 'getDelivered', + 'sent' => 'getSent', + 'softBounces' => 'getSoftBounces', + 'hardBounces' => 'getHardBounces', + 'uniqueViews' => 'getUniqueViews', + 'trackableViews' => 'getTrackableViews', + 'trackableViewsRate' => 'getTrackableViewsRate', + 'estimatedViews' => 'getEstimatedViews', + 'unsubscriptions' => 'getUnsubscriptions', + 'viewed' => 'getViewed', + 'deferred' => 'getDeferred', + 'returnBounce' => 'getReturnBounce' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['listId'] = isset($data['listId']) ? $data['listId'] : null; + $this->container['uniqueClicks'] = isset($data['uniqueClicks']) ? $data['uniqueClicks'] : null; + $this->container['clickers'] = isset($data['clickers']) ? $data['clickers'] : null; + $this->container['complaints'] = isset($data['complaints']) ? $data['complaints'] : null; + $this->container['delivered'] = isset($data['delivered']) ? $data['delivered'] : null; + $this->container['sent'] = isset($data['sent']) ? $data['sent'] : null; + $this->container['softBounces'] = isset($data['softBounces']) ? $data['softBounces'] : null; + $this->container['hardBounces'] = isset($data['hardBounces']) ? $data['hardBounces'] : null; + $this->container['uniqueViews'] = isset($data['uniqueViews']) ? $data['uniqueViews'] : null; + $this->container['trackableViews'] = isset($data['trackableViews']) ? $data['trackableViews'] : null; + $this->container['trackableViewsRate'] = isset($data['trackableViewsRate']) ? $data['trackableViewsRate'] : null; + $this->container['estimatedViews'] = isset($data['estimatedViews']) ? $data['estimatedViews'] : null; + $this->container['unsubscriptions'] = isset($data['unsubscriptions']) ? $data['unsubscriptions'] : null; + $this->container['viewed'] = isset($data['viewed']) ? $data['viewed'] : null; + $this->container['deferred'] = isset($data['deferred']) ? $data['deferred'] : null; + $this->container['returnBounce'] = isset($data['returnBounce']) ? $data['returnBounce'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['uniqueClicks'] === null) { + $invalidProperties[] = "'uniqueClicks' can't be null"; + } + if ($this->container['clickers'] === null) { + $invalidProperties[] = "'clickers' can't be null"; + } + if ($this->container['complaints'] === null) { + $invalidProperties[] = "'complaints' can't be null"; + } + if ($this->container['delivered'] === null) { + $invalidProperties[] = "'delivered' can't be null"; + } + if ($this->container['sent'] === null) { + $invalidProperties[] = "'sent' can't be null"; + } + if ($this->container['softBounces'] === null) { + $invalidProperties[] = "'softBounces' can't be null"; + } + if ($this->container['hardBounces'] === null) { + $invalidProperties[] = "'hardBounces' can't be null"; + } + if ($this->container['uniqueViews'] === null) { + $invalidProperties[] = "'uniqueViews' can't be null"; + } + if ($this->container['trackableViews'] === null) { + $invalidProperties[] = "'trackableViews' can't be null"; + } + if ($this->container['unsubscriptions'] === null) { + $invalidProperties[] = "'unsubscriptions' can't be null"; + } + if ($this->container['viewed'] === null) { + $invalidProperties[] = "'viewed' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets listId + * + * @return int + */ + public function getListId() + { + return $this->container['listId']; + } + + /** + * Sets listId + * + * @param int $listId List Id of email campaign (only in case of get email campaign(s)(not for global stats)) + * + * @return $this + */ + public function setListId($listId) + { + $this->container['listId'] = $listId; + + return $this; + } + + /** + * Gets uniqueClicks + * + * @return int + */ + public function getUniqueClicks() + { + return $this->container['uniqueClicks']; + } + + /** + * Sets uniqueClicks + * + * @param int $uniqueClicks Number of unique clicks for the campaign + * + * @return $this + */ + public function setUniqueClicks($uniqueClicks) + { + $this->container['uniqueClicks'] = $uniqueClicks; + + return $this; + } + + /** + * Gets clickers + * + * @return int + */ + public function getClickers() + { + return $this->container['clickers']; + } + + /** + * Sets clickers + * + * @param int $clickers Number of total clicks for the campaign + * + * @return $this + */ + public function setClickers($clickers) + { + $this->container['clickers'] = $clickers; + + return $this; + } + + /** + * Gets complaints + * + * @return int + */ + public function getComplaints() + { + return $this->container['complaints']; + } + + /** + * Sets complaints + * + * @param int $complaints Number of complaints (Spam reports) for the campaign + * + * @return $this + */ + public function setComplaints($complaints) + { + $this->container['complaints'] = $complaints; + + return $this; + } + + /** + * Gets delivered + * + * @return int + */ + public function getDelivered() + { + return $this->container['delivered']; + } + + /** + * Sets delivered + * + * @param int $delivered Number of delivered emails for the campaign + * + * @return $this + */ + public function setDelivered($delivered) + { + $this->container['delivered'] = $delivered; + + return $this; + } + + /** + * Gets sent + * + * @return int + */ + public function getSent() + { + return $this->container['sent']; + } + + /** + * Sets sent + * + * @param int $sent Number of sent emails for the campaign + * + * @return $this + */ + public function setSent($sent) + { + $this->container['sent'] = $sent; + + return $this; + } + + /** + * Gets softBounces + * + * @return int + */ + public function getSoftBounces() + { + return $this->container['softBounces']; + } + + /** + * Sets softBounces + * + * @param int $softBounces Number of softbounce for the campaign + * + * @return $this + */ + public function setSoftBounces($softBounces) + { + $this->container['softBounces'] = $softBounces; + + return $this; + } + + /** + * Gets hardBounces + * + * @return int + */ + public function getHardBounces() + { + return $this->container['hardBounces']; + } + + /** + * Sets hardBounces + * + * @param int $hardBounces Number of harbounce for the campaign + * + * @return $this + */ + public function setHardBounces($hardBounces) + { + $this->container['hardBounces'] = $hardBounces; + + return $this; + } + + /** + * Gets uniqueViews + * + * @return int + */ + public function getUniqueViews() + { + return $this->container['uniqueViews']; + } + + /** + * Sets uniqueViews + * + * @param int $uniqueViews Number of unique openings for the campaign + * + * @return $this + */ + public function setUniqueViews($uniqueViews) + { + $this->container['uniqueViews'] = $uniqueViews; + + return $this; + } + + /** + * Gets trackableViews + * + * @return int + */ + public function getTrackableViews() + { + return $this->container['trackableViews']; + } + + /** + * Sets trackableViews + * + * @param int $trackableViews Recipients without any privacy protection option enabled in their email client + * + * @return $this + */ + public function setTrackableViews($trackableViews) + { + $this->container['trackableViews'] = $trackableViews; + + return $this; + } + + /** + * Gets trackableViewsRate + * + * @return float + */ + public function getTrackableViewsRate() + { + return $this->container['trackableViewsRate']; + } + + /** + * Sets trackableViewsRate + * + * @param float $trackableViewsRate Rate of recipients without any privacy protection option enabled in their email client + * + * @return $this + */ + public function setTrackableViewsRate($trackableViewsRate) + { + $this->container['trackableViewsRate'] = $trackableViewsRate; + + return $this; + } + + /** + * Gets estimatedViews + * + * @return int + */ + public function getEstimatedViews() + { + return $this->container['estimatedViews']; + } + + /** + * Sets estimatedViews + * + * @param int $estimatedViews Rate of recipients without any privacy protection option enabled in their email client, applied to all delivered emails + * + * @return $this + */ + public function setEstimatedViews($estimatedViews) + { + $this->container['estimatedViews'] = $estimatedViews; + + return $this; + } + + /** + * Gets unsubscriptions + * + * @return int + */ + public function getUnsubscriptions() + { + return $this->container['unsubscriptions']; + } + + /** + * Sets unsubscriptions + * + * @param int $unsubscriptions Number of unsubscription for the campaign + * + * @return $this + */ + public function setUnsubscriptions($unsubscriptions) + { + $this->container['unsubscriptions'] = $unsubscriptions; + + return $this; + } + + /** + * Gets viewed + * + * @return int + */ + public function getViewed() + { + return $this->container['viewed']; + } + + /** + * Sets viewed + * + * @param int $viewed Number of openings for the campaign + * + * @return $this + */ + public function setViewed($viewed) + { + $this->container['viewed'] = $viewed; + + return $this; + } + + /** + * Gets deferred + * + * @return int + */ + public function getDeferred() + { + return $this->container['deferred']; + } + + /** + * Sets deferred + * + * @param int $deferred Number of deferred emails for the campaign + * + * @return $this + */ + public function setDeferred($deferred) + { + $this->container['deferred'] = $deferred; + + return $this; + } + + /** + * Gets returnBounce + * + * @return int + */ + public function getReturnBounce() + { + return $this->container['returnBounce']; + } + + /** + * Sets returnBounce + * + * @param int $returnBounce Total number of non-delivered campaigns for a particular campaign id. + * + * @return $this + */ + public function setReturnBounce($returnBounce) + { + $this->container['returnBounce'] = $returnBounce; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetCategories.php b/vendor/getbrevo/brevo-php/lib/Model/GetCategories.php new file mode 100644 index 0000000..596ab12 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetCategories.php @@ -0,0 +1,341 @@ + 'object[]', + 'count' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'categories' => null, + 'count' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'categories' => 'categories', + 'count' => 'count' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'categories' => 'setCategories', + 'count' => 'setCount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'categories' => 'getCategories', + 'count' => 'getCount' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['categories'] = isset($data['categories']) ? $data['categories'] : null; + $this->container['count'] = isset($data['count']) ? $data['count'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['categories'] === null) { + $invalidProperties[] = "'categories' can't be null"; + } + if ($this->container['count'] === null) { + $invalidProperties[] = "'count' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets categories + * + * @return object[] + */ + public function getCategories() + { + return $this->container['categories']; + } + + /** + * Sets categories + * + * @param object[] $categories categories + * + * @return $this + */ + public function setCategories($categories) + { + $this->container['categories'] = $categories; + + return $this; + } + + /** + * Gets count + * + * @return int + */ + public function getCount() + { + return $this->container['count']; + } + + /** + * Sets count + * + * @param int $count Number of categories + * + * @return $this + */ + public function setCount($count) + { + $this->container['count'] = $count; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetCategoryDetails.php b/vendor/getbrevo/brevo-php/lib/Model/GetCategoryDetails.php new file mode 100644 index 0000000..0b4d072 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetCategoryDetails.php @@ -0,0 +1,467 @@ + 'string', + 'name' => 'string', + 'createdAt' => 'string', + 'modifiedAt' => 'string', + 'url' => 'string', + 'isDeleted' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'string', + 'name' => 'string', + 'createdAt' => null, + 'modifiedAt' => null, + 'url' => 'string', + 'isDeleted' => 'string' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'createdAt' => 'createdAt', + 'modifiedAt' => 'modifiedAt', + 'url' => 'url', + 'isDeleted' => 'isDeleted' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'createdAt' => 'setCreatedAt', + 'modifiedAt' => 'setModifiedAt', + 'url' => 'setUrl', + 'isDeleted' => 'setIsDeleted' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'createdAt' => 'getCreatedAt', + 'modifiedAt' => 'getModifiedAt', + 'url' => 'getUrl', + 'isDeleted' => 'getIsDeleted' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; + $this->container['modifiedAt'] = isset($data['modifiedAt']) ? $data['modifiedAt'] : null; + $this->container['url'] = isset($data['url']) ? $data['url'] : null; + $this->container['isDeleted'] = isset($data['isDeleted']) ? $data['isDeleted'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + if ($this->container['modifiedAt'] === null) { + $invalidProperties[] = "'modifiedAt' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Category ID for which you requested the details + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the category for which you requested the details + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets createdAt + * + * @return string + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param string $createdAt Creation UTC date-time of the category (YYYY-MM-DDTHH:mm:ss.SSSZ) + * + * @return $this + */ + public function setCreatedAt($createdAt) + { + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets modifiedAt + * + * @return string + */ + public function getModifiedAt() + { + return $this->container['modifiedAt']; + } + + /** + * Sets modifiedAt + * + * @param string $modifiedAt Last modification UTC date-time of the category (YYYY-MM-DDTHH:mm:ss.SSSZ) + * + * @return $this + */ + public function setModifiedAt($modifiedAt) + { + $this->container['modifiedAt'] = $modifiedAt; + + return $this; + } + + /** + * Gets url + * + * @return string + */ + public function getUrl() + { + return $this->container['url']; + } + + /** + * Sets url + * + * @param string $url URL to the category + * + * @return $this + */ + public function setUrl($url) + { + $this->container['url'] = $url; + + return $this; + } + + /** + * Gets isDeleted + * + * @return bool + */ + public function getIsDeleted() + { + return $this->container['isDeleted']; + } + + /** + * Sets isDeleted + * + * @param bool $isDeleted category deleted from the shop's database + * + * @return $this + */ + public function setIsDeleted($isDeleted) + { + $this->container['isDeleted'] = $isDeleted; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetChildAccountCreationStatus.php b/vendor/getbrevo/brevo-php/lib/Model/GetChildAccountCreationStatus.php new file mode 100644 index 0000000..33d8821 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetChildAccountCreationStatus.php @@ -0,0 +1,308 @@ + 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'childAccountCreated' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'childAccountCreated' => 'childAccountCreated' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'childAccountCreated' => 'setChildAccountCreated' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'childAccountCreated' => 'getChildAccountCreated' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['childAccountCreated'] = isset($data['childAccountCreated']) ? $data['childAccountCreated'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['childAccountCreated'] === null) { + $invalidProperties[] = "'childAccountCreated' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets childAccountCreated + * + * @return bool + */ + public function getChildAccountCreated() + { + return $this->container['childAccountCreated']; + } + + /** + * Sets childAccountCreated + * + * @param bool $childAccountCreated Status of child account creation whether it is successfully created (exists) or not. + * + * @return $this + */ + public function setChildAccountCreated($childAccountCreated) + { + $this->container['childAccountCreated'] = $childAccountCreated; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetChildDomain.php b/vendor/getbrevo/brevo-php/lib/Model/GetChildDomain.php new file mode 100644 index 0000000..0fe663a --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetChildDomain.php @@ -0,0 +1,335 @@ + 'string', + 'active' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'domain' => null, + 'active' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'domain' => 'domain', + 'active' => 'active' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'domain' => 'setDomain', + 'active' => 'setActive' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'domain' => 'getDomain', + 'active' => 'getActive' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['domain'] = isset($data['domain']) ? $data['domain'] : null; + $this->container['active'] = isset($data['active']) ? $data['active'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets domain + * + * @return string + */ + public function getDomain() + { + return $this->container['domain']; + } + + /** + * Sets domain + * + * @param string $domain Sender domain + * + * @return $this + */ + public function setDomain($domain) + { + $this->container['domain'] = $domain; + + return $this; + } + + /** + * Gets active + * + * @return bool + */ + public function getActive() + { + return $this->container['active']; + } + + /** + * Sets active + * + * @param bool $active indicates whether a domain is verified or not + * + * @return $this + */ + public function setActive($active) + { + $this->container['active'] = $active; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetChildDomains.php b/vendor/getbrevo/brevo-php/lib/Model/GetChildDomains.php new file mode 100644 index 0000000..b54947f --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetChildDomains.php @@ -0,0 +1,280 @@ +listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetChildInfo.php b/vendor/getbrevo/brevo-php/lib/Model/GetChildInfo.php new file mode 100644 index 0000000..0b909b7 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetChildInfo.php @@ -0,0 +1,422 @@ + '\Brevo\Client\Model\GetChildInfoCredits', + 'statistics' => '\Brevo\Client\Model\GetChildInfoStatistics', + 'password' => 'string', + 'ips' => 'string[]', + 'apiKeys' => '\Brevo\Client\Model\GetChildInfoApiKeys' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'credits' => null, + 'statistics' => null, + 'password' => 'password', + 'ips' => null, + 'apiKeys' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats + parent::swaggerFormats(); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'credits' => 'credits', + 'statistics' => 'statistics', + 'password' => 'password', + 'ips' => 'ips', + 'apiKeys' => 'apiKeys' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'credits' => 'setCredits', + 'statistics' => 'setStatistics', + 'password' => 'setPassword', + 'ips' => 'setIps', + 'apiKeys' => 'setApiKeys' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'credits' => 'getCredits', + 'statistics' => 'getStatistics', + 'password' => 'getPassword', + 'ips' => 'getIps', + 'apiKeys' => 'getApiKeys' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return parent::attributeMap() + self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return parent::setters() + self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return parent::getters() + self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + parent::__construct($data); + + $this->container['credits'] = isset($data['credits']) ? $data['credits'] : null; + $this->container['statistics'] = isset($data['statistics']) ? $data['statistics'] : null; + $this->container['password'] = isset($data['password']) ? $data['password'] : null; + $this->container['ips'] = isset($data['ips']) ? $data['ips'] : null; + $this->container['apiKeys'] = isset($data['apiKeys']) ? $data['apiKeys'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = parent::listInvalidProperties(); + + if ($this->container['password'] === null) { + $invalidProperties[] = "'password' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets credits + * + * @return \Brevo\Client\Model\GetChildInfoCredits + */ + public function getCredits() + { + return $this->container['credits']; + } + + /** + * Sets credits + * + * @param \Brevo\Client\Model\GetChildInfoCredits $credits credits + * + * @return $this + */ + public function setCredits($credits) + { + $this->container['credits'] = $credits; + + return $this; + } + + /** + * Gets statistics + * + * @return \Brevo\Client\Model\GetChildInfoStatistics + */ + public function getStatistics() + { + return $this->container['statistics']; + } + + /** + * Sets statistics + * + * @param \Brevo\Client\Model\GetChildInfoStatistics $statistics statistics + * + * @return $this + */ + public function setStatistics($statistics) + { + $this->container['statistics'] = $statistics; + + return $this; + } + + /** + * Gets password + * + * @return string + */ + public function getPassword() + { + return $this->container['password']; + } + + /** + * Sets password + * + * @param string $password The encrypted password of child account + * + * @return $this + */ + public function setPassword($password) + { + $this->container['password'] = $password; + + return $this; + } + + /** + * Gets ips + * + * @return string[] + */ + public function getIps() + { + return $this->container['ips']; + } + + /** + * Sets ips + * + * @param string[] $ips IP(s) associated to a child account user + * + * @return $this + */ + public function setIps($ips) + { + $this->container['ips'] = $ips; + + return $this; + } + + /** + * Gets apiKeys + * + * @return \Brevo\Client\Model\GetChildInfoApiKeys + */ + public function getApiKeys() + { + return $this->container['apiKeys']; + } + + /** + * Sets apiKeys + * + * @param \Brevo\Client\Model\GetChildInfoApiKeys $apiKeys apiKeys + * + * @return $this + */ + public function setApiKeys($apiKeys) + { + $this->container['apiKeys'] = $apiKeys; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetChildInfoApiKeys.php b/vendor/getbrevo/brevo-php/lib/Model/GetChildInfoApiKeys.php new file mode 100644 index 0000000..63fd407 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetChildInfoApiKeys.php @@ -0,0 +1,339 @@ + '\Brevo\Client\Model\GetChildInfoApiKeysV2[]', + 'v3' => '\Brevo\Client\Model\GetChildInfoApiKeysV3[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'v2' => null, + 'v3' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'v2' => 'v2', + 'v3' => 'v3' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'v2' => 'setV2', + 'v3' => 'setV3' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'v2' => 'getV2', + 'v3' => 'getV3' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['v2'] = isset($data['v2']) ? $data['v2'] : null; + $this->container['v3'] = isset($data['v3']) ? $data['v3'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['v2'] === null) { + $invalidProperties[] = "'v2' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets v2 + * + * @return \Brevo\Client\Model\GetChildInfoApiKeysV2[] + */ + public function getV2() + { + return $this->container['v2']; + } + + /** + * Sets v2 + * + * @param \Brevo\Client\Model\GetChildInfoApiKeysV2[] $v2 v2 + * + * @return $this + */ + public function setV2($v2) + { + $this->container['v2'] = $v2; + + return $this; + } + + /** + * Gets v3 + * + * @return \Brevo\Client\Model\GetChildInfoApiKeysV3[] + */ + public function getV3() + { + return $this->container['v3']; + } + + /** + * Sets v3 + * + * @param \Brevo\Client\Model\GetChildInfoApiKeysV3[] $v3 v3 + * + * @return $this + */ + public function setV3($v3) + { + $this->container['v3'] = $v3; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetChildInfoApiKeysV2.php b/vendor/getbrevo/brevo-php/lib/Model/GetChildInfoApiKeysV2.php new file mode 100644 index 0000000..4215b8a --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetChildInfoApiKeysV2.php @@ -0,0 +1,341 @@ + 'string', + 'key' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null, + 'key' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'key' => 'key' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'key' => 'setKey' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'key' => 'getKey' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['key'] = isset($data['key']) ? $data['key'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['key'] === null) { + $invalidProperties[] = "'key' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the key for version 2 + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets key + * + * @return string + */ + public function getKey() + { + return $this->container['key']; + } + + /** + * Sets key + * + * @param string $key API Key for version 2 + * + * @return $this + */ + public function setKey($key) + { + $this->container['key'] = $key; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetChildInfoApiKeysV3.php b/vendor/getbrevo/brevo-php/lib/Model/GetChildInfoApiKeysV3.php new file mode 100644 index 0000000..8b58a1f --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetChildInfoApiKeysV3.php @@ -0,0 +1,341 @@ + 'string', + 'key' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null, + 'key' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'key' => 'key' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'key' => 'setKey' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'key' => 'getKey' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['key'] = isset($data['key']) ? $data['key'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['key'] === null) { + $invalidProperties[] = "'key' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the key for version 3 + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets key + * + * @return string + */ + public function getKey() + { + return $this->container['key']; + } + + /** + * Sets key + * + * @param string $key API Key for version 3 + * + * @return $this + */ + public function setKey($key) + { + $this->container['key'] = $key; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetChildInfoCredits.php b/vendor/getbrevo/brevo-php/lib/Model/GetChildInfoCredits.php new file mode 100644 index 0000000..b79dd86 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetChildInfoCredits.php @@ -0,0 +1,336 @@ + 'int', + 'smsCredits' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'emailCredits' => 'int64', + 'smsCredits' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'emailCredits' => 'emailCredits', + 'smsCredits' => 'smsCredits' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'emailCredits' => 'setEmailCredits', + 'smsCredits' => 'setSmsCredits' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'emailCredits' => 'getEmailCredits', + 'smsCredits' => 'getSmsCredits' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['emailCredits'] = isset($data['emailCredits']) ? $data['emailCredits'] : null; + $this->container['smsCredits'] = isset($data['smsCredits']) ? $data['smsCredits'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets emailCredits + * + * @return int + */ + public function getEmailCredits() + { + return $this->container['emailCredits']; + } + + /** + * Sets emailCredits + * + * @param int $emailCredits Email credits available for your child + * + * @return $this + */ + public function setEmailCredits($emailCredits) + { + $this->container['emailCredits'] = $emailCredits; + + return $this; + } + + /** + * Gets smsCredits + * + * @return int + */ + public function getSmsCredits() + { + return $this->container['smsCredits']; + } + + /** + * Sets smsCredits + * + * @param int $smsCredits SMS credits available for your child + * + * @return $this + */ + public function setSmsCredits($smsCredits) + { + $this->container['smsCredits'] = $smsCredits; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetChildInfoStatistics.php b/vendor/getbrevo/brevo-php/lib/Model/GetChildInfoStatistics.php new file mode 100644 index 0000000..730f10d --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetChildInfoStatistics.php @@ -0,0 +1,366 @@ + 'int', + 'currentMonthTotalSent' => 'int', + 'totalSent' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'previousMonthTotalSent' => 'int64', + 'currentMonthTotalSent' => 'int64', + 'totalSent' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'previousMonthTotalSent' => 'previousMonthTotalSent', + 'currentMonthTotalSent' => 'currentMonthTotalSent', + 'totalSent' => 'totalSent' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'previousMonthTotalSent' => 'setPreviousMonthTotalSent', + 'currentMonthTotalSent' => 'setCurrentMonthTotalSent', + 'totalSent' => 'setTotalSent' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'previousMonthTotalSent' => 'getPreviousMonthTotalSent', + 'currentMonthTotalSent' => 'getCurrentMonthTotalSent', + 'totalSent' => 'getTotalSent' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['previousMonthTotalSent'] = isset($data['previousMonthTotalSent']) ? $data['previousMonthTotalSent'] : null; + $this->container['currentMonthTotalSent'] = isset($data['currentMonthTotalSent']) ? $data['currentMonthTotalSent'] : null; + $this->container['totalSent'] = isset($data['totalSent']) ? $data['totalSent'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets previousMonthTotalSent + * + * @return int + */ + public function getPreviousMonthTotalSent() + { + return $this->container['previousMonthTotalSent']; + } + + /** + * Sets previousMonthTotalSent + * + * @param int $previousMonthTotalSent Overall emails sent for the previous month + * + * @return $this + */ + public function setPreviousMonthTotalSent($previousMonthTotalSent) + { + $this->container['previousMonthTotalSent'] = $previousMonthTotalSent; + + return $this; + } + + /** + * Gets currentMonthTotalSent + * + * @return int + */ + public function getCurrentMonthTotalSent() + { + return $this->container['currentMonthTotalSent']; + } + + /** + * Sets currentMonthTotalSent + * + * @param int $currentMonthTotalSent Overall emails sent for current month + * + * @return $this + */ + public function setCurrentMonthTotalSent($currentMonthTotalSent) + { + $this->container['currentMonthTotalSent'] = $currentMonthTotalSent; + + return $this; + } + + /** + * Gets totalSent + * + * @return int + */ + public function getTotalSent() + { + return $this->container['totalSent']; + } + + /** + * Sets totalSent + * + * @param int $totalSent Overall emails sent for since the account exists + * + * @return $this + */ + public function setTotalSent($totalSent) + { + $this->container['totalSent'] = $totalSent; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetChildrenList.php b/vendor/getbrevo/brevo-php/lib/Model/GetChildrenList.php new file mode 100644 index 0000000..0d48062 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetChildrenList.php @@ -0,0 +1,335 @@ + 'object[]', + 'count' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'children' => null, + 'count' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'children' => 'children', + 'count' => 'count' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'children' => 'setChildren', + 'count' => 'setCount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'children' => 'getChildren', + 'count' => 'getCount' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['children'] = isset($data['children']) ? $data['children'] : null; + $this->container['count'] = isset($data['count']) ? $data['count'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets children + * + * @return object[] + */ + public function getChildren() + { + return $this->container['children']; + } + + /** + * Sets children + * + * @param object[] $children Your children's account information + * + * @return $this + */ + public function setChildren($children) + { + $this->container['children'] = $children; + + return $this; + } + + /** + * Gets count + * + * @return int + */ + public function getCount() + { + return $this->container['count']; + } + + /** + * Sets count + * + * @param int $count Number of child accounts + * + * @return $this + */ + public function setCount($count) + { + $this->container['count'] = $count; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetClient.php b/vendor/getbrevo/brevo-php/lib/Model/GetClient.php new file mode 100644 index 0000000..53d7b2f --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetClient.php @@ -0,0 +1,407 @@ + 'string', + 'firstName' => 'string', + 'lastName' => 'string', + 'companyName' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'email' => 'email', + 'firstName' => null, + 'lastName' => null, + 'companyName' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'email' => 'email', + 'firstName' => 'firstName', + 'lastName' => 'lastName', + 'companyName' => 'companyName' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'email' => 'setEmail', + 'firstName' => 'setFirstName', + 'lastName' => 'setLastName', + 'companyName' => 'setCompanyName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'email' => 'getEmail', + 'firstName' => 'getFirstName', + 'lastName' => 'getLastName', + 'companyName' => 'getCompanyName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['firstName'] = isset($data['firstName']) ? $data['firstName'] : null; + $this->container['lastName'] = isset($data['lastName']) ? $data['lastName'] : null; + $this->container['companyName'] = isset($data['companyName']) ? $data['companyName'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + if ($this->container['firstName'] === null) { + $invalidProperties[] = "'firstName' can't be null"; + } + if ($this->container['lastName'] === null) { + $invalidProperties[] = "'lastName' can't be null"; + } + if ($this->container['companyName'] === null) { + $invalidProperties[] = "'companyName' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email Login Email + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets firstName + * + * @return string + */ + public function getFirstName() + { + return $this->container['firstName']; + } + + /** + * Sets firstName + * + * @param string $firstName First Name + * + * @return $this + */ + public function setFirstName($firstName) + { + $this->container['firstName'] = $firstName; + + return $this; + } + + /** + * Gets lastName + * + * @return string + */ + public function getLastName() + { + return $this->container['lastName']; + } + + /** + * Sets lastName + * + * @param string $lastName Last Name + * + * @return $this + */ + public function setLastName($lastName) + { + $this->container['lastName'] = $lastName; + + return $this; + } + + /** + * Gets companyName + * + * @return string + */ + public function getCompanyName() + { + return $this->container['companyName']; + } + + /** + * Sets companyName + * + * @param string $companyName Name of the company + * + * @return $this + */ + public function setCompanyName($companyName) + { + $this->container['companyName'] = $companyName; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetContactCampaignStats.php b/vendor/getbrevo/brevo-php/lib/Model/GetContactCampaignStats.php new file mode 100644 index 0000000..963af44 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetContactCampaignStats.php @@ -0,0 +1,546 @@ + '\Brevo\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[]', + 'hardBounces' => '\Brevo\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[]', + 'softBounces' => '\Brevo\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[]', + 'complaints' => '\Brevo\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[]', + 'unsubscriptions' => '\Brevo\Client\Model\GetContactCampaignStatsUnsubscriptions', + 'opened' => '\Brevo\Client\Model\GetContactCampaignStatsOpened[]', + 'clicked' => '\Brevo\Client\Model\GetContactCampaignStatsClicked[]', + 'transacAttributes' => '\Brevo\Client\Model\GetContactCampaignStatsTransacAttributes[]', + 'delivered' => '\Brevo\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'messagesSent' => null, + 'hardBounces' => null, + 'softBounces' => null, + 'complaints' => null, + 'unsubscriptions' => null, + 'opened' => null, + 'clicked' => null, + 'transacAttributes' => null, + 'delivered' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'messagesSent' => 'messagesSent', + 'hardBounces' => 'hardBounces', + 'softBounces' => 'softBounces', + 'complaints' => 'complaints', + 'unsubscriptions' => 'unsubscriptions', + 'opened' => 'opened', + 'clicked' => 'clicked', + 'transacAttributes' => 'transacAttributes', + 'delivered' => 'delivered' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'messagesSent' => 'setMessagesSent', + 'hardBounces' => 'setHardBounces', + 'softBounces' => 'setSoftBounces', + 'complaints' => 'setComplaints', + 'unsubscriptions' => 'setUnsubscriptions', + 'opened' => 'setOpened', + 'clicked' => 'setClicked', + 'transacAttributes' => 'setTransacAttributes', + 'delivered' => 'setDelivered' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'messagesSent' => 'getMessagesSent', + 'hardBounces' => 'getHardBounces', + 'softBounces' => 'getSoftBounces', + 'complaints' => 'getComplaints', + 'unsubscriptions' => 'getUnsubscriptions', + 'opened' => 'getOpened', + 'clicked' => 'getClicked', + 'transacAttributes' => 'getTransacAttributes', + 'delivered' => 'getDelivered' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['messagesSent'] = isset($data['messagesSent']) ? $data['messagesSent'] : null; + $this->container['hardBounces'] = isset($data['hardBounces']) ? $data['hardBounces'] : null; + $this->container['softBounces'] = isset($data['softBounces']) ? $data['softBounces'] : null; + $this->container['complaints'] = isset($data['complaints']) ? $data['complaints'] : null; + $this->container['unsubscriptions'] = isset($data['unsubscriptions']) ? $data['unsubscriptions'] : null; + $this->container['opened'] = isset($data['opened']) ? $data['opened'] : null; + $this->container['clicked'] = isset($data['clicked']) ? $data['clicked'] : null; + $this->container['transacAttributes'] = isset($data['transacAttributes']) ? $data['transacAttributes'] : null; + $this->container['delivered'] = isset($data['delivered']) ? $data['delivered'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets messagesSent + * + * @return \Brevo\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] + */ + public function getMessagesSent() + { + return $this->container['messagesSent']; + } + + /** + * Sets messagesSent + * + * @param \Brevo\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] $messagesSent messagesSent + * + * @return $this + */ + public function setMessagesSent($messagesSent) + { + $this->container['messagesSent'] = $messagesSent; + + return $this; + } + + /** + * Gets hardBounces + * + * @return \Brevo\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] + */ + public function getHardBounces() + { + return $this->container['hardBounces']; + } + + /** + * Sets hardBounces + * + * @param \Brevo\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] $hardBounces hardBounces + * + * @return $this + */ + public function setHardBounces($hardBounces) + { + $this->container['hardBounces'] = $hardBounces; + + return $this; + } + + /** + * Gets softBounces + * + * @return \Brevo\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] + */ + public function getSoftBounces() + { + return $this->container['softBounces']; + } + + /** + * Sets softBounces + * + * @param \Brevo\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] $softBounces softBounces + * + * @return $this + */ + public function setSoftBounces($softBounces) + { + $this->container['softBounces'] = $softBounces; + + return $this; + } + + /** + * Gets complaints + * + * @return \Brevo\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] + */ + public function getComplaints() + { + return $this->container['complaints']; + } + + /** + * Sets complaints + * + * @param \Brevo\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] $complaints complaints + * + * @return $this + */ + public function setComplaints($complaints) + { + $this->container['complaints'] = $complaints; + + return $this; + } + + /** + * Gets unsubscriptions + * + * @return \Brevo\Client\Model\GetContactCampaignStatsUnsubscriptions + */ + public function getUnsubscriptions() + { + return $this->container['unsubscriptions']; + } + + /** + * Sets unsubscriptions + * + * @param \Brevo\Client\Model\GetContactCampaignStatsUnsubscriptions $unsubscriptions unsubscriptions + * + * @return $this + */ + public function setUnsubscriptions($unsubscriptions) + { + $this->container['unsubscriptions'] = $unsubscriptions; + + return $this; + } + + /** + * Gets opened + * + * @return \Brevo\Client\Model\GetContactCampaignStatsOpened[] + */ + public function getOpened() + { + return $this->container['opened']; + } + + /** + * Sets opened + * + * @param \Brevo\Client\Model\GetContactCampaignStatsOpened[] $opened opened + * + * @return $this + */ + public function setOpened($opened) + { + $this->container['opened'] = $opened; + + return $this; + } + + /** + * Gets clicked + * + * @return \Brevo\Client\Model\GetContactCampaignStatsClicked[] + */ + public function getClicked() + { + return $this->container['clicked']; + } + + /** + * Sets clicked + * + * @param \Brevo\Client\Model\GetContactCampaignStatsClicked[] $clicked clicked + * + * @return $this + */ + public function setClicked($clicked) + { + $this->container['clicked'] = $clicked; + + return $this; + } + + /** + * Gets transacAttributes + * + * @return \Brevo\Client\Model\GetContactCampaignStatsTransacAttributes[] + */ + public function getTransacAttributes() + { + return $this->container['transacAttributes']; + } + + /** + * Sets transacAttributes + * + * @param \Brevo\Client\Model\GetContactCampaignStatsTransacAttributes[] $transacAttributes transacAttributes + * + * @return $this + */ + public function setTransacAttributes($transacAttributes) + { + $this->container['transacAttributes'] = $transacAttributes; + + return $this; + } + + /** + * Gets delivered + * + * @return \Brevo\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] + */ + public function getDelivered() + { + return $this->container['delivered']; + } + + /** + * Sets delivered + * + * @param \Brevo\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] $delivered delivered + * + * @return $this + */ + public function setDelivered($delivered) + { + $this->container['delivered'] = $delivered; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetContactCampaignStatsClicked.php b/vendor/getbrevo/brevo-php/lib/Model/GetContactCampaignStatsClicked.php new file mode 100644 index 0000000..8dc1d58 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetContactCampaignStatsClicked.php @@ -0,0 +1,341 @@ + 'int', + 'links' => '\Brevo\Client\Model\GetExtendedContactDetailsStatisticsLinks[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'campaignId' => 'int64', + 'links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'campaignId' => 'campaignId', + 'links' => 'links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'campaignId' => 'setCampaignId', + 'links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'campaignId' => 'getCampaignId', + 'links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['campaignId'] = isset($data['campaignId']) ? $data['campaignId'] : null; + $this->container['links'] = isset($data['links']) ? $data['links'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['campaignId'] === null) { + $invalidProperties[] = "'campaignId' can't be null"; + } + if ($this->container['links'] === null) { + $invalidProperties[] = "'links' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets campaignId + * + * @return int + */ + public function getCampaignId() + { + return $this->container['campaignId']; + } + + /** + * Sets campaignId + * + * @param int $campaignId ID of the campaign which generated the event + * + * @return $this + */ + public function setCampaignId($campaignId) + { + $this->container['campaignId'] = $campaignId; + + return $this; + } + + /** + * Gets links + * + * @return \Brevo\Client\Model\GetExtendedContactDetailsStatisticsLinks[] + */ + public function getLinks() + { + return $this->container['links']; + } + + /** + * Sets links + * + * @param \Brevo\Client\Model\GetExtendedContactDetailsStatisticsLinks[] $links links + * + * @return $this + */ + public function setLinks($links) + { + $this->container['links'] = $links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetContactCampaignStatsOpened.php b/vendor/getbrevo/brevo-php/lib/Model/GetContactCampaignStatsOpened.php new file mode 100644 index 0000000..fd17f29 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetContactCampaignStatsOpened.php @@ -0,0 +1,407 @@ + 'int', + 'count' => 'int', + 'eventTime' => 'string', + 'ip' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'campaignId' => 'int64', + 'count' => 'int64', + 'eventTime' => null, + 'ip' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'campaignId' => 'campaignId', + 'count' => 'count', + 'eventTime' => 'eventTime', + 'ip' => 'ip' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'campaignId' => 'setCampaignId', + 'count' => 'setCount', + 'eventTime' => 'setEventTime', + 'ip' => 'setIp' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'campaignId' => 'getCampaignId', + 'count' => 'getCount', + 'eventTime' => 'getEventTime', + 'ip' => 'getIp' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['campaignId'] = isset($data['campaignId']) ? $data['campaignId'] : null; + $this->container['count'] = isset($data['count']) ? $data['count'] : null; + $this->container['eventTime'] = isset($data['eventTime']) ? $data['eventTime'] : null; + $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['campaignId'] === null) { + $invalidProperties[] = "'campaignId' can't be null"; + } + if ($this->container['count'] === null) { + $invalidProperties[] = "'count' can't be null"; + } + if ($this->container['eventTime'] === null) { + $invalidProperties[] = "'eventTime' can't be null"; + } + if ($this->container['ip'] === null) { + $invalidProperties[] = "'ip' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets campaignId + * + * @return int + */ + public function getCampaignId() + { + return $this->container['campaignId']; + } + + /** + * Sets campaignId + * + * @param int $campaignId ID of the campaign which generated the event + * + * @return $this + */ + public function setCampaignId($campaignId) + { + $this->container['campaignId'] = $campaignId; + + return $this; + } + + /** + * Gets count + * + * @return int + */ + public function getCount() + { + return $this->container['count']; + } + + /** + * Sets count + * + * @param int $count Number of openings of the campaign + * + * @return $this + */ + public function setCount($count) + { + $this->container['count'] = $count; + + return $this; + } + + /** + * Gets eventTime + * + * @return string + */ + public function getEventTime() + { + return $this->container['eventTime']; + } + + /** + * Sets eventTime + * + * @param string $eventTime UTC date-time of the event + * + * @return $this + */ + public function setEventTime($eventTime) + { + $this->container['eventTime'] = $eventTime; + + return $this; + } + + /** + * Gets ip + * + * @return string + */ + public function getIp() + { + return $this->container['ip']; + } + + /** + * Sets ip + * + * @param string $ip IP from which the user has opened the campaign + * + * @return $this + */ + public function setIp($ip) + { + $this->container['ip'] = $ip; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetContactCampaignStatsTransacAttributes.php b/vendor/getbrevo/brevo-php/lib/Model/GetContactCampaignStatsTransacAttributes.php new file mode 100644 index 0000000..e070a8f --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetContactCampaignStatsTransacAttributes.php @@ -0,0 +1,374 @@ + '\DateTime', + 'orderPrice' => 'float', + 'orderId' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'orderDate' => 'date', + 'orderPrice' => 'float', + 'orderId' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'orderDate' => 'orderDate', + 'orderPrice' => 'orderPrice', + 'orderId' => 'orderId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'orderDate' => 'setOrderDate', + 'orderPrice' => 'setOrderPrice', + 'orderId' => 'setOrderId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'orderDate' => 'getOrderDate', + 'orderPrice' => 'getOrderPrice', + 'orderId' => 'getOrderId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['orderDate'] = isset($data['orderDate']) ? $data['orderDate'] : null; + $this->container['orderPrice'] = isset($data['orderPrice']) ? $data['orderPrice'] : null; + $this->container['orderId'] = isset($data['orderId']) ? $data['orderId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['orderDate'] === null) { + $invalidProperties[] = "'orderDate' can't be null"; + } + if ($this->container['orderPrice'] === null) { + $invalidProperties[] = "'orderPrice' can't be null"; + } + if ($this->container['orderId'] === null) { + $invalidProperties[] = "'orderId' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets orderDate + * + * @return \DateTime + */ + public function getOrderDate() + { + return $this->container['orderDate']; + } + + /** + * Sets orderDate + * + * @param \DateTime $orderDate Date of the order + * + * @return $this + */ + public function setOrderDate($orderDate) + { + $this->container['orderDate'] = $orderDate; + + return $this; + } + + /** + * Gets orderPrice + * + * @return float + */ + public function getOrderPrice() + { + return $this->container['orderPrice']; + } + + /** + * Sets orderPrice + * + * @param float $orderPrice Price of the order + * + * @return $this + */ + public function setOrderPrice($orderPrice) + { + $this->container['orderPrice'] = $orderPrice; + + return $this; + } + + /** + * Gets orderId + * + * @return int + */ + public function getOrderId() + { + return $this->container['orderId']; + } + + /** + * Sets orderId + * + * @param int $orderId ID of the order + * + * @return $this + */ + public function setOrderId($orderId) + { + $this->container['orderId'] = $orderId; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetContactCampaignStatsUnsubscriptions.php b/vendor/getbrevo/brevo-php/lib/Model/GetContactCampaignStatsUnsubscriptions.php new file mode 100644 index 0000000..801f31d --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetContactCampaignStatsUnsubscriptions.php @@ -0,0 +1,341 @@ + '\Brevo\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription[]', + 'adminUnsubscription' => '\Brevo\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'userUnsubscription' => null, + 'adminUnsubscription' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'userUnsubscription' => 'userUnsubscription', + 'adminUnsubscription' => 'adminUnsubscription' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'userUnsubscription' => 'setUserUnsubscription', + 'adminUnsubscription' => 'setAdminUnsubscription' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'userUnsubscription' => 'getUserUnsubscription', + 'adminUnsubscription' => 'getAdminUnsubscription' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['userUnsubscription'] = isset($data['userUnsubscription']) ? $data['userUnsubscription'] : null; + $this->container['adminUnsubscription'] = isset($data['adminUnsubscription']) ? $data['adminUnsubscription'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['userUnsubscription'] === null) { + $invalidProperties[] = "'userUnsubscription' can't be null"; + } + if ($this->container['adminUnsubscription'] === null) { + $invalidProperties[] = "'adminUnsubscription' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets userUnsubscription + * + * @return \Brevo\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription[] + */ + public function getUserUnsubscription() + { + return $this->container['userUnsubscription']; + } + + /** + * Sets userUnsubscription + * + * @param \Brevo\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription[] $userUnsubscription Contact has unsubscribed via the unsubscription link in the email + * + * @return $this + */ + public function setUserUnsubscription($userUnsubscription) + { + $this->container['userUnsubscription'] = $userUnsubscription; + + return $this; + } + + /** + * Gets adminUnsubscription + * + * @return \Brevo\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription[] + */ + public function getAdminUnsubscription() + { + return $this->container['adminUnsubscription']; + } + + /** + * Sets adminUnsubscription + * + * @param \Brevo\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription[] $adminUnsubscription Contact has been unsubscribed from the administrator + * + * @return $this + */ + public function setAdminUnsubscription($adminUnsubscription) + { + $this->container['adminUnsubscription'] = $adminUnsubscription; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetContactDetails.php b/vendor/getbrevo/brevo-php/lib/Model/GetContactDetails.php new file mode 100644 index 0000000..da37f94 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetContactDetails.php @@ -0,0 +1,569 @@ + 'string', + 'id' => 'int', + 'emailBlacklisted' => 'bool', + 'smsBlacklisted' => 'bool', + 'createdAt' => 'string', + 'modifiedAt' => 'string', + 'listIds' => 'int[]', + 'listUnsubscribed' => 'int[]', + 'attributes' => 'object' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'email' => 'email', + 'id' => 'int64', + 'emailBlacklisted' => null, + 'smsBlacklisted' => null, + 'createdAt' => null, + 'modifiedAt' => null, + 'listIds' => 'int64', + 'listUnsubscribed' => 'int64', + 'attributes' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'email' => 'email', + 'id' => 'id', + 'emailBlacklisted' => 'emailBlacklisted', + 'smsBlacklisted' => 'smsBlacklisted', + 'createdAt' => 'createdAt', + 'modifiedAt' => 'modifiedAt', + 'listIds' => 'listIds', + 'listUnsubscribed' => 'listUnsubscribed', + 'attributes' => 'attributes' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'email' => 'setEmail', + 'id' => 'setId', + 'emailBlacklisted' => 'setEmailBlacklisted', + 'smsBlacklisted' => 'setSmsBlacklisted', + 'createdAt' => 'setCreatedAt', + 'modifiedAt' => 'setModifiedAt', + 'listIds' => 'setListIds', + 'listUnsubscribed' => 'setListUnsubscribed', + 'attributes' => 'setAttributes' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'email' => 'getEmail', + 'id' => 'getId', + 'emailBlacklisted' => 'getEmailBlacklisted', + 'smsBlacklisted' => 'getSmsBlacklisted', + 'createdAt' => 'getCreatedAt', + 'modifiedAt' => 'getModifiedAt', + 'listIds' => 'getListIds', + 'listUnsubscribed' => 'getListUnsubscribed', + 'attributes' => 'getAttributes' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['emailBlacklisted'] = isset($data['emailBlacklisted']) ? $data['emailBlacklisted'] : null; + $this->container['smsBlacklisted'] = isset($data['smsBlacklisted']) ? $data['smsBlacklisted'] : null; + $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; + $this->container['modifiedAt'] = isset($data['modifiedAt']) ? $data['modifiedAt'] : null; + $this->container['listIds'] = isset($data['listIds']) ? $data['listIds'] : null; + $this->container['listUnsubscribed'] = isset($data['listUnsubscribed']) ? $data['listUnsubscribed'] : null; + $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['emailBlacklisted'] === null) { + $invalidProperties[] = "'emailBlacklisted' can't be null"; + } + if ($this->container['smsBlacklisted'] === null) { + $invalidProperties[] = "'smsBlacklisted' can't be null"; + } + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + if ($this->container['modifiedAt'] === null) { + $invalidProperties[] = "'modifiedAt' can't be null"; + } + if ($this->container['listIds'] === null) { + $invalidProperties[] = "'listIds' can't be null"; + } + if ($this->container['attributes'] === null) { + $invalidProperties[] = "'attributes' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email Email address of the contact for which you requested the details + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id ID of the contact for which you requested the details + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets emailBlacklisted + * + * @return bool + */ + public function getEmailBlacklisted() + { + return $this->container['emailBlacklisted']; + } + + /** + * Sets emailBlacklisted + * + * @param bool $emailBlacklisted Blacklist status for email campaigns (true=blacklisted, false=not blacklisted) + * + * @return $this + */ + public function setEmailBlacklisted($emailBlacklisted) + { + $this->container['emailBlacklisted'] = $emailBlacklisted; + + return $this; + } + + /** + * Gets smsBlacklisted + * + * @return bool + */ + public function getSmsBlacklisted() + { + return $this->container['smsBlacklisted']; + } + + /** + * Sets smsBlacklisted + * + * @param bool $smsBlacklisted Blacklist status for SMS campaigns (true=blacklisted, false=not blacklisted) + * + * @return $this + */ + public function setSmsBlacklisted($smsBlacklisted) + { + $this->container['smsBlacklisted'] = $smsBlacklisted; + + return $this; + } + + /** + * Gets createdAt + * + * @return string + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param string $createdAt Creation UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) + * + * @return $this + */ + public function setCreatedAt($createdAt) + { + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets modifiedAt + * + * @return string + */ + public function getModifiedAt() + { + return $this->container['modifiedAt']; + } + + /** + * Sets modifiedAt + * + * @param string $modifiedAt Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) + * + * @return $this + */ + public function setModifiedAt($modifiedAt) + { + $this->container['modifiedAt'] = $modifiedAt; + + return $this; + } + + /** + * Gets listIds + * + * @return int[] + */ + public function getListIds() + { + return $this->container['listIds']; + } + + /** + * Sets listIds + * + * @param int[] $listIds listIds + * + * @return $this + */ + public function setListIds($listIds) + { + $this->container['listIds'] = $listIds; + + return $this; + } + + /** + * Gets listUnsubscribed + * + * @return int[] + */ + public function getListUnsubscribed() + { + return $this->container['listUnsubscribed']; + } + + /** + * Sets listUnsubscribed + * + * @param int[] $listUnsubscribed listUnsubscribed + * + * @return $this + */ + public function setListUnsubscribed($listUnsubscribed) + { + $this->container['listUnsubscribed'] = $listUnsubscribed; + + return $this; + } + + /** + * Gets attributes + * + * @return object + */ + public function getAttributes() + { + return $this->container['attributes']; + } + + /** + * Sets attributes + * + * @param object $attributes Set of attributes of the contact + * + * @return $this + */ + public function setAttributes($attributes) + { + $this->container['attributes'] = $attributes; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetContacts.php b/vendor/getbrevo/brevo-php/lib/Model/GetContacts.php new file mode 100644 index 0000000..0be86d9 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetContacts.php @@ -0,0 +1,341 @@ + 'object[]', + 'count' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'contacts' => null, + 'count' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'contacts' => 'contacts', + 'count' => 'count' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'contacts' => 'setContacts', + 'count' => 'setCount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'contacts' => 'getContacts', + 'count' => 'getCount' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['contacts'] = isset($data['contacts']) ? $data['contacts'] : null; + $this->container['count'] = isset($data['count']) ? $data['count'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['contacts'] === null) { + $invalidProperties[] = "'contacts' can't be null"; + } + if ($this->container['count'] === null) { + $invalidProperties[] = "'count' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets contacts + * + * @return object[] + */ + public function getContacts() + { + return $this->container['contacts']; + } + + /** + * Sets contacts + * + * @param object[] $contacts contacts + * + * @return $this + */ + public function setContacts($contacts) + { + $this->container['contacts'] = $contacts; + + return $this; + } + + /** + * Gets count + * + * @return int + */ + public function getCount() + { + return $this->container['count']; + } + + /** + * Sets count + * + * @param int $count Number of contacts + * + * @return $this + */ + public function setCount($count) + { + $this->container['count'] = $count; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetCorporateInvitedUsersList.php b/vendor/getbrevo/brevo-php/lib/Model/GetCorporateInvitedUsersList.php new file mode 100644 index 0000000..989c089 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetCorporateInvitedUsersList.php @@ -0,0 +1,305 @@ + '\Brevo\Client\Model\GetCorporateInvitedUsersListUsers[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'users' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'users' => 'users' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'users' => 'setUsers' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'users' => 'getUsers' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['users'] = isset($data['users']) ? $data['users'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets users + * + * @return \Brevo\Client\Model\GetCorporateInvitedUsersListUsers[] + */ + public function getUsers() + { + return $this->container['users']; + } + + /** + * Sets users + * + * @param \Brevo\Client\Model\GetCorporateInvitedUsersListUsers[] $users Get invited users list + * + * @return $this + */ + public function setUsers($users) + { + $this->container['users'] = $users; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetCorporateInvitedUsersListFeatureAccess.php b/vendor/getbrevo/brevo-php/lib/Model/GetCorporateInvitedUsersListFeatureAccess.php new file mode 100644 index 0000000..38544b2 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetCorporateInvitedUsersListFeatureAccess.php @@ -0,0 +1,396 @@ + 'string[]', + 'apiKeys' => 'string[]', + 'myPlan' => 'string[]', + 'appsManagement' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'userManagement' => null, + 'apiKeys' => null, + 'myPlan' => null, + 'appsManagement' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'userManagement' => 'user_management', + 'apiKeys' => 'api_keys', + 'myPlan' => 'my_plan', + 'appsManagement' => 'apps_management' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'userManagement' => 'setUserManagement', + 'apiKeys' => 'setApiKeys', + 'myPlan' => 'setMyPlan', + 'appsManagement' => 'setAppsManagement' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'userManagement' => 'getUserManagement', + 'apiKeys' => 'getApiKeys', + 'myPlan' => 'getMyPlan', + 'appsManagement' => 'getAppsManagement' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['userManagement'] = isset($data['userManagement']) ? $data['userManagement'] : null; + $this->container['apiKeys'] = isset($data['apiKeys']) ? $data['apiKeys'] : null; + $this->container['myPlan'] = isset($data['myPlan']) ? $data['myPlan'] : null; + $this->container['appsManagement'] = isset($data['appsManagement']) ? $data['appsManagement'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets userManagement + * + * @return string[] + */ + public function getUserManagement() + { + return $this->container['userManagement']; + } + + /** + * Sets userManagement + * + * @param string[] $userManagement User management accessiblity. + * + * @return $this + */ + public function setUserManagement($userManagement) + { + $this->container['userManagement'] = $userManagement; + + return $this; + } + + /** + * Gets apiKeys + * + * @return string[] + */ + public function getApiKeys() + { + return $this->container['apiKeys']; + } + + /** + * Sets apiKeys + * + * @param string[] $apiKeys Api keys accessiblity. + * + * @return $this + */ + public function setApiKeys($apiKeys) + { + $this->container['apiKeys'] = $apiKeys; + + return $this; + } + + /** + * Gets myPlan + * + * @return string[] + */ + public function getMyPlan() + { + return $this->container['myPlan']; + } + + /** + * Sets myPlan + * + * @param string[] $myPlan My plan accessiblity. + * + * @return $this + */ + public function setMyPlan($myPlan) + { + $this->container['myPlan'] = $myPlan; + + return $this; + } + + /** + * Gets appsManagement + * + * @return string[] + */ + public function getAppsManagement() + { + return $this->container['appsManagement']; + } + + /** + * Sets appsManagement + * + * @param string[] $appsManagement Apps management accessiblity | Not available in ENTv2 + * + * @return $this + */ + public function setAppsManagement($appsManagement) + { + $this->container['appsManagement'] = $appsManagement; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetCorporateInvitedUsersListGroups.php b/vendor/getbrevo/brevo-php/lib/Model/GetCorporateInvitedUsersListGroups.php new file mode 100644 index 0000000..c6c882b --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetCorporateInvitedUsersListGroups.php @@ -0,0 +1,336 @@ + 'string', + 'name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => null, + 'name' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id group id + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name group name + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetCorporateInvitedUsersListUsers.php b/vendor/getbrevo/brevo-php/lib/Model/GetCorporateInvitedUsersListUsers.php new file mode 100644 index 0000000..1bb9cae --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetCorporateInvitedUsersListUsers.php @@ -0,0 +1,440 @@ + '\Brevo\Client\Model\GetCorporateInvitedUsersListGroups', + 'email' => 'string', + 'isOwner' => 'string', + 'status' => 'string', + 'featureAccess' => '\Brevo\Client\Model\GetCorporateInvitedUsersListFeatureAccess' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'groups' => null, + 'email' => null, + 'isOwner' => null, + 'status' => null, + 'featureAccess' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'groups' => 'groups', + 'email' => 'email', + 'isOwner' => 'is_owner', + 'status' => 'status', + 'featureAccess' => 'feature_access' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'groups' => 'setGroups', + 'email' => 'setEmail', + 'isOwner' => 'setIsOwner', + 'status' => 'setStatus', + 'featureAccess' => 'setFeatureAccess' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'groups' => 'getGroups', + 'email' => 'getEmail', + 'isOwner' => 'getIsOwner', + 'status' => 'getStatus', + 'featureAccess' => 'getFeatureAccess' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['groups'] = isset($data['groups']) ? $data['groups'] : null; + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['isOwner'] = isset($data['isOwner']) ? $data['isOwner'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['featureAccess'] = isset($data['featureAccess']) ? $data['featureAccess'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['groups'] === null) { + $invalidProperties[] = "'groups' can't be null"; + } + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + if ($this->container['isOwner'] === null) { + $invalidProperties[] = "'isOwner' can't be null"; + } + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } + if ($this->container['featureAccess'] === null) { + $invalidProperties[] = "'featureAccess' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets groups + * + * @return \Brevo\Client\Model\GetCorporateInvitedUsersListGroups + */ + public function getGroups() + { + return $this->container['groups']; + } + + /** + * Sets groups + * + * @param \Brevo\Client\Model\GetCorporateInvitedUsersListGroups $groups groups + * + * @return $this + */ + public function setGroups($groups) + { + $this->container['groups'] = $groups; + + return $this; + } + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email Email address of the user. + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets isOwner + * + * @return string + */ + public function getIsOwner() + { + return $this->container['isOwner']; + } + + /** + * Sets isOwner + * + * @param string $isOwner Flag for indicating is user owner of the organization. + * + * @return $this + */ + public function setIsOwner($isOwner) + { + $this->container['isOwner'] = $isOwner; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status Status of the invited user. + * + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets featureAccess + * + * @return \Brevo\Client\Model\GetCorporateInvitedUsersListFeatureAccess + */ + public function getFeatureAccess() + { + return $this->container['featureAccess']; + } + + /** + * Sets featureAccess + * + * @param \Brevo\Client\Model\GetCorporateInvitedUsersListFeatureAccess $featureAccess featureAccess + * + * @return $this + */ + public function setFeatureAccess($featureAccess) + { + $this->container['featureAccess'] = $featureAccess; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetCouponCollection.php b/vendor/getbrevo/brevo-php/lib/Model/GetCouponCollection.php new file mode 100644 index 0000000..69d4b47 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetCouponCollection.php @@ -0,0 +1,473 @@ + 'string', + 'name' => 'string', + 'defaultCoupon' => 'string', + 'createdAt' => '\DateTime', + 'totalCoupons' => 'int', + 'remainingCoupons' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'uuidv4', + 'name' => 'uuidv4', + 'defaultCoupon' => null, + 'createdAt' => 'date-time', + 'totalCoupons' => 'int64', + 'remainingCoupons' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'defaultCoupon' => 'defaultCoupon', + 'createdAt' => 'createdAt', + 'totalCoupons' => 'totalCoupons', + 'remainingCoupons' => 'remainingCoupons' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'defaultCoupon' => 'setDefaultCoupon', + 'createdAt' => 'setCreatedAt', + 'totalCoupons' => 'setTotalCoupons', + 'remainingCoupons' => 'setRemainingCoupons' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'defaultCoupon' => 'getDefaultCoupon', + 'createdAt' => 'getCreatedAt', + 'totalCoupons' => 'getTotalCoupons', + 'remainingCoupons' => 'getRemainingCoupons' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['defaultCoupon'] = isset($data['defaultCoupon']) ? $data['defaultCoupon'] : null; + $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; + $this->container['totalCoupons'] = isset($data['totalCoupons']) ? $data['totalCoupons'] : null; + $this->container['remainingCoupons'] = isset($data['remainingCoupons']) ? $data['remainingCoupons'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['defaultCoupon'] === null) { + $invalidProperties[] = "'defaultCoupon' can't be null"; + } + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + if ($this->container['totalCoupons'] === null) { + $invalidProperties[] = "'totalCoupons' can't be null"; + } + if ($this->container['remainingCoupons'] === null) { + $invalidProperties[] = "'remainingCoupons' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id The id of the collection + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name The name of the collection + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets defaultCoupon + * + * @return string + */ + public function getDefaultCoupon() + { + return $this->container['defaultCoupon']; + } + + /** + * Sets defaultCoupon + * + * @param string $defaultCoupon The default coupon of the collection + * + * @return $this + */ + public function setDefaultCoupon($defaultCoupon) + { + $this->container['defaultCoupon'] = $defaultCoupon; + + return $this; + } + + /** + * Gets createdAt + * + * @return \DateTime + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param \DateTime $createdAt Datetime on which the collection was created + * + * @return $this + */ + public function setCreatedAt($createdAt) + { + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets totalCoupons + * + * @return int + */ + public function getTotalCoupons() + { + return $this->container['totalCoupons']; + } + + /** + * Sets totalCoupons + * + * @param int $totalCoupons Total coupons in the collection + * + * @return $this + */ + public function setTotalCoupons($totalCoupons) + { + $this->container['totalCoupons'] = $totalCoupons; + + return $this; + } + + /** + * Gets remainingCoupons + * + * @return int + */ + public function getRemainingCoupons() + { + return $this->container['remainingCoupons']; + } + + /** + * Sets remainingCoupons + * + * @param int $remainingCoupons Not sent coupons in the collection + * + * @return $this + */ + public function setRemainingCoupons($remainingCoupons) + { + $this->container['remainingCoupons'] = $remainingCoupons; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetDeviceBrowserStats.php b/vendor/getbrevo/brevo-php/lib/Model/GetDeviceBrowserStats.php new file mode 100644 index 0000000..81a3e75 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetDeviceBrowserStats.php @@ -0,0 +1,407 @@ + 'int', + 'uniqueClicks' => 'int', + 'viewed' => 'int', + 'uniqueViews' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'clickers' => 'int64', + 'uniqueClicks' => 'int64', + 'viewed' => 'int64', + 'uniqueViews' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'clickers' => 'clickers', + 'uniqueClicks' => 'uniqueClicks', + 'viewed' => 'viewed', + 'uniqueViews' => 'uniqueViews' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'clickers' => 'setClickers', + 'uniqueClicks' => 'setUniqueClicks', + 'viewed' => 'setViewed', + 'uniqueViews' => 'setUniqueViews' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'clickers' => 'getClickers', + 'uniqueClicks' => 'getUniqueClicks', + 'viewed' => 'getViewed', + 'uniqueViews' => 'getUniqueViews' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['clickers'] = isset($data['clickers']) ? $data['clickers'] : null; + $this->container['uniqueClicks'] = isset($data['uniqueClicks']) ? $data['uniqueClicks'] : null; + $this->container['viewed'] = isset($data['viewed']) ? $data['viewed'] : null; + $this->container['uniqueViews'] = isset($data['uniqueViews']) ? $data['uniqueViews'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['clickers'] === null) { + $invalidProperties[] = "'clickers' can't be null"; + } + if ($this->container['uniqueClicks'] === null) { + $invalidProperties[] = "'uniqueClicks' can't be null"; + } + if ($this->container['viewed'] === null) { + $invalidProperties[] = "'viewed' can't be null"; + } + if ($this->container['uniqueViews'] === null) { + $invalidProperties[] = "'uniqueViews' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets clickers + * + * @return int + */ + public function getClickers() + { + return $this->container['clickers']; + } + + /** + * Sets clickers + * + * @param int $clickers Number of total clicks for the campaign using the particular browser + * + * @return $this + */ + public function setClickers($clickers) + { + $this->container['clickers'] = $clickers; + + return $this; + } + + /** + * Gets uniqueClicks + * + * @return int + */ + public function getUniqueClicks() + { + return $this->container['uniqueClicks']; + } + + /** + * Sets uniqueClicks + * + * @param int $uniqueClicks Number of unique clicks for the campaign using the particular browser + * + * @return $this + */ + public function setUniqueClicks($uniqueClicks) + { + $this->container['uniqueClicks'] = $uniqueClicks; + + return $this; + } + + /** + * Gets viewed + * + * @return int + */ + public function getViewed() + { + return $this->container['viewed']; + } + + /** + * Sets viewed + * + * @param int $viewed Number of openings for the campaign using the particular browser + * + * @return $this + */ + public function setViewed($viewed) + { + $this->container['viewed'] = $viewed; + + return $this; + } + + /** + * Gets uniqueViews + * + * @return int + */ + public function getUniqueViews() + { + return $this->container['uniqueViews']; + } + + /** + * Sets uniqueViews + * + * @param int $uniqueViews Number of unique openings for the campaign using the particular browser + * + * @return $this + */ + public function setUniqueViews($uniqueViews) + { + $this->container['uniqueViews'] = $uniqueViews; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetDomainConfigurationModel.php b/vendor/getbrevo/brevo-php/lib/Model/GetDomainConfigurationModel.php new file mode 100644 index 0000000..52ee44b --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetDomainConfigurationModel.php @@ -0,0 +1,407 @@ + 'string', + 'verified' => 'bool', + 'authenticated' => 'bool', + 'dnsRecords' => '\Brevo\Client\Model\CreateDomainModelDnsRecords' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'domain' => null, + 'verified' => null, + 'authenticated' => null, + 'dnsRecords' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'domain' => 'domain', + 'verified' => 'verified', + 'authenticated' => 'authenticated', + 'dnsRecords' => 'dns_records' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'domain' => 'setDomain', + 'verified' => 'setVerified', + 'authenticated' => 'setAuthenticated', + 'dnsRecords' => 'setDnsRecords' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'domain' => 'getDomain', + 'verified' => 'getVerified', + 'authenticated' => 'getAuthenticated', + 'dnsRecords' => 'getDnsRecords' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['domain'] = isset($data['domain']) ? $data['domain'] : null; + $this->container['verified'] = isset($data['verified']) ? $data['verified'] : null; + $this->container['authenticated'] = isset($data['authenticated']) ? $data['authenticated'] : null; + $this->container['dnsRecords'] = isset($data['dnsRecords']) ? $data['dnsRecords'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['domain'] === null) { + $invalidProperties[] = "'domain' can't be null"; + } + if ($this->container['verified'] === null) { + $invalidProperties[] = "'verified' can't be null"; + } + if ($this->container['authenticated'] === null) { + $invalidProperties[] = "'authenticated' can't be null"; + } + if ($this->container['dnsRecords'] === null) { + $invalidProperties[] = "'dnsRecords' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets domain + * + * @return string + */ + public function getDomain() + { + return $this->container['domain']; + } + + /** + * Sets domain + * + * @param string $domain Domain + * + * @return $this + */ + public function setDomain($domain) + { + $this->container['domain'] = $domain; + + return $this; + } + + /** + * Gets verified + * + * @return bool + */ + public function getVerified() + { + return $this->container['verified']; + } + + /** + * Sets verified + * + * @param bool $verified Status of domain verification (true=verified, false=non verified) + * + * @return $this + */ + public function setVerified($verified) + { + $this->container['verified'] = $verified; + + return $this; + } + + /** + * Gets authenticated + * + * @return bool + */ + public function getAuthenticated() + { + return $this->container['authenticated']; + } + + /** + * Sets authenticated + * + * @param bool $authenticated Status of domain authentication (true=authenticated, false=non authenticated) + * + * @return $this + */ + public function setAuthenticated($authenticated) + { + $this->container['authenticated'] = $authenticated; + + return $this; + } + + /** + * Gets dnsRecords + * + * @return \Brevo\Client\Model\CreateDomainModelDnsRecords + */ + public function getDnsRecords() + { + return $this->container['dnsRecords']; + } + + /** + * Sets dnsRecords + * + * @param \Brevo\Client\Model\CreateDomainModelDnsRecords $dnsRecords dnsRecords + * + * @return $this + */ + public function setDnsRecords($dnsRecords) + { + $this->container['dnsRecords'] = $dnsRecords; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetDomainsList.php b/vendor/getbrevo/brevo-php/lib/Model/GetDomainsList.php new file mode 100644 index 0000000..1ed1db7 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetDomainsList.php @@ -0,0 +1,305 @@ + '\Brevo\Client\Model\GetDomainsListDomains[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'domains' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'domains' => 'domains' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'domains' => 'setDomains' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'domains' => 'getDomains' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['domains'] = isset($data['domains']) ? $data['domains'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets domains + * + * @return \Brevo\Client\Model\GetDomainsListDomains[] + */ + public function getDomains() + { + return $this->container['domains']; + } + + /** + * Sets domains + * + * @param \Brevo\Client\Model\GetDomainsListDomains[] $domains List of the domains available in your account + * + * @return $this + */ + public function setDomains($domains) + { + $this->container['domains'] = $domains; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetDomainsListDomains.php b/vendor/getbrevo/brevo-php/lib/Model/GetDomainsListDomains.php new file mode 100644 index 0000000..27d25bf --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetDomainsListDomains.php @@ -0,0 +1,437 @@ + 'int', + 'domainName' => 'string', + 'authenticated' => 'bool', + 'verified' => 'bool', + 'ip' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'int64', + 'domainName' => null, + 'authenticated' => null, + 'verified' => null, + 'ip' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'domainName' => 'domain_name', + 'authenticated' => 'authenticated', + 'verified' => 'verified', + 'ip' => 'ip' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'domainName' => 'setDomainName', + 'authenticated' => 'setAuthenticated', + 'verified' => 'setVerified', + 'ip' => 'setIp' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'domainName' => 'getDomainName', + 'authenticated' => 'getAuthenticated', + 'verified' => 'getVerified', + 'ip' => 'getIp' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['domainName'] = isset($data['domainName']) ? $data['domainName'] : null; + $this->container['authenticated'] = isset($data['authenticated']) ? $data['authenticated'] : null; + $this->container['verified'] = isset($data['verified']) ? $data['verified'] : null; + $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['domainName'] === null) { + $invalidProperties[] = "'domainName' can't be null"; + } + if ($this->container['authenticated'] === null) { + $invalidProperties[] = "'authenticated' can't be null"; + } + if ($this->container['verified'] === null) { + $invalidProperties[] = "'verified' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id Id of the domain + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets domainName + * + * @return string + */ + public function getDomainName() + { + return $this->container['domainName']; + } + + /** + * Sets domainName + * + * @param string $domainName Domain name + * + * @return $this + */ + public function setDomainName($domainName) + { + $this->container['domainName'] = $domainName; + + return $this; + } + + /** + * Gets authenticated + * + * @return bool + */ + public function getAuthenticated() + { + return $this->container['authenticated']; + } + + /** + * Sets authenticated + * + * @param bool $authenticated Status of domain authentication (true=authenticated, false=non authenticated) + * + * @return $this + */ + public function setAuthenticated($authenticated) + { + $this->container['authenticated'] = $authenticated; + + return $this; + } + + /** + * Gets verified + * + * @return bool + */ + public function getVerified() + { + return $this->container['verified']; + } + + /** + * Sets verified + * + * @param bool $verified Status of domain verification (true=verified, false=non verified) + * + * @return $this + */ + public function setVerified($verified) + { + $this->container['verified'] = $verified; + + return $this; + } + + /** + * Gets ip + * + * @return string + */ + public function getIp() + { + return $this->container['ip']; + } + + /** + * Sets ip + * + * @param string $ip Dedicated IP associated with domain + * + * @return $this + */ + public function setIp($ip) + { + $this->container['ip'] = $ip; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetEmailCampaign.php b/vendor/getbrevo/brevo-php/lib/Model/GetEmailCampaign.php new file mode 100644 index 0000000..c27c352 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetEmailCampaign.php @@ -0,0 +1,1320 @@ + 'int', + 'name' => 'string', + 'subject' => 'string', + 'type' => 'string', + 'status' => 'string', + 'scheduledAt' => 'string', + 'abTesting' => 'bool', + 'subjectA' => 'string', + 'subjectB' => 'string', + 'splitRule' => 'int', + 'winnerCriteria' => 'string', + 'winnerDelay' => 'int', + 'sendAtBestTime' => 'bool', + 'testSent' => 'bool', + 'header' => 'string', + 'footer' => 'string', + 'sender' => '\Brevo\Client\Model\GetExtendedCampaignOverviewSender', + 'replyTo' => 'string', + 'toField' => 'string', + 'htmlContent' => 'string', + 'shareLink' => 'string', + 'tag' => 'string', + 'createdAt' => 'string', + 'modifiedAt' => 'string', + 'inlineImageActivation' => 'bool', + 'mirrorActive' => 'bool', + 'recurring' => 'bool', + 'sentDate' => 'string', + 'returnBounce' => 'int', + 'recipients' => 'object', + 'statistics' => 'object' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'int64', + 'name' => null, + 'subject' => null, + 'type' => null, + 'status' => null, + 'scheduledAt' => null, + 'abTesting' => null, + 'subjectA' => null, + 'subjectB' => null, + 'splitRule' => null, + 'winnerCriteria' => null, + 'winnerDelay' => null, + 'sendAtBestTime' => null, + 'testSent' => null, + 'header' => null, + 'footer' => null, + 'sender' => null, + 'replyTo' => 'email', + 'toField' => null, + 'htmlContent' => null, + 'shareLink' => 'url', + 'tag' => null, + 'createdAt' => null, + 'modifiedAt' => null, + 'inlineImageActivation' => null, + 'mirrorActive' => null, + 'recurring' => null, + 'sentDate' => null, + 'returnBounce' => 'int64', + 'recipients' => null, + 'statistics' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'subject' => 'subject', + 'type' => 'type', + 'status' => 'status', + 'scheduledAt' => 'scheduledAt', + 'abTesting' => 'abTesting', + 'subjectA' => 'subjectA', + 'subjectB' => 'subjectB', + 'splitRule' => 'splitRule', + 'winnerCriteria' => 'winnerCriteria', + 'winnerDelay' => 'winnerDelay', + 'sendAtBestTime' => 'sendAtBestTime', + 'testSent' => 'testSent', + 'header' => 'header', + 'footer' => 'footer', + 'sender' => 'sender', + 'replyTo' => 'replyTo', + 'toField' => 'toField', + 'htmlContent' => 'htmlContent', + 'shareLink' => 'shareLink', + 'tag' => 'tag', + 'createdAt' => 'createdAt', + 'modifiedAt' => 'modifiedAt', + 'inlineImageActivation' => 'inlineImageActivation', + 'mirrorActive' => 'mirrorActive', + 'recurring' => 'recurring', + 'sentDate' => 'sentDate', + 'returnBounce' => 'returnBounce', + 'recipients' => 'recipients', + 'statistics' => 'statistics' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'subject' => 'setSubject', + 'type' => 'setType', + 'status' => 'setStatus', + 'scheduledAt' => 'setScheduledAt', + 'abTesting' => 'setAbTesting', + 'subjectA' => 'setSubjectA', + 'subjectB' => 'setSubjectB', + 'splitRule' => 'setSplitRule', + 'winnerCriteria' => 'setWinnerCriteria', + 'winnerDelay' => 'setWinnerDelay', + 'sendAtBestTime' => 'setSendAtBestTime', + 'testSent' => 'setTestSent', + 'header' => 'setHeader', + 'footer' => 'setFooter', + 'sender' => 'setSender', + 'replyTo' => 'setReplyTo', + 'toField' => 'setToField', + 'htmlContent' => 'setHtmlContent', + 'shareLink' => 'setShareLink', + 'tag' => 'setTag', + 'createdAt' => 'setCreatedAt', + 'modifiedAt' => 'setModifiedAt', + 'inlineImageActivation' => 'setInlineImageActivation', + 'mirrorActive' => 'setMirrorActive', + 'recurring' => 'setRecurring', + 'sentDate' => 'setSentDate', + 'returnBounce' => 'setReturnBounce', + 'recipients' => 'setRecipients', + 'statistics' => 'setStatistics' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'subject' => 'getSubject', + 'type' => 'getType', + 'status' => 'getStatus', + 'scheduledAt' => 'getScheduledAt', + 'abTesting' => 'getAbTesting', + 'subjectA' => 'getSubjectA', + 'subjectB' => 'getSubjectB', + 'splitRule' => 'getSplitRule', + 'winnerCriteria' => 'getWinnerCriteria', + 'winnerDelay' => 'getWinnerDelay', + 'sendAtBestTime' => 'getSendAtBestTime', + 'testSent' => 'getTestSent', + 'header' => 'getHeader', + 'footer' => 'getFooter', + 'sender' => 'getSender', + 'replyTo' => 'getReplyTo', + 'toField' => 'getToField', + 'htmlContent' => 'getHtmlContent', + 'shareLink' => 'getShareLink', + 'tag' => 'getTag', + 'createdAt' => 'getCreatedAt', + 'modifiedAt' => 'getModifiedAt', + 'inlineImageActivation' => 'getInlineImageActivation', + 'mirrorActive' => 'getMirrorActive', + 'recurring' => 'getRecurring', + 'sentDate' => 'getSentDate', + 'returnBounce' => 'getReturnBounce', + 'recipients' => 'getRecipients', + 'statistics' => 'getStatistics' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const TYPE_CLASSIC = 'classic'; + const TYPE_TRIGGER = 'trigger'; + const STATUS_DRAFT = 'draft'; + const STATUS_SENT = 'sent'; + const STATUS_ARCHIVE = 'archive'; + const STATUS_QUEUED = 'queued'; + const STATUS_SUSPENDED = 'suspended'; + const STATUS_IN_PROCESS = 'in_process'; + + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_CLASSIC, + self::TYPE_TRIGGER, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_DRAFT, + self::STATUS_SENT, + self::STATUS_ARCHIVE, + self::STATUS_QUEUED, + self::STATUS_SUSPENDED, + self::STATUS_IN_PROCESS, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['subject'] = isset($data['subject']) ? $data['subject'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['scheduledAt'] = isset($data['scheduledAt']) ? $data['scheduledAt'] : null; + $this->container['abTesting'] = isset($data['abTesting']) ? $data['abTesting'] : null; + $this->container['subjectA'] = isset($data['subjectA']) ? $data['subjectA'] : null; + $this->container['subjectB'] = isset($data['subjectB']) ? $data['subjectB'] : null; + $this->container['splitRule'] = isset($data['splitRule']) ? $data['splitRule'] : null; + $this->container['winnerCriteria'] = isset($data['winnerCriteria']) ? $data['winnerCriteria'] : null; + $this->container['winnerDelay'] = isset($data['winnerDelay']) ? $data['winnerDelay'] : null; + $this->container['sendAtBestTime'] = isset($data['sendAtBestTime']) ? $data['sendAtBestTime'] : null; + $this->container['testSent'] = isset($data['testSent']) ? $data['testSent'] : null; + $this->container['header'] = isset($data['header']) ? $data['header'] : null; + $this->container['footer'] = isset($data['footer']) ? $data['footer'] : null; + $this->container['sender'] = isset($data['sender']) ? $data['sender'] : null; + $this->container['replyTo'] = isset($data['replyTo']) ? $data['replyTo'] : null; + $this->container['toField'] = isset($data['toField']) ? $data['toField'] : null; + $this->container['htmlContent'] = isset($data['htmlContent']) ? $data['htmlContent'] : null; + $this->container['shareLink'] = isset($data['shareLink']) ? $data['shareLink'] : null; + $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; + $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; + $this->container['modifiedAt'] = isset($data['modifiedAt']) ? $data['modifiedAt'] : null; + $this->container['inlineImageActivation'] = isset($data['inlineImageActivation']) ? $data['inlineImageActivation'] : null; + $this->container['mirrorActive'] = isset($data['mirrorActive']) ? $data['mirrorActive'] : null; + $this->container['recurring'] = isset($data['recurring']) ? $data['recurring'] : null; + $this->container['sentDate'] = isset($data['sentDate']) ? $data['sentDate'] : null; + $this->container['returnBounce'] = isset($data['returnBounce']) ? $data['returnBounce'] : null; + $this->container['recipients'] = isset($data['recipients']) ? $data['recipients'] : null; + $this->container['statistics'] = isset($data['statistics']) ? $data['statistics'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'status', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['testSent'] === null) { + $invalidProperties[] = "'testSent' can't be null"; + } + if ($this->container['header'] === null) { + $invalidProperties[] = "'header' can't be null"; + } + if ($this->container['footer'] === null) { + $invalidProperties[] = "'footer' can't be null"; + } + if ($this->container['sender'] === null) { + $invalidProperties[] = "'sender' can't be null"; + } + if ($this->container['replyTo'] === null) { + $invalidProperties[] = "'replyTo' can't be null"; + } + if ($this->container['htmlContent'] === null) { + $invalidProperties[] = "'htmlContent' can't be null"; + } + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + if ($this->container['modifiedAt'] === null) { + $invalidProperties[] = "'modifiedAt' can't be null"; + } + if ($this->container['recipients'] === null) { + $invalidProperties[] = "'recipients' can't be null"; + } + if ($this->container['statistics'] === null) { + $invalidProperties[] = "'statistics' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id ID of the campaign + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the campaign + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets subject + * + * @return string + */ + public function getSubject() + { + return $this->container['subject']; + } + + /** + * Sets subject + * + * @param string $subject Subject of the campaign. Only available if `abTesting` flag of the campaign is `false` + * + * @return $this + */ + public function setSubject($subject) + { + $this->container['subject'] = $subject; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Type of campaign + * + * @return $this + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status Status of the campaign + * + * @return $this + */ + public function setStatus($status) + { + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'status', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets scheduledAt + * + * @return string + */ + public function getScheduledAt() + { + return $this->container['scheduledAt']; + } + + /** + * Sets scheduledAt + * + * @param string $scheduledAt UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ) + * + * @return $this + */ + public function setScheduledAt($scheduledAt) + { + $this->container['scheduledAt'] = $scheduledAt; + + return $this; + } + + /** + * Gets abTesting + * + * @return bool + */ + public function getAbTesting() + { + return $this->container['abTesting']; + } + + /** + * Sets abTesting + * + * @param bool $abTesting Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled. + * + * @return $this + */ + public function setAbTesting($abTesting) + { + $this->container['abTesting'] = $abTesting; + + return $this; + } + + /** + * Gets subjectA + * + * @return string + */ + public function getSubjectA() + { + return $this->container['subjectA']; + } + + /** + * Sets subjectA + * + * @param string $subjectA Subject A of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` + * + * @return $this + */ + public function setSubjectA($subjectA) + { + $this->container['subjectA'] = $subjectA; + + return $this; + } + + /** + * Gets subjectB + * + * @return string + */ + public function getSubjectB() + { + return $this->container['subjectB']; + } + + /** + * Sets subjectB + * + * @param string $subjectB Subject B of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` + * + * @return $this + */ + public function setSubjectB($subjectB) + { + $this->container['subjectB'] = $subjectB; + + return $this; + } + + /** + * Gets splitRule + * + * @return int + */ + public function getSplitRule() + { + return $this->container['splitRule']; + } + + /** + * Sets splitRule + * + * @param int $splitRule The size of your ab-test groups. Only available if `abTesting` flag of the campaign is `true` + * + * @return $this + */ + public function setSplitRule($splitRule) + { + $this->container['splitRule'] = $splitRule; + + return $this; + } + + /** + * Gets winnerCriteria + * + * @return string + */ + public function getWinnerCriteria() + { + return $this->container['winnerCriteria']; + } + + /** + * Sets winnerCriteria + * + * @param string $winnerCriteria Criteria for the winning version. Only available if `abTesting` flag of the campaign is `true` + * + * @return $this + */ + public function setWinnerCriteria($winnerCriteria) + { + $this->container['winnerCriteria'] = $winnerCriteria; + + return $this; + } + + /** + * Gets winnerDelay + * + * @return int + */ + public function getWinnerDelay() + { + return $this->container['winnerDelay']; + } + + /** + * Sets winnerDelay + * + * @param int $winnerDelay The duration of the test in hours at the end of which the winning version will be sent. Only available if `abTesting` flag of the campaign is `true` + * + * @return $this + */ + public function setWinnerDelay($winnerDelay) + { + $this->container['winnerDelay'] = $winnerDelay; + + return $this; + } + + /** + * Gets sendAtBestTime + * + * @return bool + */ + public function getSendAtBestTime() + { + return $this->container['sendAtBestTime']; + } + + /** + * Sets sendAtBestTime + * + * @param bool $sendAtBestTime It is true if you have chosen to send your campaign at best time, otherwise it is false + * + * @return $this + */ + public function setSendAtBestTime($sendAtBestTime) + { + $this->container['sendAtBestTime'] = $sendAtBestTime; + + return $this; + } + + /** + * Gets testSent + * + * @return bool + */ + public function getTestSent() + { + return $this->container['testSent']; + } + + /** + * Sets testSent + * + * @param bool $testSent Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent) + * + * @return $this + */ + public function setTestSent($testSent) + { + $this->container['testSent'] = $testSent; + + return $this; + } + + /** + * Gets header + * + * @return string + */ + public function getHeader() + { + return $this->container['header']; + } + + /** + * Sets header + * + * @param string $header Header of the campaign + * + * @return $this + */ + public function setHeader($header) + { + $this->container['header'] = $header; + + return $this; + } + + /** + * Gets footer + * + * @return string + */ + public function getFooter() + { + return $this->container['footer']; + } + + /** + * Sets footer + * + * @param string $footer Footer of the campaign + * + * @return $this + */ + public function setFooter($footer) + { + $this->container['footer'] = $footer; + + return $this; + } + + /** + * Gets sender + * + * @return \Brevo\Client\Model\GetExtendedCampaignOverviewSender + */ + public function getSender() + { + return $this->container['sender']; + } + + /** + * Sets sender + * + * @param \Brevo\Client\Model\GetExtendedCampaignOverviewSender $sender sender + * + * @return $this + */ + public function setSender($sender) + { + $this->container['sender'] = $sender; + + return $this; + } + + /** + * Gets replyTo + * + * @return string + */ + public function getReplyTo() + { + return $this->container['replyTo']; + } + + /** + * Sets replyTo + * + * @param string $replyTo Email defined as the \"Reply to\" of the campaign + * + * @return $this + */ + public function setReplyTo($replyTo) + { + $this->container['replyTo'] = $replyTo; + + return $this; + } + + /** + * Gets toField + * + * @return string + */ + public function getToField() + { + return $this->container['toField']; + } + + /** + * Sets toField + * + * @param string $toField Customisation of the \"to\" field of the campaign + * + * @return $this + */ + public function setToField($toField) + { + $this->container['toField'] = $toField; + + return $this; + } + + /** + * Gets htmlContent + * + * @return string + */ + public function getHtmlContent() + { + return $this->container['htmlContent']; + } + + /** + * Sets htmlContent + * + * @param string $htmlContent HTML content of the campaign + * + * @return $this + */ + public function setHtmlContent($htmlContent) + { + $this->container['htmlContent'] = $htmlContent; + + return $this; + } + + /** + * Gets shareLink + * + * @return string + */ + public function getShareLink() + { + return $this->container['shareLink']; + } + + /** + * Sets shareLink + * + * @param string $shareLink Link to share the campaign on social medias + * + * @return $this + */ + public function setShareLink($shareLink) + { + $this->container['shareLink'] = $shareLink; + + return $this; + } + + /** + * Gets tag + * + * @return string + */ + public function getTag() + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string $tag Tag of the campaign + * + * @return $this + */ + public function setTag($tag) + { + $this->container['tag'] = $tag; + + return $this; + } + + /** + * Gets createdAt + * + * @return string + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param string $createdAt Creation UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + * + * @return $this + */ + public function setCreatedAt($createdAt) + { + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets modifiedAt + * + * @return string + */ + public function getModifiedAt() + { + return $this->container['modifiedAt']; + } + + /** + * Sets modifiedAt + * + * @param string $modifiedAt UTC date-time of last modification of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + * + * @return $this + */ + public function setModifiedAt($modifiedAt) + { + $this->container['modifiedAt'] = $modifiedAt; + + return $this; + } + + /** + * Gets inlineImageActivation + * + * @return bool + */ + public function getInlineImageActivation() + { + return $this->container['inlineImageActivation']; + } + + /** + * Sets inlineImageActivation + * + * @param bool $inlineImageActivation Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. + * + * @return $this + */ + public function setInlineImageActivation($inlineImageActivation) + { + $this->container['inlineImageActivation'] = $inlineImageActivation; + + return $this; + } + + /** + * Gets mirrorActive + * + * @return bool + */ + public function getMirrorActive() + { + return $this->container['mirrorActive']; + } + + /** + * Sets mirrorActive + * + * @param bool $mirrorActive Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign + * + * @return $this + */ + public function setMirrorActive($mirrorActive) + { + $this->container['mirrorActive'] = $mirrorActive; + + return $this; + } + + /** + * Gets recurring + * + * @return bool + */ + public function getRecurring() + { + return $this->container['recurring']; + } + + /** + * Sets recurring + * + * @param bool $recurring 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 + * + * @return $this + */ + public function setRecurring($recurring) + { + $this->container['recurring'] = $recurring; + + return $this; + } + + /** + * Gets sentDate + * + * @return string + */ + public function getSentDate() + { + return $this->container['sentDate']; + } + + /** + * Sets sentDate + * + * @param string $sentDate Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent' + * + * @return $this + */ + public function setSentDate($sentDate) + { + $this->container['sentDate'] = $sentDate; + + return $this; + } + + /** + * Gets returnBounce + * + * @return int + */ + public function getReturnBounce() + { + return $this->container['returnBounce']; + } + + /** + * Sets returnBounce + * + * @param int $returnBounce Total number of non-delivered campaigns for a particular campaign id. + * + * @return $this + */ + public function setReturnBounce($returnBounce) + { + $this->container['returnBounce'] = $returnBounce; + + return $this; + } + + /** + * Gets recipients + * + * @return object + */ + public function getRecipients() + { + return $this->container['recipients']; + } + + /** + * Sets recipients + * + * @param object $recipients recipients + * + * @return $this + */ + public function setRecipients($recipients) + { + $this->container['recipients'] = $recipients; + + return $this; + } + + /** + * Gets statistics + * + * @return object + */ + public function getStatistics() + { + return $this->container['statistics']; + } + + /** + * Sets statistics + * + * @param object $statistics statistics + * + * @return $this + */ + public function setStatistics($statistics) + { + $this->container['statistics'] = $statistics; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetEmailCampaigns.php b/vendor/getbrevo/brevo-php/lib/Model/GetEmailCampaigns.php new file mode 100644 index 0000000..9f624c5 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetEmailCampaigns.php @@ -0,0 +1,335 @@ + 'object[]', + 'count' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'campaigns' => null, + 'count' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'campaigns' => 'campaigns', + 'count' => 'count' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'campaigns' => 'setCampaigns', + 'count' => 'setCount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'campaigns' => 'getCampaigns', + 'count' => 'getCount' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['campaigns'] = isset($data['campaigns']) ? $data['campaigns'] : null; + $this->container['count'] = isset($data['count']) ? $data['count'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets campaigns + * + * @return object[] + */ + public function getCampaigns() + { + return $this->container['campaigns']; + } + + /** + * Sets campaigns + * + * @param object[] $campaigns campaigns + * + * @return $this + */ + public function setCampaigns($campaigns) + { + $this->container['campaigns'] = $campaigns; + + return $this; + } + + /** + * Gets count + * + * @return int + */ + public function getCount() + { + return $this->container['count']; + } + + /** + * Sets count + * + * @param int $count Number of Email campaigns retrieved + * + * @return $this + */ + public function setCount($count) + { + $this->container['count'] = $count; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetEmailEventReport.php b/vendor/getbrevo/brevo-php/lib/Model/GetEmailEventReport.php new file mode 100644 index 0000000..47d443e --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetEmailEventReport.php @@ -0,0 +1,305 @@ + '\Brevo\Client\Model\GetEmailEventReportEvents[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'events' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'events' => 'events' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'events' => 'setEvents' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'events' => 'getEvents' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['events'] = isset($data['events']) ? $data['events'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets events + * + * @return \Brevo\Client\Model\GetEmailEventReportEvents[] + */ + public function getEvents() + { + return $this->container['events']; + } + + /** + * Sets events + * + * @param \Brevo\Client\Model\GetEmailEventReportEvents[] $events events + * + * @return $this + */ + public function setEvents($events) + { + $this->container['events'] = $events; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetEmailEventReportEvents.php b/vendor/getbrevo/brevo-php/lib/Model/GetEmailEventReportEvents.php new file mode 100644 index 0000000..ccaef2f --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetEmailEventReportEvents.php @@ -0,0 +1,673 @@ + 'string', + 'date' => 'string', + 'subject' => 'string', + 'messageId' => 'string', + 'event' => 'string', + 'reason' => 'string', + 'tag' => 'string', + 'ip' => 'string', + 'link' => 'string', + 'from' => 'string', + 'templateId' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'email' => 'email', + 'date' => null, + 'subject' => null, + 'messageId' => null, + 'event' => null, + 'reason' => null, + 'tag' => null, + 'ip' => null, + 'link' => null, + 'from' => 'email', + 'templateId' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'email' => 'email', + 'date' => 'date', + 'subject' => 'subject', + 'messageId' => 'messageId', + 'event' => 'event', + 'reason' => 'reason', + 'tag' => 'tag', + 'ip' => 'ip', + 'link' => 'link', + 'from' => 'from', + 'templateId' => 'templateId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'email' => 'setEmail', + 'date' => 'setDate', + 'subject' => 'setSubject', + 'messageId' => 'setMessageId', + 'event' => 'setEvent', + 'reason' => 'setReason', + 'tag' => 'setTag', + 'ip' => 'setIp', + 'link' => 'setLink', + 'from' => 'setFrom', + 'templateId' => 'setTemplateId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'email' => 'getEmail', + 'date' => 'getDate', + 'subject' => 'getSubject', + 'messageId' => 'getMessageId', + 'event' => 'getEvent', + 'reason' => 'getReason', + 'tag' => 'getTag', + 'ip' => 'getIp', + 'link' => 'getLink', + 'from' => 'getFrom', + 'templateId' => 'getTemplateId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const EVENT_BOUNCES = 'bounces'; + const EVENT_HARD_BOUNCES = 'hardBounces'; + const EVENT_SOFT_BOUNCES = 'softBounces'; + const EVENT_DELIVERED = 'delivered'; + const EVENT_SPAM = 'spam'; + const EVENT_REQUESTS = 'requests'; + const EVENT_OPENED = 'opened'; + const EVENT_CLICKS = 'clicks'; + const EVENT_INVALID = 'invalid'; + const EVENT_DEFERRED = 'deferred'; + const EVENT_BLOCKED = 'blocked'; + const EVENT_UNSUBSCRIBED = 'unsubscribed'; + const EVENT_ERROR = 'error'; + const EVENT_LOADED_BY_PROXY = 'loadedByProxy'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getEventAllowableValues() + { + return [ + self::EVENT_BOUNCES, + self::EVENT_HARD_BOUNCES, + self::EVENT_SOFT_BOUNCES, + self::EVENT_DELIVERED, + self::EVENT_SPAM, + self::EVENT_REQUESTS, + self::EVENT_OPENED, + self::EVENT_CLICKS, + self::EVENT_INVALID, + self::EVENT_DEFERRED, + self::EVENT_BLOCKED, + self::EVENT_UNSUBSCRIBED, + self::EVENT_ERROR, + self::EVENT_LOADED_BY_PROXY, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['date'] = isset($data['date']) ? $data['date'] : null; + $this->container['subject'] = isset($data['subject']) ? $data['subject'] : null; + $this->container['messageId'] = isset($data['messageId']) ? $data['messageId'] : null; + $this->container['event'] = isset($data['event']) ? $data['event'] : null; + $this->container['reason'] = isset($data['reason']) ? $data['reason'] : null; + $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; + $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; + $this->container['link'] = isset($data['link']) ? $data['link'] : null; + $this->container['from'] = isset($data['from']) ? $data['from'] : null; + $this->container['templateId'] = isset($data['templateId']) ? $data['templateId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + if ($this->container['date'] === null) { + $invalidProperties[] = "'date' can't be null"; + } + if ($this->container['messageId'] === null) { + $invalidProperties[] = "'messageId' can't be null"; + } + if ($this->container['event'] === null) { + $invalidProperties[] = "'event' can't be null"; + } + $allowedValues = $this->getEventAllowableValues(); + if (!is_null($this->container['event']) && !in_array($this->container['event'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'event', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email Email address which generates the event + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets date + * + * @return string + */ + public function getDate() + { + return $this->container['date']; + } + + /** + * Sets date + * + * @param string $date UTC date-time on which the event has been generated + * + * @return $this + */ + public function setDate($date) + { + $this->container['date'] = $date; + + return $this; + } + + /** + * Gets subject + * + * @return string + */ + public function getSubject() + { + return $this->container['subject']; + } + + /** + * Sets subject + * + * @param string $subject Subject of the event + * + * @return $this + */ + public function setSubject($subject) + { + $this->container['subject'] = $subject; + + return $this; + } + + /** + * Gets messageId + * + * @return string + */ + public function getMessageId() + { + return $this->container['messageId']; + } + + /** + * Sets messageId + * + * @param string $messageId Message ID which generated the event + * + * @return $this + */ + public function setMessageId($messageId) + { + $this->container['messageId'] = $messageId; + + return $this; + } + + /** + * Gets event + * + * @return string + */ + public function getEvent() + { + return $this->container['event']; + } + + /** + * Sets event + * + * @param string $event Event which occurred + * + * @return $this + */ + public function setEvent($event) + { + $allowedValues = $this->getEventAllowableValues(); + if (!in_array($event, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'event', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['event'] = $event; + + return $this; + } + + /** + * Gets reason + * + * @return string + */ + public function getReason() + { + return $this->container['reason']; + } + + /** + * Sets reason + * + * @param string $reason Reason of bounce (only available if the event is hardbounce or softbounce) + * + * @return $this + */ + public function setReason($reason) + { + $this->container['reason'] = $reason; + + return $this; + } + + /** + * Gets tag + * + * @return string + */ + public function getTag() + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string $tag Tag of the email which generated the event + * + * @return $this + */ + public function setTag($tag) + { + $this->container['tag'] = $tag; + + return $this; + } + + /** + * Gets ip + * + * @return string + */ + public function getIp() + { + return $this->container['ip']; + } + + /** + * Sets ip + * + * @param string $ip IP from which the user has opened the email or clicked on the link (only available if the event is opened or clicks) + * + * @return $this + */ + public function setIp($ip) + { + $this->container['ip'] = $ip; + + return $this; + } + + /** + * Gets link + * + * @return string + */ + public function getLink() + { + return $this->container['link']; + } + + /** + * Sets link + * + * @param string $link The link which is sent to the user (only available if the event is requests or opened or clicks) + * + * @return $this + */ + public function setLink($link) + { + $this->container['link'] = $link; + + return $this; + } + + /** + * Gets from + * + * @return string + */ + public function getFrom() + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param string $from Sender email from which the emails are sent + * + * @return $this + */ + public function setFrom($from) + { + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets templateId + * + * @return int + */ + public function getTemplateId() + { + return $this->container['templateId']; + } + + /** + * Sets templateId + * + * @param int $templateId ID of the template (only available if the email is template based) + * + * @return $this + */ + public function setTemplateId($templateId) + { + $this->container['templateId'] = $templateId; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetExtendedCampaignOverview.php b/vendor/getbrevo/brevo-php/lib/Model/GetExtendedCampaignOverview.php new file mode 100644 index 0000000..cd7b110 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetExtendedCampaignOverview.php @@ -0,0 +1,1254 @@ + 'int', + 'name' => 'string', + 'subject' => 'string', + 'type' => 'string', + 'status' => 'string', + 'scheduledAt' => 'string', + 'abTesting' => 'bool', + 'subjectA' => 'string', + 'subjectB' => 'string', + 'splitRule' => 'int', + 'winnerCriteria' => 'string', + 'winnerDelay' => 'int', + 'sendAtBestTime' => 'bool', + 'testSent' => 'bool', + 'header' => 'string', + 'footer' => 'string', + 'sender' => '\Brevo\Client\Model\GetExtendedCampaignOverviewSender', + 'replyTo' => 'string', + 'toField' => 'string', + 'htmlContent' => 'string', + 'shareLink' => 'string', + 'tag' => 'string', + 'createdAt' => 'string', + 'modifiedAt' => 'string', + 'inlineImageActivation' => 'bool', + 'mirrorActive' => 'bool', + 'recurring' => 'bool', + 'sentDate' => 'string', + 'returnBounce' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'int64', + 'name' => null, + 'subject' => null, + 'type' => null, + 'status' => null, + 'scheduledAt' => null, + 'abTesting' => null, + 'subjectA' => null, + 'subjectB' => null, + 'splitRule' => null, + 'winnerCriteria' => null, + 'winnerDelay' => null, + 'sendAtBestTime' => null, + 'testSent' => null, + 'header' => null, + 'footer' => null, + 'sender' => null, + 'replyTo' => 'email', + 'toField' => null, + 'htmlContent' => null, + 'shareLink' => 'url', + 'tag' => null, + 'createdAt' => null, + 'modifiedAt' => null, + 'inlineImageActivation' => null, + 'mirrorActive' => null, + 'recurring' => null, + 'sentDate' => null, + 'returnBounce' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'subject' => 'subject', + 'type' => 'type', + 'status' => 'status', + 'scheduledAt' => 'scheduledAt', + 'abTesting' => 'abTesting', + 'subjectA' => 'subjectA', + 'subjectB' => 'subjectB', + 'splitRule' => 'splitRule', + 'winnerCriteria' => 'winnerCriteria', + 'winnerDelay' => 'winnerDelay', + 'sendAtBestTime' => 'sendAtBestTime', + 'testSent' => 'testSent', + 'header' => 'header', + 'footer' => 'footer', + 'sender' => 'sender', + 'replyTo' => 'replyTo', + 'toField' => 'toField', + 'htmlContent' => 'htmlContent', + 'shareLink' => 'shareLink', + 'tag' => 'tag', + 'createdAt' => 'createdAt', + 'modifiedAt' => 'modifiedAt', + 'inlineImageActivation' => 'inlineImageActivation', + 'mirrorActive' => 'mirrorActive', + 'recurring' => 'recurring', + 'sentDate' => 'sentDate', + 'returnBounce' => 'returnBounce' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'subject' => 'setSubject', + 'type' => 'setType', + 'status' => 'setStatus', + 'scheduledAt' => 'setScheduledAt', + 'abTesting' => 'setAbTesting', + 'subjectA' => 'setSubjectA', + 'subjectB' => 'setSubjectB', + 'splitRule' => 'setSplitRule', + 'winnerCriteria' => 'setWinnerCriteria', + 'winnerDelay' => 'setWinnerDelay', + 'sendAtBestTime' => 'setSendAtBestTime', + 'testSent' => 'setTestSent', + 'header' => 'setHeader', + 'footer' => 'setFooter', + 'sender' => 'setSender', + 'replyTo' => 'setReplyTo', + 'toField' => 'setToField', + 'htmlContent' => 'setHtmlContent', + 'shareLink' => 'setShareLink', + 'tag' => 'setTag', + 'createdAt' => 'setCreatedAt', + 'modifiedAt' => 'setModifiedAt', + 'inlineImageActivation' => 'setInlineImageActivation', + 'mirrorActive' => 'setMirrorActive', + 'recurring' => 'setRecurring', + 'sentDate' => 'setSentDate', + 'returnBounce' => 'setReturnBounce' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'subject' => 'getSubject', + 'type' => 'getType', + 'status' => 'getStatus', + 'scheduledAt' => 'getScheduledAt', + 'abTesting' => 'getAbTesting', + 'subjectA' => 'getSubjectA', + 'subjectB' => 'getSubjectB', + 'splitRule' => 'getSplitRule', + 'winnerCriteria' => 'getWinnerCriteria', + 'winnerDelay' => 'getWinnerDelay', + 'sendAtBestTime' => 'getSendAtBestTime', + 'testSent' => 'getTestSent', + 'header' => 'getHeader', + 'footer' => 'getFooter', + 'sender' => 'getSender', + 'replyTo' => 'getReplyTo', + 'toField' => 'getToField', + 'htmlContent' => 'getHtmlContent', + 'shareLink' => 'getShareLink', + 'tag' => 'getTag', + 'createdAt' => 'getCreatedAt', + 'modifiedAt' => 'getModifiedAt', + 'inlineImageActivation' => 'getInlineImageActivation', + 'mirrorActive' => 'getMirrorActive', + 'recurring' => 'getRecurring', + 'sentDate' => 'getSentDate', + 'returnBounce' => 'getReturnBounce' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const TYPE_CLASSIC = 'classic'; + const TYPE_TRIGGER = 'trigger'; + const STATUS_DRAFT = 'draft'; + const STATUS_SENT = 'sent'; + const STATUS_ARCHIVE = 'archive'; + const STATUS_QUEUED = 'queued'; + const STATUS_SUSPENDED = 'suspended'; + const STATUS_IN_PROCESS = 'in_process'; + + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_CLASSIC, + self::TYPE_TRIGGER, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_DRAFT, + self::STATUS_SENT, + self::STATUS_ARCHIVE, + self::STATUS_QUEUED, + self::STATUS_SUSPENDED, + self::STATUS_IN_PROCESS, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['subject'] = isset($data['subject']) ? $data['subject'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['scheduledAt'] = isset($data['scheduledAt']) ? $data['scheduledAt'] : null; + $this->container['abTesting'] = isset($data['abTesting']) ? $data['abTesting'] : null; + $this->container['subjectA'] = isset($data['subjectA']) ? $data['subjectA'] : null; + $this->container['subjectB'] = isset($data['subjectB']) ? $data['subjectB'] : null; + $this->container['splitRule'] = isset($data['splitRule']) ? $data['splitRule'] : null; + $this->container['winnerCriteria'] = isset($data['winnerCriteria']) ? $data['winnerCriteria'] : null; + $this->container['winnerDelay'] = isset($data['winnerDelay']) ? $data['winnerDelay'] : null; + $this->container['sendAtBestTime'] = isset($data['sendAtBestTime']) ? $data['sendAtBestTime'] : null; + $this->container['testSent'] = isset($data['testSent']) ? $data['testSent'] : null; + $this->container['header'] = isset($data['header']) ? $data['header'] : null; + $this->container['footer'] = isset($data['footer']) ? $data['footer'] : null; + $this->container['sender'] = isset($data['sender']) ? $data['sender'] : null; + $this->container['replyTo'] = isset($data['replyTo']) ? $data['replyTo'] : null; + $this->container['toField'] = isset($data['toField']) ? $data['toField'] : null; + $this->container['htmlContent'] = isset($data['htmlContent']) ? $data['htmlContent'] : null; + $this->container['shareLink'] = isset($data['shareLink']) ? $data['shareLink'] : null; + $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; + $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; + $this->container['modifiedAt'] = isset($data['modifiedAt']) ? $data['modifiedAt'] : null; + $this->container['inlineImageActivation'] = isset($data['inlineImageActivation']) ? $data['inlineImageActivation'] : null; + $this->container['mirrorActive'] = isset($data['mirrorActive']) ? $data['mirrorActive'] : null; + $this->container['recurring'] = isset($data['recurring']) ? $data['recurring'] : null; + $this->container['sentDate'] = isset($data['sentDate']) ? $data['sentDate'] : null; + $this->container['returnBounce'] = isset($data['returnBounce']) ? $data['returnBounce'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'status', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['testSent'] === null) { + $invalidProperties[] = "'testSent' can't be null"; + } + if ($this->container['header'] === null) { + $invalidProperties[] = "'header' can't be null"; + } + if ($this->container['footer'] === null) { + $invalidProperties[] = "'footer' can't be null"; + } + if ($this->container['sender'] === null) { + $invalidProperties[] = "'sender' can't be null"; + } + if ($this->container['replyTo'] === null) { + $invalidProperties[] = "'replyTo' can't be null"; + } + if ($this->container['htmlContent'] === null) { + $invalidProperties[] = "'htmlContent' can't be null"; + } + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + if ($this->container['modifiedAt'] === null) { + $invalidProperties[] = "'modifiedAt' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id ID of the campaign + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the campaign + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets subject + * + * @return string + */ + public function getSubject() + { + return $this->container['subject']; + } + + /** + * Sets subject + * + * @param string $subject Subject of the campaign. Only available if `abTesting` flag of the campaign is `false` + * + * @return $this + */ + public function setSubject($subject) + { + $this->container['subject'] = $subject; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Type of campaign + * + * @return $this + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status Status of the campaign + * + * @return $this + */ + public function setStatus($status) + { + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'status', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets scheduledAt + * + * @return string + */ + public function getScheduledAt() + { + return $this->container['scheduledAt']; + } + + /** + * Sets scheduledAt + * + * @param string $scheduledAt UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ) + * + * @return $this + */ + public function setScheduledAt($scheduledAt) + { + $this->container['scheduledAt'] = $scheduledAt; + + return $this; + } + + /** + * Gets abTesting + * + * @return bool + */ + public function getAbTesting() + { + return $this->container['abTesting']; + } + + /** + * Sets abTesting + * + * @param bool $abTesting Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled. + * + * @return $this + */ + public function setAbTesting($abTesting) + { + $this->container['abTesting'] = $abTesting; + + return $this; + } + + /** + * Gets subjectA + * + * @return string + */ + public function getSubjectA() + { + return $this->container['subjectA']; + } + + /** + * Sets subjectA + * + * @param string $subjectA Subject A of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` + * + * @return $this + */ + public function setSubjectA($subjectA) + { + $this->container['subjectA'] = $subjectA; + + return $this; + } + + /** + * Gets subjectB + * + * @return string + */ + public function getSubjectB() + { + return $this->container['subjectB']; + } + + /** + * Sets subjectB + * + * @param string $subjectB Subject B of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` + * + * @return $this + */ + public function setSubjectB($subjectB) + { + $this->container['subjectB'] = $subjectB; + + return $this; + } + + /** + * Gets splitRule + * + * @return int + */ + public function getSplitRule() + { + return $this->container['splitRule']; + } + + /** + * Sets splitRule + * + * @param int $splitRule The size of your ab-test groups. Only available if `abTesting` flag of the campaign is `true` + * + * @return $this + */ + public function setSplitRule($splitRule) + { + $this->container['splitRule'] = $splitRule; + + return $this; + } + + /** + * Gets winnerCriteria + * + * @return string + */ + public function getWinnerCriteria() + { + return $this->container['winnerCriteria']; + } + + /** + * Sets winnerCriteria + * + * @param string $winnerCriteria Criteria for the winning version. Only available if `abTesting` flag of the campaign is `true` + * + * @return $this + */ + public function setWinnerCriteria($winnerCriteria) + { + $this->container['winnerCriteria'] = $winnerCriteria; + + return $this; + } + + /** + * Gets winnerDelay + * + * @return int + */ + public function getWinnerDelay() + { + return $this->container['winnerDelay']; + } + + /** + * Sets winnerDelay + * + * @param int $winnerDelay The duration of the test in hours at the end of which the winning version will be sent. Only available if `abTesting` flag of the campaign is `true` + * + * @return $this + */ + public function setWinnerDelay($winnerDelay) + { + $this->container['winnerDelay'] = $winnerDelay; + + return $this; + } + + /** + * Gets sendAtBestTime + * + * @return bool + */ + public function getSendAtBestTime() + { + return $this->container['sendAtBestTime']; + } + + /** + * Sets sendAtBestTime + * + * @param bool $sendAtBestTime It is true if you have chosen to send your campaign at best time, otherwise it is false + * + * @return $this + */ + public function setSendAtBestTime($sendAtBestTime) + { + $this->container['sendAtBestTime'] = $sendAtBestTime; + + return $this; + } + + /** + * Gets testSent + * + * @return bool + */ + public function getTestSent() + { + return $this->container['testSent']; + } + + /** + * Sets testSent + * + * @param bool $testSent Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent) + * + * @return $this + */ + public function setTestSent($testSent) + { + $this->container['testSent'] = $testSent; + + return $this; + } + + /** + * Gets header + * + * @return string + */ + public function getHeader() + { + return $this->container['header']; + } + + /** + * Sets header + * + * @param string $header Header of the campaign + * + * @return $this + */ + public function setHeader($header) + { + $this->container['header'] = $header; + + return $this; + } + + /** + * Gets footer + * + * @return string + */ + public function getFooter() + { + return $this->container['footer']; + } + + /** + * Sets footer + * + * @param string $footer Footer of the campaign + * + * @return $this + */ + public function setFooter($footer) + { + $this->container['footer'] = $footer; + + return $this; + } + + /** + * Gets sender + * + * @return \Brevo\Client\Model\GetExtendedCampaignOverviewSender + */ + public function getSender() + { + return $this->container['sender']; + } + + /** + * Sets sender + * + * @param \Brevo\Client\Model\GetExtendedCampaignOverviewSender $sender sender + * + * @return $this + */ + public function setSender($sender) + { + $this->container['sender'] = $sender; + + return $this; + } + + /** + * Gets replyTo + * + * @return string + */ + public function getReplyTo() + { + return $this->container['replyTo']; + } + + /** + * Sets replyTo + * + * @param string $replyTo Email defined as the \"Reply to\" of the campaign + * + * @return $this + */ + public function setReplyTo($replyTo) + { + $this->container['replyTo'] = $replyTo; + + return $this; + } + + /** + * Gets toField + * + * @return string + */ + public function getToField() + { + return $this->container['toField']; + } + + /** + * Sets toField + * + * @param string $toField Customisation of the \"to\" field of the campaign + * + * @return $this + */ + public function setToField($toField) + { + $this->container['toField'] = $toField; + + return $this; + } + + /** + * Gets htmlContent + * + * @return string + */ + public function getHtmlContent() + { + return $this->container['htmlContent']; + } + + /** + * Sets htmlContent + * + * @param string $htmlContent HTML content of the campaign + * + * @return $this + */ + public function setHtmlContent($htmlContent) + { + $this->container['htmlContent'] = $htmlContent; + + return $this; + } + + /** + * Gets shareLink + * + * @return string + */ + public function getShareLink() + { + return $this->container['shareLink']; + } + + /** + * Sets shareLink + * + * @param string $shareLink Link to share the campaign on social medias + * + * @return $this + */ + public function setShareLink($shareLink) + { + $this->container['shareLink'] = $shareLink; + + return $this; + } + + /** + * Gets tag + * + * @return string + */ + public function getTag() + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string $tag Tag of the campaign + * + * @return $this + */ + public function setTag($tag) + { + $this->container['tag'] = $tag; + + return $this; + } + + /** + * Gets createdAt + * + * @return string + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param string $createdAt Creation UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + * + * @return $this + */ + public function setCreatedAt($createdAt) + { + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets modifiedAt + * + * @return string + */ + public function getModifiedAt() + { + return $this->container['modifiedAt']; + } + + /** + * Sets modifiedAt + * + * @param string $modifiedAt UTC date-time of last modification of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + * + * @return $this + */ + public function setModifiedAt($modifiedAt) + { + $this->container['modifiedAt'] = $modifiedAt; + + return $this; + } + + /** + * Gets inlineImageActivation + * + * @return bool + */ + public function getInlineImageActivation() + { + return $this->container['inlineImageActivation']; + } + + /** + * Sets inlineImageActivation + * + * @param bool $inlineImageActivation Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. + * + * @return $this + */ + public function setInlineImageActivation($inlineImageActivation) + { + $this->container['inlineImageActivation'] = $inlineImageActivation; + + return $this; + } + + /** + * Gets mirrorActive + * + * @return bool + */ + public function getMirrorActive() + { + return $this->container['mirrorActive']; + } + + /** + * Sets mirrorActive + * + * @param bool $mirrorActive Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign + * + * @return $this + */ + public function setMirrorActive($mirrorActive) + { + $this->container['mirrorActive'] = $mirrorActive; + + return $this; + } + + /** + * Gets recurring + * + * @return bool + */ + public function getRecurring() + { + return $this->container['recurring']; + } + + /** + * Sets recurring + * + * @param bool $recurring 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 + * + * @return $this + */ + public function setRecurring($recurring) + { + $this->container['recurring'] = $recurring; + + return $this; + } + + /** + * Gets sentDate + * + * @return string + */ + public function getSentDate() + { + return $this->container['sentDate']; + } + + /** + * Sets sentDate + * + * @param string $sentDate Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent' + * + * @return $this + */ + public function setSentDate($sentDate) + { + $this->container['sentDate'] = $sentDate; + + return $this; + } + + /** + * Gets returnBounce + * + * @return int + */ + public function getReturnBounce() + { + return $this->container['returnBounce']; + } + + /** + * Sets returnBounce + * + * @param int $returnBounce Total number of non-delivered campaigns for a particular campaign id. + * + * @return $this + */ + public function setReturnBounce($returnBounce) + { + $this->container['returnBounce'] = $returnBounce; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetExtendedCampaignOverviewSender.php b/vendor/getbrevo/brevo-php/lib/Model/GetExtendedCampaignOverviewSender.php new file mode 100644 index 0000000..eb289f5 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetExtendedCampaignOverviewSender.php @@ -0,0 +1,365 @@ + 'string', + 'email' => 'string', + 'id' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null, + 'email' => 'email', + 'id' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'email' => 'email', + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'email' => 'setEmail', + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'email' => 'getEmail', + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Sender name of the campaign + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email Sender email of the campaign + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id Sender id of the campaign + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetExtendedCampaignStats.php b/vendor/getbrevo/brevo-php/lib/Model/GetExtendedCampaignStats.php new file mode 100644 index 0000000..efe202a --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetExtendedCampaignStats.php @@ -0,0 +1,539 @@ + '\Brevo\Client\Model\GetExtendedCampaignStatsGlobalStats', + 'campaignStats' => 'object[]', + 'mirrorClick' => 'int', + 'remaining' => 'int', + 'linksStats' => 'object', + 'statsByDomain' => '\Brevo\Client\Model\GetStatsByDomain', + 'statsByDevice' => '\Brevo\Client\Model\GetStatsByDevice', + 'statsByBrowser' => '\Brevo\Client\Model\GetStatsByBrowser' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'globalStats' => null, + 'campaignStats' => null, + 'mirrorClick' => 'int64', + 'remaining' => 'int64', + 'linksStats' => null, + 'statsByDomain' => null, + 'statsByDevice' => null, + 'statsByBrowser' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'globalStats' => 'globalStats', + 'campaignStats' => 'campaignStats', + 'mirrorClick' => 'mirrorClick', + 'remaining' => 'remaining', + 'linksStats' => 'linksStats', + 'statsByDomain' => 'statsByDomain', + 'statsByDevice' => 'statsByDevice', + 'statsByBrowser' => 'statsByBrowser' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'globalStats' => 'setGlobalStats', + 'campaignStats' => 'setCampaignStats', + 'mirrorClick' => 'setMirrorClick', + 'remaining' => 'setRemaining', + 'linksStats' => 'setLinksStats', + 'statsByDomain' => 'setStatsByDomain', + 'statsByDevice' => 'setStatsByDevice', + 'statsByBrowser' => 'setStatsByBrowser' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'globalStats' => 'getGlobalStats', + 'campaignStats' => 'getCampaignStats', + 'mirrorClick' => 'getMirrorClick', + 'remaining' => 'getRemaining', + 'linksStats' => 'getLinksStats', + 'statsByDomain' => 'getStatsByDomain', + 'statsByDevice' => 'getStatsByDevice', + 'statsByBrowser' => 'getStatsByBrowser' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['globalStats'] = isset($data['globalStats']) ? $data['globalStats'] : null; + $this->container['campaignStats'] = isset($data['campaignStats']) ? $data['campaignStats'] : null; + $this->container['mirrorClick'] = isset($data['mirrorClick']) ? $data['mirrorClick'] : null; + $this->container['remaining'] = isset($data['remaining']) ? $data['remaining'] : null; + $this->container['linksStats'] = isset($data['linksStats']) ? $data['linksStats'] : null; + $this->container['statsByDomain'] = isset($data['statsByDomain']) ? $data['statsByDomain'] : null; + $this->container['statsByDevice'] = isset($data['statsByDevice']) ? $data['statsByDevice'] : null; + $this->container['statsByBrowser'] = isset($data['statsByBrowser']) ? $data['statsByBrowser'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['globalStats'] === null) { + $invalidProperties[] = "'globalStats' can't be null"; + } + if ($this->container['campaignStats'] === null) { + $invalidProperties[] = "'campaignStats' can't be null"; + } + if ($this->container['mirrorClick'] === null) { + $invalidProperties[] = "'mirrorClick' can't be null"; + } + if ($this->container['remaining'] === null) { + $invalidProperties[] = "'remaining' can't be null"; + } + if ($this->container['linksStats'] === null) { + $invalidProperties[] = "'linksStats' can't be null"; + } + if ($this->container['statsByDomain'] === null) { + $invalidProperties[] = "'statsByDomain' can't be null"; + } + if ($this->container['statsByDevice'] === null) { + $invalidProperties[] = "'statsByDevice' can't be null"; + } + if ($this->container['statsByBrowser'] === null) { + $invalidProperties[] = "'statsByBrowser' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets globalStats + * + * @return \Brevo\Client\Model\GetExtendedCampaignStatsGlobalStats + */ + public function getGlobalStats() + { + return $this->container['globalStats']; + } + + /** + * Sets globalStats + * + * @param \Brevo\Client\Model\GetExtendedCampaignStatsGlobalStats $globalStats globalStats + * + * @return $this + */ + public function setGlobalStats($globalStats) + { + $this->container['globalStats'] = $globalStats; + + return $this; + } + + /** + * Gets campaignStats + * + * @return object[] + */ + public function getCampaignStats() + { + return $this->container['campaignStats']; + } + + /** + * Sets campaignStats + * + * @param object[] $campaignStats List-wise statistics of the campaign. + * + * @return $this + */ + public function setCampaignStats($campaignStats) + { + $this->container['campaignStats'] = $campaignStats; + + return $this; + } + + /** + * Gets mirrorClick + * + * @return int + */ + public function getMirrorClick() + { + return $this->container['mirrorClick']; + } + + /** + * Sets mirrorClick + * + * @param int $mirrorClick Number of clicks on mirror link + * + * @return $this + */ + public function setMirrorClick($mirrorClick) + { + $this->container['mirrorClick'] = $mirrorClick; + + return $this; + } + + /** + * Gets remaining + * + * @return int + */ + public function getRemaining() + { + return $this->container['remaining']; + } + + /** + * Sets remaining + * + * @param int $remaining Number of remaning emails to send + * + * @return $this + */ + public function setRemaining($remaining) + { + $this->container['remaining'] = $remaining; + + return $this; + } + + /** + * Gets linksStats + * + * @return object + */ + public function getLinksStats() + { + return $this->container['linksStats']; + } + + /** + * Sets linksStats + * + * @param object $linksStats Statistics about the number of clicks for the links + * + * @return $this + */ + public function setLinksStats($linksStats) + { + $this->container['linksStats'] = $linksStats; + + return $this; + } + + /** + * Gets statsByDomain + * + * @return \Brevo\Client\Model\GetStatsByDomain + */ + public function getStatsByDomain() + { + return $this->container['statsByDomain']; + } + + /** + * Sets statsByDomain + * + * @param \Brevo\Client\Model\GetStatsByDomain $statsByDomain statsByDomain + * + * @return $this + */ + public function setStatsByDomain($statsByDomain) + { + $this->container['statsByDomain'] = $statsByDomain; + + return $this; + } + + /** + * Gets statsByDevice + * + * @return \Brevo\Client\Model\GetStatsByDevice + */ + public function getStatsByDevice() + { + return $this->container['statsByDevice']; + } + + /** + * Sets statsByDevice + * + * @param \Brevo\Client\Model\GetStatsByDevice $statsByDevice Statistics about the campaign on the basis of various devices + * + * @return $this + */ + public function setStatsByDevice($statsByDevice) + { + $this->container['statsByDevice'] = $statsByDevice; + + return $this; + } + + /** + * Gets statsByBrowser + * + * @return \Brevo\Client\Model\GetStatsByBrowser + */ + public function getStatsByBrowser() + { + return $this->container['statsByBrowser']; + } + + /** + * Sets statsByBrowser + * + * @param \Brevo\Client\Model\GetStatsByBrowser $statsByBrowser Statistics about the campaign on the basis of various browsers + * + * @return $this + */ + public function setStatsByBrowser($statsByBrowser) + { + $this->container['statsByBrowser'] = $statsByBrowser; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetExtendedCampaignStatsGlobalStats.php b/vendor/getbrevo/brevo-php/lib/Model/GetExtendedCampaignStatsGlobalStats.php new file mode 100644 index 0000000..03d1ced --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetExtendedCampaignStatsGlobalStats.php @@ -0,0 +1,281 @@ +listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetExtendedClient.php b/vendor/getbrevo/brevo-php/lib/Model/GetExtendedClient.php new file mode 100644 index 0000000..a4eb983 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetExtendedClient.php @@ -0,0 +1,302 @@ + '\Brevo\Client\Model\GetExtendedClientAddress' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'address' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats + parent::swaggerFormats(); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'address' => 'address' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'address' => 'setAddress' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'address' => 'getAddress' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return parent::attributeMap() + self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return parent::setters() + self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return parent::getters() + self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + parent::__construct($data); + + $this->container['address'] = isset($data['address']) ? $data['address'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = parent::listInvalidProperties(); + + if ($this->container['address'] === null) { + $invalidProperties[] = "'address' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets address + * + * @return \Brevo\Client\Model\GetExtendedClientAddress + */ + public function getAddress() + { + return $this->container['address']; + } + + /** + * Sets address + * + * @param \Brevo\Client\Model\GetExtendedClientAddress $address address + * + * @return $this + */ + public function setAddress($address) + { + $this->container['address'] = $address; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetExtendedClientAddress.php b/vendor/getbrevo/brevo-php/lib/Model/GetExtendedClientAddress.php new file mode 100644 index 0000000..7b4691f --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetExtendedClientAddress.php @@ -0,0 +1,408 @@ + 'string', + 'city' => 'string', + 'zipCode' => 'string', + 'country' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'street' => null, + 'city' => null, + 'zipCode' => null, + 'country' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'street' => 'street', + 'city' => 'city', + 'zipCode' => 'zipCode', + 'country' => 'country' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'street' => 'setStreet', + 'city' => 'setCity', + 'zipCode' => 'setZipCode', + 'country' => 'setCountry' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'street' => 'getStreet', + 'city' => 'getCity', + 'zipCode' => 'getZipCode', + 'country' => 'getCountry' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['street'] = isset($data['street']) ? $data['street'] : null; + $this->container['city'] = isset($data['city']) ? $data['city'] : null; + $this->container['zipCode'] = isset($data['zipCode']) ? $data['zipCode'] : null; + $this->container['country'] = isset($data['country']) ? $data['country'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['street'] === null) { + $invalidProperties[] = "'street' can't be null"; + } + if ($this->container['city'] === null) { + $invalidProperties[] = "'city' can't be null"; + } + if ($this->container['zipCode'] === null) { + $invalidProperties[] = "'zipCode' can't be null"; + } + if ($this->container['country'] === null) { + $invalidProperties[] = "'country' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets street + * + * @return string + */ + public function getStreet() + { + return $this->container['street']; + } + + /** + * Sets street + * + * @param string $street Street information + * + * @return $this + */ + public function setStreet($street) + { + $this->container['street'] = $street; + + return $this; + } + + /** + * Gets city + * + * @return string + */ + public function getCity() + { + return $this->container['city']; + } + + /** + * Sets city + * + * @param string $city City information + * + * @return $this + */ + public function setCity($city) + { + $this->container['city'] = $city; + + return $this; + } + + /** + * Gets zipCode + * + * @return string + */ + public function getZipCode() + { + return $this->container['zipCode']; + } + + /** + * Sets zipCode + * + * @param string $zipCode Zip Code information + * + * @return $this + */ + public function setZipCode($zipCode) + { + $this->container['zipCode'] = $zipCode; + + return $this; + } + + /** + * Gets country + * + * @return string + */ + public function getCountry() + { + return $this->container['country']; + } + + /** + * Sets country + * + * @param string $country Country information + * + * @return $this + */ + public function setCountry($country) + { + $this->container['country'] = $country; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetExtendedContactDetails.php b/vendor/getbrevo/brevo-php/lib/Model/GetExtendedContactDetails.php new file mode 100644 index 0000000..6651b44 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetExtendedContactDetails.php @@ -0,0 +1,603 @@ + 'string', + 'id' => 'int', + 'emailBlacklisted' => 'bool', + 'smsBlacklisted' => 'bool', + 'createdAt' => 'string', + 'modifiedAt' => 'string', + 'listIds' => 'int[]', + 'listUnsubscribed' => 'int[]', + 'attributes' => 'object', + 'statistics' => '\Brevo\Client\Model\GetExtendedContactDetailsStatistics' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'email' => 'email', + 'id' => 'int64', + 'emailBlacklisted' => null, + 'smsBlacklisted' => null, + 'createdAt' => null, + 'modifiedAt' => null, + 'listIds' => 'int64', + 'listUnsubscribed' => 'int64', + 'attributes' => null, + 'statistics' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'email' => 'email', + 'id' => 'id', + 'emailBlacklisted' => 'emailBlacklisted', + 'smsBlacklisted' => 'smsBlacklisted', + 'createdAt' => 'createdAt', + 'modifiedAt' => 'modifiedAt', + 'listIds' => 'listIds', + 'listUnsubscribed' => 'listUnsubscribed', + 'attributes' => 'attributes', + 'statistics' => 'statistics' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'email' => 'setEmail', + 'id' => 'setId', + 'emailBlacklisted' => 'setEmailBlacklisted', + 'smsBlacklisted' => 'setSmsBlacklisted', + 'createdAt' => 'setCreatedAt', + 'modifiedAt' => 'setModifiedAt', + 'listIds' => 'setListIds', + 'listUnsubscribed' => 'setListUnsubscribed', + 'attributes' => 'setAttributes', + 'statistics' => 'setStatistics' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'email' => 'getEmail', + 'id' => 'getId', + 'emailBlacklisted' => 'getEmailBlacklisted', + 'smsBlacklisted' => 'getSmsBlacklisted', + 'createdAt' => 'getCreatedAt', + 'modifiedAt' => 'getModifiedAt', + 'listIds' => 'getListIds', + 'listUnsubscribed' => 'getListUnsubscribed', + 'attributes' => 'getAttributes', + 'statistics' => 'getStatistics' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['emailBlacklisted'] = isset($data['emailBlacklisted']) ? $data['emailBlacklisted'] : null; + $this->container['smsBlacklisted'] = isset($data['smsBlacklisted']) ? $data['smsBlacklisted'] : null; + $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; + $this->container['modifiedAt'] = isset($data['modifiedAt']) ? $data['modifiedAt'] : null; + $this->container['listIds'] = isset($data['listIds']) ? $data['listIds'] : null; + $this->container['listUnsubscribed'] = isset($data['listUnsubscribed']) ? $data['listUnsubscribed'] : null; + $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; + $this->container['statistics'] = isset($data['statistics']) ? $data['statistics'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['emailBlacklisted'] === null) { + $invalidProperties[] = "'emailBlacklisted' can't be null"; + } + if ($this->container['smsBlacklisted'] === null) { + $invalidProperties[] = "'smsBlacklisted' can't be null"; + } + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + if ($this->container['modifiedAt'] === null) { + $invalidProperties[] = "'modifiedAt' can't be null"; + } + if ($this->container['listIds'] === null) { + $invalidProperties[] = "'listIds' can't be null"; + } + if ($this->container['attributes'] === null) { + $invalidProperties[] = "'attributes' can't be null"; + } + if ($this->container['statistics'] === null) { + $invalidProperties[] = "'statistics' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email Email address of the contact for which you requested the details + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id ID of the contact for which you requested the details + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets emailBlacklisted + * + * @return bool + */ + public function getEmailBlacklisted() + { + return $this->container['emailBlacklisted']; + } + + /** + * Sets emailBlacklisted + * + * @param bool $emailBlacklisted Blacklist status for email campaigns (true=blacklisted, false=not blacklisted) + * + * @return $this + */ + public function setEmailBlacklisted($emailBlacklisted) + { + $this->container['emailBlacklisted'] = $emailBlacklisted; + + return $this; + } + + /** + * Gets smsBlacklisted + * + * @return bool + */ + public function getSmsBlacklisted() + { + return $this->container['smsBlacklisted']; + } + + /** + * Sets smsBlacklisted + * + * @param bool $smsBlacklisted Blacklist status for SMS campaigns (true=blacklisted, false=not blacklisted) + * + * @return $this + */ + public function setSmsBlacklisted($smsBlacklisted) + { + $this->container['smsBlacklisted'] = $smsBlacklisted; + + return $this; + } + + /** + * Gets createdAt + * + * @return string + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param string $createdAt Creation UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) + * + * @return $this + */ + public function setCreatedAt($createdAt) + { + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets modifiedAt + * + * @return string + */ + public function getModifiedAt() + { + return $this->container['modifiedAt']; + } + + /** + * Sets modifiedAt + * + * @param string $modifiedAt Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) + * + * @return $this + */ + public function setModifiedAt($modifiedAt) + { + $this->container['modifiedAt'] = $modifiedAt; + + return $this; + } + + /** + * Gets listIds + * + * @return int[] + */ + public function getListIds() + { + return $this->container['listIds']; + } + + /** + * Sets listIds + * + * @param int[] $listIds listIds + * + * @return $this + */ + public function setListIds($listIds) + { + $this->container['listIds'] = $listIds; + + return $this; + } + + /** + * Gets listUnsubscribed + * + * @return int[] + */ + public function getListUnsubscribed() + { + return $this->container['listUnsubscribed']; + } + + /** + * Sets listUnsubscribed + * + * @param int[] $listUnsubscribed listUnsubscribed + * + * @return $this + */ + public function setListUnsubscribed($listUnsubscribed) + { + $this->container['listUnsubscribed'] = $listUnsubscribed; + + return $this; + } + + /** + * Gets attributes + * + * @return object + */ + public function getAttributes() + { + return $this->container['attributes']; + } + + /** + * Sets attributes + * + * @param object $attributes Set of attributes of the contact + * + * @return $this + */ + public function setAttributes($attributes) + { + $this->container['attributes'] = $attributes; + + return $this; + } + + /** + * Gets statistics + * + * @return \Brevo\Client\Model\GetExtendedContactDetailsStatistics + */ + public function getStatistics() + { + return $this->container['statistics']; + } + + /** + * Sets statistics + * + * @param \Brevo\Client\Model\GetExtendedContactDetailsStatistics $statistics statistics + * + * @return $this + */ + public function setStatistics($statistics) + { + $this->container['statistics'] = $statistics; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatistics.php b/vendor/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatistics.php new file mode 100644 index 0000000..f5f05be --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatistics.php @@ -0,0 +1,546 @@ + '\Brevo\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[]', + 'hardBounces' => '\Brevo\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[]', + 'softBounces' => '\Brevo\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[]', + 'complaints' => '\Brevo\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[]', + 'unsubscriptions' => '\Brevo\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptions', + 'opened' => '\Brevo\Client\Model\GetExtendedContactDetailsStatisticsOpened[]', + 'clicked' => '\Brevo\Client\Model\GetExtendedContactDetailsStatisticsClicked[]', + 'transacAttributes' => 'object[]', + 'delivered' => '\Brevo\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'messagesSent' => null, + 'hardBounces' => null, + 'softBounces' => null, + 'complaints' => null, + 'unsubscriptions' => null, + 'opened' => null, + 'clicked' => null, + 'transacAttributes' => null, + 'delivered' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'messagesSent' => 'messagesSent', + 'hardBounces' => 'hardBounces', + 'softBounces' => 'softBounces', + 'complaints' => 'complaints', + 'unsubscriptions' => 'unsubscriptions', + 'opened' => 'opened', + 'clicked' => 'clicked', + 'transacAttributes' => 'transacAttributes', + 'delivered' => 'delivered' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'messagesSent' => 'setMessagesSent', + 'hardBounces' => 'setHardBounces', + 'softBounces' => 'setSoftBounces', + 'complaints' => 'setComplaints', + 'unsubscriptions' => 'setUnsubscriptions', + 'opened' => 'setOpened', + 'clicked' => 'setClicked', + 'transacAttributes' => 'setTransacAttributes', + 'delivered' => 'setDelivered' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'messagesSent' => 'getMessagesSent', + 'hardBounces' => 'getHardBounces', + 'softBounces' => 'getSoftBounces', + 'complaints' => 'getComplaints', + 'unsubscriptions' => 'getUnsubscriptions', + 'opened' => 'getOpened', + 'clicked' => 'getClicked', + 'transacAttributes' => 'getTransacAttributes', + 'delivered' => 'getDelivered' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['messagesSent'] = isset($data['messagesSent']) ? $data['messagesSent'] : null; + $this->container['hardBounces'] = isset($data['hardBounces']) ? $data['hardBounces'] : null; + $this->container['softBounces'] = isset($data['softBounces']) ? $data['softBounces'] : null; + $this->container['complaints'] = isset($data['complaints']) ? $data['complaints'] : null; + $this->container['unsubscriptions'] = isset($data['unsubscriptions']) ? $data['unsubscriptions'] : null; + $this->container['opened'] = isset($data['opened']) ? $data['opened'] : null; + $this->container['clicked'] = isset($data['clicked']) ? $data['clicked'] : null; + $this->container['transacAttributes'] = isset($data['transacAttributes']) ? $data['transacAttributes'] : null; + $this->container['delivered'] = isset($data['delivered']) ? $data['delivered'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets messagesSent + * + * @return \Brevo\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] + */ + public function getMessagesSent() + { + return $this->container['messagesSent']; + } + + /** + * Sets messagesSent + * + * @param \Brevo\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] $messagesSent Listing of the sent campaign for the contact + * + * @return $this + */ + public function setMessagesSent($messagesSent) + { + $this->container['messagesSent'] = $messagesSent; + + return $this; + } + + /** + * Gets hardBounces + * + * @return \Brevo\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] + */ + public function getHardBounces() + { + return $this->container['hardBounces']; + } + + /** + * Sets hardBounces + * + * @param \Brevo\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] $hardBounces Listing of the hardbounes generated by the contact + * + * @return $this + */ + public function setHardBounces($hardBounces) + { + $this->container['hardBounces'] = $hardBounces; + + return $this; + } + + /** + * Gets softBounces + * + * @return \Brevo\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] + */ + public function getSoftBounces() + { + return $this->container['softBounces']; + } + + /** + * Sets softBounces + * + * @param \Brevo\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] $softBounces Listing of the softbounes generated by the contact + * + * @return $this + */ + public function setSoftBounces($softBounces) + { + $this->container['softBounces'] = $softBounces; + + return $this; + } + + /** + * Gets complaints + * + * @return \Brevo\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] + */ + public function getComplaints() + { + return $this->container['complaints']; + } + + /** + * Sets complaints + * + * @param \Brevo\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] $complaints Listing of the complaints generated by the contact + * + * @return $this + */ + public function setComplaints($complaints) + { + $this->container['complaints'] = $complaints; + + return $this; + } + + /** + * Gets unsubscriptions + * + * @return \Brevo\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptions + */ + public function getUnsubscriptions() + { + return $this->container['unsubscriptions']; + } + + /** + * Sets unsubscriptions + * + * @param \Brevo\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptions $unsubscriptions unsubscriptions + * + * @return $this + */ + public function setUnsubscriptions($unsubscriptions) + { + $this->container['unsubscriptions'] = $unsubscriptions; + + return $this; + } + + /** + * Gets opened + * + * @return \Brevo\Client\Model\GetExtendedContactDetailsStatisticsOpened[] + */ + public function getOpened() + { + return $this->container['opened']; + } + + /** + * Sets opened + * + * @param \Brevo\Client\Model\GetExtendedContactDetailsStatisticsOpened[] $opened Listing of the openings generated by the contact + * + * @return $this + */ + public function setOpened($opened) + { + $this->container['opened'] = $opened; + + return $this; + } + + /** + * Gets clicked + * + * @return \Brevo\Client\Model\GetExtendedContactDetailsStatisticsClicked[] + */ + public function getClicked() + { + return $this->container['clicked']; + } + + /** + * Sets clicked + * + * @param \Brevo\Client\Model\GetExtendedContactDetailsStatisticsClicked[] $clicked Listing of the clicks generated by the contact + * + * @return $this + */ + public function setClicked($clicked) + { + $this->container['clicked'] = $clicked; + + return $this; + } + + /** + * Gets transacAttributes + * + * @return object[] + */ + public function getTransacAttributes() + { + return $this->container['transacAttributes']; + } + + /** + * Sets transacAttributes + * + * @param object[] $transacAttributes Listing of the transactional attributes for the contact + * + * @return $this + */ + public function setTransacAttributes($transacAttributes) + { + $this->container['transacAttributes'] = $transacAttributes; + + return $this; + } + + /** + * Gets delivered + * + * @return \Brevo\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] + */ + public function getDelivered() + { + return $this->container['delivered']; + } + + /** + * Sets delivered + * + * @param \Brevo\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] $delivered Listing of the delivered campaign for the contact + * + * @return $this + */ + public function setDelivered($delivered) + { + $this->container['delivered'] = $delivered; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsClicked.php b/vendor/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsClicked.php new file mode 100644 index 0000000..ad3fbe3 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsClicked.php @@ -0,0 +1,341 @@ + 'int', + 'links' => '\Brevo\Client\Model\GetExtendedContactDetailsStatisticsLinks[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'campaignId' => 'int64', + 'links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'campaignId' => 'campaignId', + 'links' => 'links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'campaignId' => 'setCampaignId', + 'links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'campaignId' => 'getCampaignId', + 'links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['campaignId'] = isset($data['campaignId']) ? $data['campaignId'] : null; + $this->container['links'] = isset($data['links']) ? $data['links'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['campaignId'] === null) { + $invalidProperties[] = "'campaignId' can't be null"; + } + if ($this->container['links'] === null) { + $invalidProperties[] = "'links' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets campaignId + * + * @return int + */ + public function getCampaignId() + { + return $this->container['campaignId']; + } + + /** + * Sets campaignId + * + * @param int $campaignId ID of the campaign which generated the event + * + * @return $this + */ + public function setCampaignId($campaignId) + { + $this->container['campaignId'] = $campaignId; + + return $this; + } + + /** + * Gets links + * + * @return \Brevo\Client\Model\GetExtendedContactDetailsStatisticsLinks[] + */ + public function getLinks() + { + return $this->container['links']; + } + + /** + * Sets links + * + * @param \Brevo\Client\Model\GetExtendedContactDetailsStatisticsLinks[] $links Listing of the clicked links for the campaign + * + * @return $this + */ + public function setLinks($links) + { + $this->container['links'] = $links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsDelivered.php b/vendor/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsDelivered.php new file mode 100644 index 0000000..42aeeec --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsDelivered.php @@ -0,0 +1,337 @@ + 'int', + 'eventTime' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'campaignId' => 'int64', + 'eventTime' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'campaignId' => 'campaignId', + 'eventTime' => 'eventTime' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'campaignId' => 'setCampaignId', + 'eventTime' => 'setEventTime' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'campaignId' => 'getCampaignId', + 'eventTime' => 'getEventTime' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['campaignId'] = isset($data['campaignId']) ? $data['campaignId'] : null; + $this->container['eventTime'] = isset($data['eventTime']) ? $data['eventTime'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['campaignId'] === null) { + $invalidProperties[] = "'campaignId' can't be null"; + } + if ($this->container['eventTime'] === null) { + $invalidProperties[] = "'eventTime' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets campaignId + * + * @return int + */ + public function getCampaignId() + { + return $this->container['campaignId']; + } + + /** + * Sets campaignId + * + * @param int $campaignId ID of the campaign which generated the event + * + * @return $this + */ + public function setCampaignId($campaignId) + { + $this->container['campaignId'] = $campaignId; + + return $this; + } + + /** + * Gets eventTime + * + * @return string + */ + public function getEventTime() + { + return $this->container['eventTime']; + } + + /** + * Sets eventTime + * + * @param string $eventTime UTC date-time of the event + * + * @return $this + */ + public function setEventTime($eventTime) + { + $this->container['eventTime'] = $eventTime; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsLinks.php b/vendor/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsLinks.php new file mode 100644 index 0000000..7365eb9 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsLinks.php @@ -0,0 +1,407 @@ + 'int', + 'eventTime' => 'string', + 'ip' => 'string', + 'url' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'count' => 'int64', + 'eventTime' => null, + 'ip' => null, + 'url' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'count' => 'count', + 'eventTime' => 'eventTime', + 'ip' => 'ip', + 'url' => 'url' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'count' => 'setCount', + 'eventTime' => 'setEventTime', + 'ip' => 'setIp', + 'url' => 'setUrl' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'count' => 'getCount', + 'eventTime' => 'getEventTime', + 'ip' => 'getIp', + 'url' => 'getUrl' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['count'] = isset($data['count']) ? $data['count'] : null; + $this->container['eventTime'] = isset($data['eventTime']) ? $data['eventTime'] : null; + $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; + $this->container['url'] = isset($data['url']) ? $data['url'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['count'] === null) { + $invalidProperties[] = "'count' can't be null"; + } + if ($this->container['eventTime'] === null) { + $invalidProperties[] = "'eventTime' can't be null"; + } + if ($this->container['ip'] === null) { + $invalidProperties[] = "'ip' can't be null"; + } + if ($this->container['url'] === null) { + $invalidProperties[] = "'url' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets count + * + * @return int + */ + public function getCount() + { + return $this->container['count']; + } + + /** + * Sets count + * + * @param int $count Number of clicks on this link for the campaign + * + * @return $this + */ + public function setCount($count) + { + $this->container['count'] = $count; + + return $this; + } + + /** + * Gets eventTime + * + * @return string + */ + public function getEventTime() + { + return $this->container['eventTime']; + } + + /** + * Sets eventTime + * + * @param string $eventTime UTC date-time of the event + * + * @return $this + */ + public function setEventTime($eventTime) + { + $this->container['eventTime'] = $eventTime; + + return $this; + } + + /** + * Gets ip + * + * @return string + */ + public function getIp() + { + return $this->container['ip']; + } + + /** + * Sets ip + * + * @param string $ip IP from which the user has clicked on the link + * + * @return $this + */ + public function setIp($ip) + { + $this->container['ip'] = $ip; + + return $this; + } + + /** + * Gets url + * + * @return string + */ + public function getUrl() + { + return $this->container['url']; + } + + /** + * Sets url + * + * @param string $url URL of the clicked link + * + * @return $this + */ + public function setUrl($url) + { + $this->container['url'] = $url; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsMessagesSent.php b/vendor/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsMessagesSent.php new file mode 100644 index 0000000..be2cdac --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsMessagesSent.php @@ -0,0 +1,341 @@ + 'int', + 'eventTime' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'campaignId' => 'int64', + 'eventTime' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'campaignId' => 'campaignId', + 'eventTime' => 'eventTime' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'campaignId' => 'setCampaignId', + 'eventTime' => 'setEventTime' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'campaignId' => 'getCampaignId', + 'eventTime' => 'getEventTime' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['campaignId'] = isset($data['campaignId']) ? $data['campaignId'] : null; + $this->container['eventTime'] = isset($data['eventTime']) ? $data['eventTime'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['campaignId'] === null) { + $invalidProperties[] = "'campaignId' can't be null"; + } + if ($this->container['eventTime'] === null) { + $invalidProperties[] = "'eventTime' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets campaignId + * + * @return int + */ + public function getCampaignId() + { + return $this->container['campaignId']; + } + + /** + * Sets campaignId + * + * @param int $campaignId ID of the campaign which generated the event + * + * @return $this + */ + public function setCampaignId($campaignId) + { + $this->container['campaignId'] = $campaignId; + + return $this; + } + + /** + * Gets eventTime + * + * @return string + */ + public function getEventTime() + { + return $this->container['eventTime']; + } + + /** + * Sets eventTime + * + * @param string $eventTime UTC date-time of the event + * + * @return $this + */ + public function setEventTime($eventTime) + { + $this->container['eventTime'] = $eventTime; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsOpened.php b/vendor/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsOpened.php new file mode 100644 index 0000000..00599ef --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsOpened.php @@ -0,0 +1,407 @@ + 'int', + 'count' => 'int', + 'eventTime' => 'string', + 'ip' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'campaignId' => 'int64', + 'count' => 'int64', + 'eventTime' => null, + 'ip' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'campaignId' => 'campaignId', + 'count' => 'count', + 'eventTime' => 'eventTime', + 'ip' => 'ip' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'campaignId' => 'setCampaignId', + 'count' => 'setCount', + 'eventTime' => 'setEventTime', + 'ip' => 'setIp' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'campaignId' => 'getCampaignId', + 'count' => 'getCount', + 'eventTime' => 'getEventTime', + 'ip' => 'getIp' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['campaignId'] = isset($data['campaignId']) ? $data['campaignId'] : null; + $this->container['count'] = isset($data['count']) ? $data['count'] : null; + $this->container['eventTime'] = isset($data['eventTime']) ? $data['eventTime'] : null; + $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['campaignId'] === null) { + $invalidProperties[] = "'campaignId' can't be null"; + } + if ($this->container['count'] === null) { + $invalidProperties[] = "'count' can't be null"; + } + if ($this->container['eventTime'] === null) { + $invalidProperties[] = "'eventTime' can't be null"; + } + if ($this->container['ip'] === null) { + $invalidProperties[] = "'ip' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets campaignId + * + * @return int + */ + public function getCampaignId() + { + return $this->container['campaignId']; + } + + /** + * Sets campaignId + * + * @param int $campaignId ID of the campaign which generated the event + * + * @return $this + */ + public function setCampaignId($campaignId) + { + $this->container['campaignId'] = $campaignId; + + return $this; + } + + /** + * Gets count + * + * @return int + */ + public function getCount() + { + return $this->container['count']; + } + + /** + * Sets count + * + * @param int $count Number of openings for the campaign + * + * @return $this + */ + public function setCount($count) + { + $this->container['count'] = $count; + + return $this; + } + + /** + * Gets eventTime + * + * @return string + */ + public function getEventTime() + { + return $this->container['eventTime']; + } + + /** + * Sets eventTime + * + * @param string $eventTime UTC date-time of the event + * + * @return $this + */ + public function setEventTime($eventTime) + { + $this->container['eventTime'] = $eventTime; + + return $this; + } + + /** + * Gets ip + * + * @return string + */ + public function getIp() + { + return $this->container['ip']; + } + + /** + * Sets ip + * + * @param string $ip IP from which the user has opened the email + * + * @return $this + */ + public function setIp($ip) + { + $this->container['ip'] = $ip; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsUnsubscriptions.php b/vendor/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsUnsubscriptions.php new file mode 100644 index 0000000..0105dec --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsUnsubscriptions.php @@ -0,0 +1,342 @@ + '\Brevo\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription[]', + 'adminUnsubscription' => '\Brevo\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'userUnsubscription' => null, + 'adminUnsubscription' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'userUnsubscription' => 'userUnsubscription', + 'adminUnsubscription' => 'adminUnsubscription' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'userUnsubscription' => 'setUserUnsubscription', + 'adminUnsubscription' => 'setAdminUnsubscription' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'userUnsubscription' => 'getUserUnsubscription', + 'adminUnsubscription' => 'getAdminUnsubscription' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['userUnsubscription'] = isset($data['userUnsubscription']) ? $data['userUnsubscription'] : null; + $this->container['adminUnsubscription'] = isset($data['adminUnsubscription']) ? $data['adminUnsubscription'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['userUnsubscription'] === null) { + $invalidProperties[] = "'userUnsubscription' can't be null"; + } + if ($this->container['adminUnsubscription'] === null) { + $invalidProperties[] = "'adminUnsubscription' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets userUnsubscription + * + * @return \Brevo\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription[] + */ + public function getUserUnsubscription() + { + return $this->container['userUnsubscription']; + } + + /** + * Sets userUnsubscription + * + * @param \Brevo\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription[] $userUnsubscription Contact unsubscribe via unsubscription link in a campaign + * + * @return $this + */ + public function setUserUnsubscription($userUnsubscription) + { + $this->container['userUnsubscription'] = $userUnsubscription; + + return $this; + } + + /** + * Gets adminUnsubscription + * + * @return \Brevo\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription[] + */ + public function getAdminUnsubscription() + { + return $this->container['adminUnsubscription']; + } + + /** + * Sets adminUnsubscription + * + * @param \Brevo\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription[] $adminUnsubscription Contact has been unsubscribed from the administrator + * + * @return $this + */ + public function setAdminUnsubscription($adminUnsubscription) + { + $this->container['adminUnsubscription'] = $adminUnsubscription; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.php b/vendor/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.php new file mode 100644 index 0000000..99a7b85 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.php @@ -0,0 +1,338 @@ + 'string', + 'ip' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'eventTime' => null, + 'ip' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'eventTime' => 'eventTime', + 'ip' => 'ip' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'eventTime' => 'setEventTime', + 'ip' => 'setIp' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'eventTime' => 'getEventTime', + 'ip' => 'getIp' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['eventTime'] = isset($data['eventTime']) ? $data['eventTime'] : null; + $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['eventTime'] === null) { + $invalidProperties[] = "'eventTime' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets eventTime + * + * @return string + */ + public function getEventTime() + { + return $this->container['eventTime']; + } + + /** + * Sets eventTime + * + * @param string $eventTime UTC date-time of the event + * + * @return $this + */ + public function setEventTime($eventTime) + { + $this->container['eventTime'] = $eventTime; + + return $this; + } + + /** + * Gets ip + * + * @return string + */ + public function getIp() + { + return $this->container['ip']; + } + + /** + * Sets ip + * + * @param string $ip IP from which the user has been unsubscribed + * + * @return $this + */ + public function setIp($ip) + { + $this->container['ip'] = $ip; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.php b/vendor/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.php new file mode 100644 index 0000000..6a9aaf9 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.php @@ -0,0 +1,371 @@ + 'int', + 'eventTime' => 'string', + 'ip' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'campaignId' => 'int64', + 'eventTime' => null, + 'ip' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'campaignId' => 'campaignId', + 'eventTime' => 'eventTime', + 'ip' => 'ip' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'campaignId' => 'setCampaignId', + 'eventTime' => 'setEventTime', + 'ip' => 'setIp' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'campaignId' => 'getCampaignId', + 'eventTime' => 'getEventTime', + 'ip' => 'getIp' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['campaignId'] = isset($data['campaignId']) ? $data['campaignId'] : null; + $this->container['eventTime'] = isset($data['eventTime']) ? $data['eventTime'] : null; + $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['campaignId'] === null) { + $invalidProperties[] = "'campaignId' can't be null"; + } + if ($this->container['eventTime'] === null) { + $invalidProperties[] = "'eventTime' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets campaignId + * + * @return int + */ + public function getCampaignId() + { + return $this->container['campaignId']; + } + + /** + * Sets campaignId + * + * @param int $campaignId ID of the campaign which generated the event + * + * @return $this + */ + public function setCampaignId($campaignId) + { + $this->container['campaignId'] = $campaignId; + + return $this; + } + + /** + * Gets eventTime + * + * @return string + */ + public function getEventTime() + { + return $this->container['eventTime']; + } + + /** + * Sets eventTime + * + * @param string $eventTime UTC date-time of the event + * + * @return $this + */ + public function setEventTime($eventTime) + { + $this->container['eventTime'] = $eventTime; + + return $this; + } + + /** + * Gets ip + * + * @return string + */ + public function getIp() + { + return $this->container['ip']; + } + + /** + * Sets ip + * + * @param string $ip IP from which the user has unsubscribed + * + * @return $this + */ + public function setIp($ip) + { + $this->container['ip'] = $ip; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetExtendedList.php b/vendor/getbrevo/brevo-php/lib/Model/GetExtendedList.php new file mode 100644 index 0000000..09f6804 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetExtendedList.php @@ -0,0 +1,395 @@ + 'int', + 'createdAt' => 'string', + 'campaignStats' => '\Brevo\Client\Model\GetExtendedListCampaignStats[]', + 'dynamicList' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'folderId' => 'int64', + 'createdAt' => null, + 'campaignStats' => null, + 'dynamicList' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats + parent::swaggerFormats(); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'folderId' => 'folderId', + 'createdAt' => 'createdAt', + 'campaignStats' => 'campaignStats', + 'dynamicList' => 'dynamicList' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'folderId' => 'setFolderId', + 'createdAt' => 'setCreatedAt', + 'campaignStats' => 'setCampaignStats', + 'dynamicList' => 'setDynamicList' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'folderId' => 'getFolderId', + 'createdAt' => 'getCreatedAt', + 'campaignStats' => 'getCampaignStats', + 'dynamicList' => 'getDynamicList' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return parent::attributeMap() + self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return parent::setters() + self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return parent::getters() + self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + parent::__construct($data); + + $this->container['folderId'] = isset($data['folderId']) ? $data['folderId'] : null; + $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; + $this->container['campaignStats'] = isset($data['campaignStats']) ? $data['campaignStats'] : null; + $this->container['dynamicList'] = isset($data['dynamicList']) ? $data['dynamicList'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = parent::listInvalidProperties(); + + if ($this->container['folderId'] === null) { + $invalidProperties[] = "'folderId' can't be null"; + } + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets folderId + * + * @return int + */ + public function getFolderId() + { + return $this->container['folderId']; + } + + /** + * Sets folderId + * + * @param int $folderId ID of the folder + * + * @return $this + */ + public function setFolderId($folderId) + { + $this->container['folderId'] = $folderId; + + return $this; + } + + /** + * Gets createdAt + * + * @return string + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param string $createdAt Creation UTC date-time of the list (YYYY-MM-DDTHH:mm:ss.SSSZ) + * + * @return $this + */ + public function setCreatedAt($createdAt) + { + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets campaignStats + * + * @return \Brevo\Client\Model\GetExtendedListCampaignStats[] + */ + public function getCampaignStats() + { + return $this->container['campaignStats']; + } + + /** + * Sets campaignStats + * + * @param \Brevo\Client\Model\GetExtendedListCampaignStats[] $campaignStats campaignStats + * + * @return $this + */ + public function setCampaignStats($campaignStats) + { + $this->container['campaignStats'] = $campaignStats; + + return $this; + } + + /** + * Gets dynamicList + * + * @return bool + */ + public function getDynamicList() + { + return $this->container['dynamicList']; + } + + /** + * Sets dynamicList + * + * @param bool $dynamicList Status telling if the list is dynamic or not (true=dynamic, false=not dynamic) + * + * @return $this + */ + public function setDynamicList($dynamicList) + { + $this->container['dynamicList'] = $dynamicList; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetExtendedListCampaignStats.php b/vendor/getbrevo/brevo-php/lib/Model/GetExtendedListCampaignStats.php new file mode 100644 index 0000000..468b511 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetExtendedListCampaignStats.php @@ -0,0 +1,341 @@ + 'int', + 'stats' => '\Brevo\Client\Model\GetCampaignStats' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'campaignId' => 'int64', + 'stats' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'campaignId' => 'campaignId', + 'stats' => 'stats' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'campaignId' => 'setCampaignId', + 'stats' => 'setStats' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'campaignId' => 'getCampaignId', + 'stats' => 'getStats' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['campaignId'] = isset($data['campaignId']) ? $data['campaignId'] : null; + $this->container['stats'] = isset($data['stats']) ? $data['stats'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['campaignId'] === null) { + $invalidProperties[] = "'campaignId' can't be null"; + } + if ($this->container['stats'] === null) { + $invalidProperties[] = "'stats' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets campaignId + * + * @return int + */ + public function getCampaignId() + { + return $this->container['campaignId']; + } + + /** + * Sets campaignId + * + * @param int $campaignId ID of the campaign + * + * @return $this + */ + public function setCampaignId($campaignId) + { + $this->container['campaignId'] = $campaignId; + + return $this; + } + + /** + * Gets stats + * + * @return \Brevo\Client\Model\GetCampaignStats + */ + public function getStats() + { + return $this->container['stats']; + } + + /** + * Sets stats + * + * @param \Brevo\Client\Model\GetCampaignStats $stats stats + * + * @return $this + */ + public function setStats($stats) + { + $this->container['stats'] = $stats; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetExternalFeedByUUID.php b/vendor/getbrevo/brevo-php/lib/Model/GetExternalFeedByUUID.php new file mode 100644 index 0000000..685bda8 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetExternalFeedByUUID.php @@ -0,0 +1,712 @@ + 'string', + 'name' => 'string', + 'url' => 'string', + 'authType' => 'string', + 'username' => 'string', + 'password' => 'string', + 'token' => 'string', + 'headers' => '\Brevo\Client\Model\GetExternalFeedByUUIDHeaders[]', + 'maxRetries' => 'int', + 'cache' => 'bool', + 'createdAt' => '\DateTime', + 'modifiedAt' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'uuidv4', + 'name' => null, + 'url' => 'url', + 'authType' => null, + 'username' => null, + 'password' => null, + 'token' => null, + 'headers' => null, + 'maxRetries' => null, + 'cache' => null, + 'createdAt' => 'date-time', + 'modifiedAt' => 'date-time' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'url' => 'url', + 'authType' => 'authType', + 'username' => 'username', + 'password' => 'password', + 'token' => 'token', + 'headers' => 'headers', + 'maxRetries' => 'maxRetries', + 'cache' => 'cache', + 'createdAt' => 'createdAt', + 'modifiedAt' => 'modifiedAt' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'url' => 'setUrl', + 'authType' => 'setAuthType', + 'username' => 'setUsername', + 'password' => 'setPassword', + 'token' => 'setToken', + 'headers' => 'setHeaders', + 'maxRetries' => 'setMaxRetries', + 'cache' => 'setCache', + 'createdAt' => 'setCreatedAt', + 'modifiedAt' => 'setModifiedAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'url' => 'getUrl', + 'authType' => 'getAuthType', + 'username' => 'getUsername', + 'password' => 'getPassword', + 'token' => 'getToken', + 'headers' => 'getHeaders', + 'maxRetries' => 'getMaxRetries', + 'cache' => 'getCache', + 'createdAt' => 'getCreatedAt', + 'modifiedAt' => 'getModifiedAt' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const AUTH_TYPE_BASIC = 'basic'; + const AUTH_TYPE_TOKEN = 'token'; + const AUTH_TYPE_NO_AUTH = 'noAuth'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAuthTypeAllowableValues() + { + return [ + self::AUTH_TYPE_BASIC, + self::AUTH_TYPE_TOKEN, + self::AUTH_TYPE_NO_AUTH, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['url'] = isset($data['url']) ? $data['url'] : null; + $this->container['authType'] = isset($data['authType']) ? $data['authType'] : null; + $this->container['username'] = isset($data['username']) ? $data['username'] : null; + $this->container['password'] = isset($data['password']) ? $data['password'] : null; + $this->container['token'] = isset($data['token']) ? $data['token'] : null; + $this->container['headers'] = isset($data['headers']) ? $data['headers'] : null; + $this->container['maxRetries'] = isset($data['maxRetries']) ? $data['maxRetries'] : null; + $this->container['cache'] = isset($data['cache']) ? $data['cache'] : null; + $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; + $this->container['modifiedAt'] = isset($data['modifiedAt']) ? $data['modifiedAt'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['url'] === null) { + $invalidProperties[] = "'url' can't be null"; + } + if ($this->container['authType'] === null) { + $invalidProperties[] = "'authType' can't be null"; + } + $allowedValues = $this->getAuthTypeAllowableValues(); + if (!is_null($this->container['authType']) && !in_array($this->container['authType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'authType', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['headers'] === null) { + $invalidProperties[] = "'headers' can't be null"; + } + if ($this->container['maxRetries'] === null) { + $invalidProperties[] = "'maxRetries' can't be null"; + } + if (($this->container['maxRetries'] > 5)) { + $invalidProperties[] = "invalid value for 'maxRetries', must be smaller than or equal to 5."; + } + + if (($this->container['maxRetries'] < 0)) { + $invalidProperties[] = "invalid value for 'maxRetries', must be bigger than or equal to 0."; + } + + if ($this->container['cache'] === null) { + $invalidProperties[] = "'cache' can't be null"; + } + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + if ($this->container['modifiedAt'] === null) { + $invalidProperties[] = "'modifiedAt' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id ID of the feed + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the feed + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets url + * + * @return string + */ + public function getUrl() + { + return $this->container['url']; + } + + /** + * Sets url + * + * @param string $url URL of the feed + * + * @return $this + */ + public function setUrl($url) + { + $this->container['url'] = $url; + + return $this; + } + + /** + * Gets authType + * + * @return string + */ + public function getAuthType() + { + return $this->container['authType']; + } + + /** + * Sets authType + * + * @param string $authType Auth type of the feed: * `basic` * `token` * `noAuth` + * + * @return $this + */ + public function setAuthType($authType) + { + $allowedValues = $this->getAuthTypeAllowableValues(); + if (!in_array($authType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'authType', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['authType'] = $authType; + + return $this; + } + + /** + * Gets username + * + * @return string + */ + public function getUsername() + { + return $this->container['username']; + } + + /** + * Sets username + * + * @param string $username Username for authType `basic` + * + * @return $this + */ + public function setUsername($username) + { + $this->container['username'] = $username; + + return $this; + } + + /** + * Gets password + * + * @return string + */ + public function getPassword() + { + return $this->container['password']; + } + + /** + * Sets password + * + * @param string $password Password for authType `basic` + * + * @return $this + */ + public function setPassword($password) + { + $this->container['password'] = $password; + + return $this; + } + + /** + * Gets token + * + * @return string + */ + public function getToken() + { + return $this->container['token']; + } + + /** + * Sets token + * + * @param string $token Token for authType `token` + * + * @return $this + */ + public function setToken($token) + { + $this->container['token'] = $token; + + return $this; + } + + /** + * Gets headers + * + * @return \Brevo\Client\Model\GetExternalFeedByUUIDHeaders[] + */ + public function getHeaders() + { + return $this->container['headers']; + } + + /** + * Sets headers + * + * @param \Brevo\Client\Model\GetExternalFeedByUUIDHeaders[] $headers Custom headers for the feed + * + * @return $this + */ + public function setHeaders($headers) + { + $this->container['headers'] = $headers; + + return $this; + } + + /** + * Gets maxRetries + * + * @return int + */ + public function getMaxRetries() + { + return $this->container['maxRetries']; + } + + /** + * Sets maxRetries + * + * @param int $maxRetries Maximum number of retries on the feed url + * + * @return $this + */ + public function setMaxRetries($maxRetries) + { + + if (($maxRetries > 5)) { + throw new \InvalidArgumentException('invalid value for $maxRetries when calling GetExternalFeedByUUID., must be smaller than or equal to 5.'); + } + if (($maxRetries < 0)) { + throw new \InvalidArgumentException('invalid value for $maxRetries when calling GetExternalFeedByUUID., must be bigger than or equal to 0.'); + } + + $this->container['maxRetries'] = $maxRetries; + + return $this; + } + + /** + * Gets cache + * + * @return bool + */ + public function getCache() + { + return $this->container['cache']; + } + + /** + * Sets cache + * + * @param bool $cache Toggle caching of feed url response + * + * @return $this + */ + public function setCache($cache) + { + $this->container['cache'] = $cache; + + return $this; + } + + /** + * Gets createdAt + * + * @return \DateTime + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param \DateTime $createdAt Datetime on which the feed was created + * + * @return $this + */ + public function setCreatedAt($createdAt) + { + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets modifiedAt + * + * @return \DateTime + */ + public function getModifiedAt() + { + return $this->container['modifiedAt']; + } + + /** + * Sets modifiedAt + * + * @param \DateTime $modifiedAt Datetime on which the feed was modified + * + * @return $this + */ + public function setModifiedAt($modifiedAt) + { + $this->container['modifiedAt'] = $modifiedAt; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetExternalFeedByUUIDHeaders.php b/vendor/getbrevo/brevo-php/lib/Model/GetExternalFeedByUUIDHeaders.php new file mode 100644 index 0000000..29c89e1 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetExternalFeedByUUIDHeaders.php @@ -0,0 +1,335 @@ + 'string', + 'value' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null, + 'value' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'value' => 'value' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'value' => 'setValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'value' => 'getValue' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['value'] = isset($data['value']) ? $data['value'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the header + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets value + * + * @return string + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param string $value Value of the header + * + * @return $this + */ + public function setValue($value) + { + $this->container['value'] = $value; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetFolder.php b/vendor/getbrevo/brevo-php/lib/Model/GetFolder.php new file mode 100644 index 0000000..24b2fd1 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetFolder.php @@ -0,0 +1,440 @@ + 'int', + 'name' => 'string', + 'totalBlacklisted' => 'int', + 'totalSubscribers' => 'int', + 'uniqueSubscribers' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'int64', + 'name' => null, + 'totalBlacklisted' => 'int64', + 'totalSubscribers' => 'int64', + 'uniqueSubscribers' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'totalBlacklisted' => 'totalBlacklisted', + 'totalSubscribers' => 'totalSubscribers', + 'uniqueSubscribers' => 'uniqueSubscribers' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'totalBlacklisted' => 'setTotalBlacklisted', + 'totalSubscribers' => 'setTotalSubscribers', + 'uniqueSubscribers' => 'setUniqueSubscribers' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'totalBlacklisted' => 'getTotalBlacklisted', + 'totalSubscribers' => 'getTotalSubscribers', + 'uniqueSubscribers' => 'getUniqueSubscribers' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['totalBlacklisted'] = isset($data['totalBlacklisted']) ? $data['totalBlacklisted'] : null; + $this->container['totalSubscribers'] = isset($data['totalSubscribers']) ? $data['totalSubscribers'] : null; + $this->container['uniqueSubscribers'] = isset($data['uniqueSubscribers']) ? $data['uniqueSubscribers'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['totalBlacklisted'] === null) { + $invalidProperties[] = "'totalBlacklisted' can't be null"; + } + if ($this->container['totalSubscribers'] === null) { + $invalidProperties[] = "'totalSubscribers' can't be null"; + } + if ($this->container['uniqueSubscribers'] === null) { + $invalidProperties[] = "'uniqueSubscribers' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id ID of the folder + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the folder + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets totalBlacklisted + * + * @return int + */ + public function getTotalBlacklisted() + { + return $this->container['totalBlacklisted']; + } + + /** + * Sets totalBlacklisted + * + * @param int $totalBlacklisted Number of blacklisted contacts in the folder + * + * @return $this + */ + public function setTotalBlacklisted($totalBlacklisted) + { + $this->container['totalBlacklisted'] = $totalBlacklisted; + + return $this; + } + + /** + * Gets totalSubscribers + * + * @return int + */ + public function getTotalSubscribers() + { + return $this->container['totalSubscribers']; + } + + /** + * Sets totalSubscribers + * + * @param int $totalSubscribers Number of contacts in the folder + * + * @return $this + */ + public function setTotalSubscribers($totalSubscribers) + { + $this->container['totalSubscribers'] = $totalSubscribers; + + return $this; + } + + /** + * Gets uniqueSubscribers + * + * @return int + */ + public function getUniqueSubscribers() + { + return $this->container['uniqueSubscribers']; + } + + /** + * Sets uniqueSubscribers + * + * @param int $uniqueSubscribers Number of unique contacts in the folder + * + * @return $this + */ + public function setUniqueSubscribers($uniqueSubscribers) + { + $this->container['uniqueSubscribers'] = $uniqueSubscribers; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetFolderLists.php b/vendor/getbrevo/brevo-php/lib/Model/GetFolderLists.php new file mode 100644 index 0000000..60b3c25 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetFolderLists.php @@ -0,0 +1,335 @@ + 'object[]', + 'count' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'lists' => null, + 'count' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'lists' => 'lists', + 'count' => 'count' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'lists' => 'setLists', + 'count' => 'setCount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'lists' => 'getLists', + 'count' => 'getCount' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['lists'] = isset($data['lists']) ? $data['lists'] : null; + $this->container['count'] = isset($data['count']) ? $data['count'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets lists + * + * @return object[] + */ + public function getLists() + { + return $this->container['lists']; + } + + /** + * Sets lists + * + * @param object[] $lists lists + * + * @return $this + */ + public function setLists($lists) + { + $this->container['lists'] = $lists; + + return $this; + } + + /** + * Gets count + * + * @return int + */ + public function getCount() + { + return $this->container['count']; + } + + /** + * Sets count + * + * @param int $count Number of lists in the folder + * + * @return $this + */ + public function setCount($count) + { + $this->container['count'] = $count; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetFolders.php b/vendor/getbrevo/brevo-php/lib/Model/GetFolders.php new file mode 100644 index 0000000..1935c41 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetFolders.php @@ -0,0 +1,335 @@ + 'object[]', + 'count' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'folders' => null, + 'count' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'folders' => 'folders', + 'count' => 'count' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'folders' => 'setFolders', + 'count' => 'setCount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'folders' => 'getFolders', + 'count' => 'getCount' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['folders'] = isset($data['folders']) ? $data['folders'] : null; + $this->container['count'] = isset($data['count']) ? $data['count'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets folders + * + * @return object[] + */ + public function getFolders() + { + return $this->container['folders']; + } + + /** + * Sets folders + * + * @param object[] $folders folders + * + * @return $this + */ + public function setFolders($folders) + { + $this->container['folders'] = $folders; + + return $this; + } + + /** + * Gets count + * + * @return int + */ + public function getCount() + { + return $this->container['count']; + } + + /** + * Sets count + * + * @param int $count Number of folders available in your account + * + * @return $this + */ + public function setCount($count) + { + $this->container['count'] = $count; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetInboundEmailEvents.php b/vendor/getbrevo/brevo-php/lib/Model/GetInboundEmailEvents.php new file mode 100644 index 0000000..c95405b --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetInboundEmailEvents.php @@ -0,0 +1,305 @@ + '\Brevo\Client\Model\GetInboundEmailEventsEvents[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'events' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'events' => 'events' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'events' => 'setEvents' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'events' => 'getEvents' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['events'] = isset($data['events']) ? $data['events'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets events + * + * @return \Brevo\Client\Model\GetInboundEmailEventsEvents[] + */ + public function getEvents() + { + return $this->container['events']; + } + + /** + * Sets events + * + * @param \Brevo\Client\Model\GetInboundEmailEventsEvents[] $events events + * + * @return $this + */ + public function setEvents($events) + { + $this->container['events'] = $events; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetInboundEmailEventsByUuid.php b/vendor/getbrevo/brevo-php/lib/Model/GetInboundEmailEventsByUuid.php new file mode 100644 index 0000000..5607781 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetInboundEmailEventsByUuid.php @@ -0,0 +1,515 @@ + '\DateTime', + 'deliveredAt' => '\DateTime', + 'recipient' => 'string', + 'sender' => 'string', + 'messageId' => 'string', + 'subject' => 'string', + 'attachments' => '\Brevo\Client\Model\GetInboundEmailEventsByUuidAttachments[]', + 'logs' => '\Brevo\Client\Model\GetInboundEmailEventsByUuidLogs[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'receivedAt' => 'date-time', + 'deliveredAt' => 'date-time', + 'recipient' => 'email', + 'sender' => 'email', + 'messageId' => null, + 'subject' => null, + 'attachments' => null, + 'logs' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'receivedAt' => 'receivedAt', + 'deliveredAt' => 'deliveredAt', + 'recipient' => 'recipient', + 'sender' => 'sender', + 'messageId' => 'messageId', + 'subject' => 'subject', + 'attachments' => 'attachments', + 'logs' => 'logs' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'receivedAt' => 'setReceivedAt', + 'deliveredAt' => 'setDeliveredAt', + 'recipient' => 'setRecipient', + 'sender' => 'setSender', + 'messageId' => 'setMessageId', + 'subject' => 'setSubject', + 'attachments' => 'setAttachments', + 'logs' => 'setLogs' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'receivedAt' => 'getReceivedAt', + 'deliveredAt' => 'getDeliveredAt', + 'recipient' => 'getRecipient', + 'sender' => 'getSender', + 'messageId' => 'getMessageId', + 'subject' => 'getSubject', + 'attachments' => 'getAttachments', + 'logs' => 'getLogs' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['receivedAt'] = isset($data['receivedAt']) ? $data['receivedAt'] : null; + $this->container['deliveredAt'] = isset($data['deliveredAt']) ? $data['deliveredAt'] : null; + $this->container['recipient'] = isset($data['recipient']) ? $data['recipient'] : null; + $this->container['sender'] = isset($data['sender']) ? $data['sender'] : null; + $this->container['messageId'] = isset($data['messageId']) ? $data['messageId'] : null; + $this->container['subject'] = isset($data['subject']) ? $data['subject'] : null; + $this->container['attachments'] = isset($data['attachments']) ? $data['attachments'] : null; + $this->container['logs'] = isset($data['logs']) ? $data['logs'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets receivedAt + * + * @return \DateTime + */ + public function getReceivedAt() + { + return $this->container['receivedAt']; + } + + /** + * Sets receivedAt + * + * @param \DateTime $receivedAt Date when email was received on SMTP relay + * + * @return $this + */ + public function setReceivedAt($receivedAt) + { + $this->container['receivedAt'] = $receivedAt; + + return $this; + } + + /** + * Gets deliveredAt + * + * @return \DateTime + */ + public function getDeliveredAt() + { + return $this->container['deliveredAt']; + } + + /** + * Sets deliveredAt + * + * @param \DateTime $deliveredAt Date when email was delivered successfully to client’s webhook + * + * @return $this + */ + public function setDeliveredAt($deliveredAt) + { + $this->container['deliveredAt'] = $deliveredAt; + + return $this; + } + + /** + * Gets recipient + * + * @return string + */ + public function getRecipient() + { + return $this->container['recipient']; + } + + /** + * Sets recipient + * + * @param string $recipient Recipient’s email address + * + * @return $this + */ + public function setRecipient($recipient) + { + $this->container['recipient'] = $recipient; + + return $this; + } + + /** + * Gets sender + * + * @return string + */ + public function getSender() + { + return $this->container['sender']; + } + + /** + * Sets sender + * + * @param string $sender Sender’s email address + * + * @return $this + */ + public function setSender($sender) + { + $this->container['sender'] = $sender; + + return $this; + } + + /** + * Gets messageId + * + * @return string + */ + public function getMessageId() + { + return $this->container['messageId']; + } + + /** + * Sets messageId + * + * @param string $messageId Value of the Message-ID header. This will be present only after the processing is done. + * + * @return $this + */ + public function setMessageId($messageId) + { + $this->container['messageId'] = $messageId; + + return $this; + } + + /** + * Gets subject + * + * @return string + */ + public function getSubject() + { + return $this->container['subject']; + } + + /** + * Sets subject + * + * @param string $subject Value of the Subject header. This will be present only after the processing is done. + * + * @return $this + */ + public function setSubject($subject) + { + $this->container['subject'] = $subject; + + return $this; + } + + /** + * Gets attachments + * + * @return \Brevo\Client\Model\GetInboundEmailEventsByUuidAttachments[] + */ + public function getAttachments() + { + return $this->container['attachments']; + } + + /** + * Sets attachments + * + * @param \Brevo\Client\Model\GetInboundEmailEventsByUuidAttachments[] $attachments List of attachments of the email. This will be present only after the processing is done. + * + * @return $this + */ + public function setAttachments($attachments) + { + $this->container['attachments'] = $attachments; + + return $this; + } + + /** + * Gets logs + * + * @return \Brevo\Client\Model\GetInboundEmailEventsByUuidLogs[] + */ + public function getLogs() + { + return $this->container['logs']; + } + + /** + * Sets logs + * + * @param \Brevo\Client\Model\GetInboundEmailEventsByUuidLogs[] $logs List of events/logs that describe the lifecycle of the email on SIB platform + * + * @return $this + */ + public function setLogs($logs) + { + $this->container['logs'] = $logs; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetInboundEmailEventsByUuidAttachments.php b/vendor/getbrevo/brevo-php/lib/Model/GetInboundEmailEventsByUuidAttachments.php new file mode 100644 index 0000000..ce25827 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetInboundEmailEventsByUuidAttachments.php @@ -0,0 +1,395 @@ + 'string', + 'contentType' => 'string', + 'contentId' => 'string', + 'contentLength' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null, + 'contentType' => null, + 'contentId' => null, + 'contentLength' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'contentType' => 'contentType', + 'contentId' => 'contentId', + 'contentLength' => 'contentLength' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'contentType' => 'setContentType', + 'contentId' => 'setContentId', + 'contentLength' => 'setContentLength' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'contentType' => 'getContentType', + 'contentId' => 'getContentId', + 'contentLength' => 'getContentLength' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['contentType'] = isset($data['contentType']) ? $data['contentType'] : null; + $this->container['contentId'] = isset($data['contentId']) ? $data['contentId'] : null; + $this->container['contentLength'] = isset($data['contentLength']) ? $data['contentLength'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name filename specified in the Content-Disposition header of the attachment + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets contentType + * + * @return string + */ + public function getContentType() + { + return $this->container['contentType']; + } + + /** + * Sets contentType + * + * @param string $contentType value of the Content-Type header of the attachment + * + * @return $this + */ + public function setContentType($contentType) + { + $this->container['contentType'] = $contentType; + + return $this; + } + + /** + * Gets contentId + * + * @return string + */ + public function getContentId() + { + return $this->container['contentId']; + } + + /** + * Sets contentId + * + * @param string $contentId value of the Content-ID header of the attachment. + * + * @return $this + */ + public function setContentId($contentId) + { + $this->container['contentId'] = $contentId; + + return $this; + } + + /** + * Gets contentLength + * + * @return int + */ + public function getContentLength() + { + return $this->container['contentLength']; + } + + /** + * Sets contentLength + * + * @param int $contentLength size of the attachment in bytes + * + * @return $this + */ + public function setContentLength($contentLength) + { + $this->container['contentLength'] = $contentLength; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetInboundEmailEventsByUuidLogs.php b/vendor/getbrevo/brevo-php/lib/Model/GetInboundEmailEventsByUuidLogs.php new file mode 100644 index 0000000..3addbe4 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetInboundEmailEventsByUuidLogs.php @@ -0,0 +1,371 @@ + '\DateTime', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'date' => 'date-time', + 'type' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'date' => 'date', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'date' => 'setDate', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'date' => 'getDate', + 'type' => 'getType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const TYPE_RECEIVED = 'received'; + const TYPE_PROCESSED = 'processed'; + const TYPE_WEBHOOK_FAILED = 'webhookFailed'; + const TYPE_WEBHOOK_DELIVERED = 'webhookDelivered'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_RECEIVED, + self::TYPE_PROCESSED, + self::TYPE_WEBHOOK_FAILED, + self::TYPE_WEBHOOK_DELIVERED, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['date'] = isset($data['date']) ? $data['date'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets date + * + * @return \DateTime + */ + public function getDate() + { + return $this->container['date']; + } + + /** + * Sets date + * + * @param \DateTime $date Date of the event + * + * @return $this + */ + public function setDate($date) + { + $this->container['date'] = $date; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Type of the event + * + * @return $this + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($type) && !in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetInboundEmailEventsEvents.php b/vendor/getbrevo/brevo-php/lib/Model/GetInboundEmailEventsEvents.php new file mode 100644 index 0000000..966dc43 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetInboundEmailEventsEvents.php @@ -0,0 +1,407 @@ + 'string', + 'date' => '\DateTime', + 'sender' => 'string', + 'recipient' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'uuid' => 'uuid', + 'date' => 'date-time', + 'sender' => 'email', + 'recipient' => 'email' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'uuid' => 'uuid', + 'date' => 'date', + 'sender' => 'sender', + 'recipient' => 'recipient' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'uuid' => 'setUuid', + 'date' => 'setDate', + 'sender' => 'setSender', + 'recipient' => 'setRecipient' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'uuid' => 'getUuid', + 'date' => 'getDate', + 'sender' => 'getSender', + 'recipient' => 'getRecipient' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['uuid'] = isset($data['uuid']) ? $data['uuid'] : null; + $this->container['date'] = isset($data['date']) ? $data['date'] : null; + $this->container['sender'] = isset($data['sender']) ? $data['sender'] : null; + $this->container['recipient'] = isset($data['recipient']) ? $data['recipient'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['uuid'] === null) { + $invalidProperties[] = "'uuid' can't be null"; + } + if ($this->container['date'] === null) { + $invalidProperties[] = "'date' can't be null"; + } + if ($this->container['sender'] === null) { + $invalidProperties[] = "'sender' can't be null"; + } + if ($this->container['recipient'] === null) { + $invalidProperties[] = "'recipient' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets uuid + * + * @return string + */ + public function getUuid() + { + return $this->container['uuid']; + } + + /** + * Sets uuid + * + * @param string $uuid UUID that can be used to fetch additional data + * + * @return $this + */ + public function setUuid($uuid) + { + $this->container['uuid'] = $uuid; + + return $this; + } + + /** + * Gets date + * + * @return \DateTime + */ + public function getDate() + { + return $this->container['date']; + } + + /** + * Sets date + * + * @param \DateTime $date Date when email was received on SMTP relay + * + * @return $this + */ + public function setDate($date) + { + $this->container['date'] = $date; + + return $this; + } + + /** + * Gets sender + * + * @return string + */ + public function getSender() + { + return $this->container['sender']; + } + + /** + * Sets sender + * + * @param string $sender Sender’s email address + * + * @return $this + */ + public function setSender($sender) + { + $this->container['sender'] = $sender; + + return $this; + } + + /** + * Gets recipient + * + * @return string + */ + public function getRecipient() + { + return $this->container['recipient']; + } + + /** + * Sets recipient + * + * @param string $recipient Recipient’s email address + * + * @return $this + */ + public function setRecipient($recipient) + { + $this->container['recipient'] = $recipient; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetInvitedUsersList.php b/vendor/getbrevo/brevo-php/lib/Model/GetInvitedUsersList.php new file mode 100644 index 0000000..15e8982 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetInvitedUsersList.php @@ -0,0 +1,305 @@ + '\Brevo\Client\Model\GetInvitedUsersListUsers[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'users' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'users' => 'users' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'users' => 'setUsers' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'users' => 'getUsers' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['users'] = isset($data['users']) ? $data['users'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets users + * + * @return \Brevo\Client\Model\GetInvitedUsersListUsers[] + */ + public function getUsers() + { + return $this->container['users']; + } + + /** + * Sets users + * + * @param \Brevo\Client\Model\GetInvitedUsersListUsers[] $users Get invited users list + * + * @return $this + */ + public function setUsers($users) + { + $this->container['users'] = $users; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetInvitedUsersListFeatureAccess.php b/vendor/getbrevo/brevo-php/lib/Model/GetInvitedUsersListFeatureAccess.php new file mode 100644 index 0000000..07ad614 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetInvitedUsersListFeatureAccess.php @@ -0,0 +1,366 @@ + 'object', + 'conversations' => 'object', + 'crm' => 'object' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'marketing' => 'string', + 'conversations' => 'string', + 'crm' => 'string' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'marketing' => 'marketing', + 'conversations' => 'conversations', + 'crm' => 'crm' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'marketing' => 'setMarketing', + 'conversations' => 'setConversations', + 'crm' => 'setCrm' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'marketing' => 'getMarketing', + 'conversations' => 'getConversations', + 'crm' => 'getCrm' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['marketing'] = isset($data['marketing']) ? $data['marketing'] : null; + $this->container['conversations'] = isset($data['conversations']) ? $data['conversations'] : null; + $this->container['crm'] = isset($data['crm']) ? $data['crm'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets marketing + * + * @return object + */ + public function getMarketing() + { + return $this->container['marketing']; + } + + /** + * Sets marketing + * + * @param object $marketing Marketing features accessiblity. + * + * @return $this + */ + public function setMarketing($marketing) + { + $this->container['marketing'] = $marketing; + + return $this; + } + + /** + * Gets conversations + * + * @return object + */ + public function getConversations() + { + return $this->container['conversations']; + } + + /** + * Sets conversations + * + * @param object $conversations Conversations features accessiblity. + * + * @return $this + */ + public function setConversations($conversations) + { + $this->container['conversations'] = $conversations; + + return $this; + } + + /** + * Gets crm + * + * @return object + */ + public function getCrm() + { + return $this->container['crm']; + } + + /** + * Sets crm + * + * @param object $crm CRM features accessiblity. + * + * @return $this + */ + public function setCrm($crm) + { + $this->container['crm'] = $crm; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetInvitedUsersListUsers.php b/vendor/getbrevo/brevo-php/lib/Model/GetInvitedUsersListUsers.php new file mode 100644 index 0000000..4978dd4 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetInvitedUsersListUsers.php @@ -0,0 +1,407 @@ + 'string', + 'isOwner' => 'string', + 'status' => 'string', + 'featureAccess' => '\Brevo\Client\Model\GetInvitedUsersListFeatureAccess' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'email' => null, + 'isOwner' => null, + 'status' => null, + 'featureAccess' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'email' => 'email', + 'isOwner' => 'is_owner', + 'status' => 'status', + 'featureAccess' => 'feature_access' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'email' => 'setEmail', + 'isOwner' => 'setIsOwner', + 'status' => 'setStatus', + 'featureAccess' => 'setFeatureAccess' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'email' => 'getEmail', + 'isOwner' => 'getIsOwner', + 'status' => 'getStatus', + 'featureAccess' => 'getFeatureAccess' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['isOwner'] = isset($data['isOwner']) ? $data['isOwner'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['featureAccess'] = isset($data['featureAccess']) ? $data['featureAccess'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + if ($this->container['isOwner'] === null) { + $invalidProperties[] = "'isOwner' can't be null"; + } + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } + if ($this->container['featureAccess'] === null) { + $invalidProperties[] = "'featureAccess' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email Email address of the user. + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets isOwner + * + * @return string + */ + public function getIsOwner() + { + return $this->container['isOwner']; + } + + /** + * Sets isOwner + * + * @param string $isOwner Flag for indicating is user owner of the organization. + * + * @return $this + */ + public function setIsOwner($isOwner) + { + $this->container['isOwner'] = $isOwner; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status Status of the invited user. + * + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets featureAccess + * + * @return \Brevo\Client\Model\GetInvitedUsersListFeatureAccess + */ + public function getFeatureAccess() + { + return $this->container['featureAccess']; + } + + /** + * Sets featureAccess + * + * @param \Brevo\Client\Model\GetInvitedUsersListFeatureAccess $featureAccess featureAccess + * + * @return $this + */ + public function setFeatureAccess($featureAccess) + { + $this->container['featureAccess'] = $featureAccess; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetIp.php b/vendor/getbrevo/brevo-php/lib/Model/GetIp.php new file mode 100644 index 0000000..322d6fc --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetIp.php @@ -0,0 +1,407 @@ + 'int', + 'ip' => 'string', + 'active' => 'bool', + 'domain' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'int64', + 'ip' => null, + 'active' => null, + 'domain' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'ip' => 'ip', + 'active' => 'active', + 'domain' => 'domain' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'ip' => 'setIp', + 'active' => 'setActive', + 'domain' => 'setDomain' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'ip' => 'getIp', + 'active' => 'getActive', + 'domain' => 'getDomain' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; + $this->container['active'] = isset($data['active']) ? $data['active'] : null; + $this->container['domain'] = isset($data['domain']) ? $data['domain'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['ip'] === null) { + $invalidProperties[] = "'ip' can't be null"; + } + if ($this->container['active'] === null) { + $invalidProperties[] = "'active' can't be null"; + } + if ($this->container['domain'] === null) { + $invalidProperties[] = "'domain' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id ID of the dedicated IP + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets ip + * + * @return string + */ + public function getIp() + { + return $this->container['ip']; + } + + /** + * Sets ip + * + * @param string $ip Dedicated IP + * + * @return $this + */ + public function setIp($ip) + { + $this->container['ip'] = $ip; + + return $this; + } + + /** + * Gets active + * + * @return bool + */ + public function getActive() + { + return $this->container['active']; + } + + /** + * Sets active + * + * @param bool $active Status of the IP (true=active, false=inactive) + * + * @return $this + */ + public function setActive($active) + { + $this->container['active'] = $active; + + return $this; + } + + /** + * Gets domain + * + * @return string + */ + public function getDomain() + { + return $this->container['domain']; + } + + /** + * Sets domain + * + * @param string $domain Domain associated to the IP + * + * @return $this + */ + public function setDomain($domain) + { + $this->container['domain'] = $domain; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetIpFromSender.php b/vendor/getbrevo/brevo-php/lib/Model/GetIpFromSender.php new file mode 100644 index 0000000..4802c9a --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetIpFromSender.php @@ -0,0 +1,407 @@ + 'int', + 'ip' => 'string', + 'domain' => 'string', + 'weight' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'int64', + 'ip' => null, + 'domain' => null, + 'weight' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'ip' => 'ip', + 'domain' => 'domain', + 'weight' => 'weight' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'ip' => 'setIp', + 'domain' => 'setDomain', + 'weight' => 'setWeight' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'ip' => 'getIp', + 'domain' => 'getDomain', + 'weight' => 'getWeight' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; + $this->container['domain'] = isset($data['domain']) ? $data['domain'] : null; + $this->container['weight'] = isset($data['weight']) ? $data['weight'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['ip'] === null) { + $invalidProperties[] = "'ip' can't be null"; + } + if ($this->container['domain'] === null) { + $invalidProperties[] = "'domain' can't be null"; + } + if ($this->container['weight'] === null) { + $invalidProperties[] = "'weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id ID of the dedicated IP + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets ip + * + * @return string + */ + public function getIp() + { + return $this->container['ip']; + } + + /** + * Sets ip + * + * @param string $ip Dedicated IP + * + * @return $this + */ + public function setIp($ip) + { + $this->container['ip'] = $ip; + + return $this; + } + + /** + * Gets domain + * + * @return string + */ + public function getDomain() + { + return $this->container['domain']; + } + + /** + * Sets domain + * + * @param string $domain Domain associated to the IP + * + * @return $this + */ + public function setDomain($domain) + { + $this->container['domain'] = $domain; + + return $this; + } + + /** + * Gets weight + * + * @return int + */ + public function getWeight() + { + return $this->container['weight']; + } + + /** + * Sets weight + * + * @param int $weight Weight of the IP + * + * @return $this + */ + public function setWeight($weight) + { + $this->container['weight'] = $weight; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetIps.php b/vendor/getbrevo/brevo-php/lib/Model/GetIps.php new file mode 100644 index 0000000..fbd6cd4 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetIps.php @@ -0,0 +1,308 @@ + '\Brevo\Client\Model\GetIp[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'ips' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'ips' => 'ips' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'ips' => 'setIps' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'ips' => 'getIps' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['ips'] = isset($data['ips']) ? $data['ips'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['ips'] === null) { + $invalidProperties[] = "'ips' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets ips + * + * @return \Brevo\Client\Model\GetIp[] + */ + public function getIps() + { + return $this->container['ips']; + } + + /** + * Sets ips + * + * @param \Brevo\Client\Model\GetIp[] $ips Dedicated IP(s) available on your account + * + * @return $this + */ + public function setIps($ips) + { + $this->container['ips'] = $ips; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetIpsFromSender.php b/vendor/getbrevo/brevo-php/lib/Model/GetIpsFromSender.php new file mode 100644 index 0000000..de5b679 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetIpsFromSender.php @@ -0,0 +1,308 @@ + '\Brevo\Client\Model\GetIpFromSender[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'ips' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'ips' => 'ips' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'ips' => 'setIps' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'ips' => 'getIps' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['ips'] = isset($data['ips']) ? $data['ips'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['ips'] === null) { + $invalidProperties[] = "'ips' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets ips + * + * @return \Brevo\Client\Model\GetIpFromSender[] + */ + public function getIps() + { + return $this->container['ips']; + } + + /** + * Sets ips + * + * @param \Brevo\Client\Model\GetIpFromSender[] $ips Dedicated IP(s) linked to a sender + * + * @return $this + */ + public function setIps($ips) + { + $this->container['ips'] = $ips; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetList.php b/vendor/getbrevo/brevo-php/lib/Model/GetList.php new file mode 100644 index 0000000..e01ef48 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetList.php @@ -0,0 +1,440 @@ + 'int', + 'name' => 'string', + 'totalBlacklisted' => 'int', + 'totalSubscribers' => 'int', + 'uniqueSubscribers' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'int64', + 'name' => null, + 'totalBlacklisted' => 'int64', + 'totalSubscribers' => 'int64', + 'uniqueSubscribers' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'totalBlacklisted' => 'totalBlacklisted', + 'totalSubscribers' => 'totalSubscribers', + 'uniqueSubscribers' => 'uniqueSubscribers' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'totalBlacklisted' => 'setTotalBlacklisted', + 'totalSubscribers' => 'setTotalSubscribers', + 'uniqueSubscribers' => 'setUniqueSubscribers' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'totalBlacklisted' => 'getTotalBlacklisted', + 'totalSubscribers' => 'getTotalSubscribers', + 'uniqueSubscribers' => 'getUniqueSubscribers' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['totalBlacklisted'] = isset($data['totalBlacklisted']) ? $data['totalBlacklisted'] : null; + $this->container['totalSubscribers'] = isset($data['totalSubscribers']) ? $data['totalSubscribers'] : null; + $this->container['uniqueSubscribers'] = isset($data['uniqueSubscribers']) ? $data['uniqueSubscribers'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['totalBlacklisted'] === null) { + $invalidProperties[] = "'totalBlacklisted' can't be null"; + } + if ($this->container['totalSubscribers'] === null) { + $invalidProperties[] = "'totalSubscribers' can't be null"; + } + if ($this->container['uniqueSubscribers'] === null) { + $invalidProperties[] = "'uniqueSubscribers' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id ID of the list + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the list + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets totalBlacklisted + * + * @return int + */ + public function getTotalBlacklisted() + { + return $this->container['totalBlacklisted']; + } + + /** + * Sets totalBlacklisted + * + * @param int $totalBlacklisted Number of blacklisted contacts in the list + * + * @return $this + */ + public function setTotalBlacklisted($totalBlacklisted) + { + $this->container['totalBlacklisted'] = $totalBlacklisted; + + return $this; + } + + /** + * Gets totalSubscribers + * + * @return int + */ + public function getTotalSubscribers() + { + return $this->container['totalSubscribers']; + } + + /** + * Sets totalSubscribers + * + * @param int $totalSubscribers Number of contacts in the list + * + * @return $this + */ + public function setTotalSubscribers($totalSubscribers) + { + $this->container['totalSubscribers'] = $totalSubscribers; + + return $this; + } + + /** + * Gets uniqueSubscribers + * + * @return int + */ + public function getUniqueSubscribers() + { + return $this->container['uniqueSubscribers']; + } + + /** + * Sets uniqueSubscribers + * + * @param int $uniqueSubscribers Number of unique contacts in the list + * + * @return $this + */ + public function setUniqueSubscribers($uniqueSubscribers) + { + $this->container['uniqueSubscribers'] = $uniqueSubscribers; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetLists.php b/vendor/getbrevo/brevo-php/lib/Model/GetLists.php new file mode 100644 index 0000000..57c93ee --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetLists.php @@ -0,0 +1,335 @@ + 'object[]', + 'count' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'lists' => null, + 'count' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'lists' => 'lists', + 'count' => 'count' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'lists' => 'setLists', + 'count' => 'setCount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'lists' => 'getLists', + 'count' => 'getCount' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['lists'] = isset($data['lists']) ? $data['lists'] : null; + $this->container['count'] = isset($data['count']) ? $data['count'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets lists + * + * @return object[] + */ + public function getLists() + { + return $this->container['lists']; + } + + /** + * Sets lists + * + * @param object[] $lists Listing of all the lists available in your account + * + * @return $this + */ + public function setLists($lists) + { + $this->container['lists'] = $lists; + + return $this; + } + + /** + * Gets count + * + * @return int + */ + public function getCount() + { + return $this->container['count']; + } + + /** + * Sets count + * + * @param int $count Number of lists in your account + * + * @return $this + */ + public function setCount($count) + { + $this->container['count'] = $count; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetOrders.php b/vendor/getbrevo/brevo-php/lib/Model/GetOrders.php new file mode 100644 index 0000000..cca4fc1 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetOrders.php @@ -0,0 +1,335 @@ + 'object[]', + 'count' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'orders' => null, + 'count' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'orders' => 'orders', + 'count' => 'count' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'orders' => 'setOrders', + 'count' => 'setCount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'orders' => 'getOrders', + 'count' => 'getCount' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['orders'] = isset($data['orders']) ? $data['orders'] : null; + $this->container['count'] = isset($data['count']) ? $data['count'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets orders + * + * @return object[] + */ + public function getOrders() + { + return $this->container['orders']; + } + + /** + * Sets orders + * + * @param object[] $orders orders + * + * @return $this + */ + public function setOrders($orders) + { + $this->container['orders'] = $orders; + + return $this; + } + + /** + * Gets count + * + * @return int + */ + public function getCount() + { + return $this->container['count']; + } + + /** + * Sets count + * + * @param int $count Number of orders + * + * @return $this + */ + public function setCount($count) + { + $this->container['count'] = $count; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetProcess.php b/vendor/getbrevo/brevo-php/lib/Model/GetProcess.php new file mode 100644 index 0000000..1bdea77 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetProcess.php @@ -0,0 +1,438 @@ + 'int', + 'status' => 'string', + 'name' => 'string', + 'exportUrl' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'int64', + 'status' => null, + 'name' => null, + 'exportUrl' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'status' => 'status', + 'name' => 'name', + 'exportUrl' => 'export_url' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'status' => 'setStatus', + 'name' => 'setName', + 'exportUrl' => 'setExportUrl' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'status' => 'getStatus', + 'name' => 'getName', + 'exportUrl' => 'getExportUrl' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const STATUS_QUEUED = 'queued'; + const STATUS_IN_PROCESS = 'in_process'; + const STATUS_COMPLETED = 'completed'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_QUEUED, + self::STATUS_IN_PROCESS, + self::STATUS_COMPLETED, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['exportUrl'] = isset($data['exportUrl']) ? $data['exportUrl'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'status', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id Id of the process + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status Status of the process + * + * @return $this + */ + public function setStatus($status) + { + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'status', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Process name + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets exportUrl + * + * @return string + */ + public function getExportUrl() + { + return $this->container['exportUrl']; + } + + /** + * Sets exportUrl + * + * @param string $exportUrl URL on which send export the of contacts once the process is completed + * + * @return $this + */ + public function setExportUrl($exportUrl) + { + $this->container['exportUrl'] = $exportUrl; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetProcesses.php b/vendor/getbrevo/brevo-php/lib/Model/GetProcesses.php new file mode 100644 index 0000000..c4ca6d5 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetProcesses.php @@ -0,0 +1,335 @@ + '\Brevo\Client\Model\GetProcess[]', + 'count' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'processes' => null, + 'count' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'processes' => 'processes', + 'count' => 'count' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'processes' => 'setProcesses', + 'count' => 'setCount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'processes' => 'getProcesses', + 'count' => 'getCount' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['processes'] = isset($data['processes']) ? $data['processes'] : null; + $this->container['count'] = isset($data['count']) ? $data['count'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets processes + * + * @return \Brevo\Client\Model\GetProcess[] + */ + public function getProcesses() + { + return $this->container['processes']; + } + + /** + * Sets processes + * + * @param \Brevo\Client\Model\GetProcess[] $processes List of processes available on your account + * + * @return $this + */ + public function setProcesses($processes) + { + $this->container['processes'] = $processes; + + return $this; + } + + /** + * Gets count + * + * @return int + */ + public function getCount() + { + return $this->container['count']; + } + + /** + * Sets count + * + * @param int $count Number of processes available on your account + * + * @return $this + */ + public function setCount($count) + { + $this->container['count'] = $count; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetProductDetails.php b/vendor/getbrevo/brevo-php/lib/Model/GetProductDetails.php new file mode 100644 index 0000000..328ac97 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetProductDetails.php @@ -0,0 +1,743 @@ + 'string', + 'name' => 'string', + 'createdAt' => 'string', + 'modifiedAt' => 'string', + 'url' => 'string', + 'imageUrl' => 'string', + 'sku' => 'string', + 'price' => 'float', + 'categories' => 'string[]', + 'parentId' => 'string', + 's3Original' => 'string', + 's3ThumbAnalytics' => 'string', + 'metaInfo' => 'object', + 's3ThumbEditor' => 'string', + 'isDeleted' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'string', + 'name' => 'string', + 'createdAt' => null, + 'modifiedAt' => null, + 'url' => 'string', + 'imageUrl' => 'string', + 'sku' => 'string', + 'price' => 'float', + 'categories' => null, + 'parentId' => 'string', + 's3Original' => 'string', + 's3ThumbAnalytics' => 'string', + 'metaInfo' => null, + 's3ThumbEditor' => 'string', + 'isDeleted' => 'string' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'createdAt' => 'createdAt', + 'modifiedAt' => 'modifiedAt', + 'url' => 'url', + 'imageUrl' => 'imageUrl', + 'sku' => 'sku', + 'price' => 'price', + 'categories' => 'categories', + 'parentId' => 'parentId', + 's3Original' => 's3Original', + 's3ThumbAnalytics' => 's3ThumbAnalytics', + 'metaInfo' => 'metaInfo', + 's3ThumbEditor' => 's3ThumbEditor', + 'isDeleted' => 'isDeleted' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'createdAt' => 'setCreatedAt', + 'modifiedAt' => 'setModifiedAt', + 'url' => 'setUrl', + 'imageUrl' => 'setImageUrl', + 'sku' => 'setSku', + 'price' => 'setPrice', + 'categories' => 'setCategories', + 'parentId' => 'setParentId', + 's3Original' => 'setS3Original', + 's3ThumbAnalytics' => 'setS3ThumbAnalytics', + 'metaInfo' => 'setMetaInfo', + 's3ThumbEditor' => 'setS3ThumbEditor', + 'isDeleted' => 'setIsDeleted' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'createdAt' => 'getCreatedAt', + 'modifiedAt' => 'getModifiedAt', + 'url' => 'getUrl', + 'imageUrl' => 'getImageUrl', + 'sku' => 'getSku', + 'price' => 'getPrice', + 'categories' => 'getCategories', + 'parentId' => 'getParentId', + 's3Original' => 'getS3Original', + 's3ThumbAnalytics' => 'getS3ThumbAnalytics', + 'metaInfo' => 'getMetaInfo', + 's3ThumbEditor' => 'getS3ThumbEditor', + 'isDeleted' => 'getIsDeleted' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; + $this->container['modifiedAt'] = isset($data['modifiedAt']) ? $data['modifiedAt'] : null; + $this->container['url'] = isset($data['url']) ? $data['url'] : null; + $this->container['imageUrl'] = isset($data['imageUrl']) ? $data['imageUrl'] : null; + $this->container['sku'] = isset($data['sku']) ? $data['sku'] : null; + $this->container['price'] = isset($data['price']) ? $data['price'] : null; + $this->container['categories'] = isset($data['categories']) ? $data['categories'] : null; + $this->container['parentId'] = isset($data['parentId']) ? $data['parentId'] : null; + $this->container['s3Original'] = isset($data['s3Original']) ? $data['s3Original'] : null; + $this->container['s3ThumbAnalytics'] = isset($data['s3ThumbAnalytics']) ? $data['s3ThumbAnalytics'] : null; + $this->container['metaInfo'] = isset($data['metaInfo']) ? $data['metaInfo'] : null; + $this->container['s3ThumbEditor'] = isset($data['s3ThumbEditor']) ? $data['s3ThumbEditor'] : null; + $this->container['isDeleted'] = isset($data['isDeleted']) ? $data['isDeleted'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + if ($this->container['modifiedAt'] === null) { + $invalidProperties[] = "'modifiedAt' can't be null"; + } + if ($this->container['s3ThumbAnalytics'] === null) { + $invalidProperties[] = "'s3ThumbAnalytics' can't be null"; + } + if ($this->container['s3ThumbEditor'] === null) { + $invalidProperties[] = "'s3ThumbEditor' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Product ID for which you requested the details + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the product for which you requested the details + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets createdAt + * + * @return string + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param string $createdAt Creation UTC date-time of the product (YYYY-MM-DDTHH:mm:ss.SSSZ) + * + * @return $this + */ + public function setCreatedAt($createdAt) + { + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets modifiedAt + * + * @return string + */ + public function getModifiedAt() + { + return $this->container['modifiedAt']; + } + + /** + * Sets modifiedAt + * + * @param string $modifiedAt Last modification UTC date-time of the product (YYYY-MM-DDTHH:mm:ss.SSSZ) + * + * @return $this + */ + public function setModifiedAt($modifiedAt) + { + $this->container['modifiedAt'] = $modifiedAt; + + return $this; + } + + /** + * Gets url + * + * @return string + */ + public function getUrl() + { + return $this->container['url']; + } + + /** + * Sets url + * + * @param string $url URL to the product + * + * @return $this + */ + public function setUrl($url) + { + $this->container['url'] = $url; + + return $this; + } + + /** + * Gets imageUrl + * + * @return string + */ + public function getImageUrl() + { + return $this->container['imageUrl']; + } + + /** + * Sets imageUrl + * + * @param string $imageUrl Absolute URL to the cover image of the product + * + * @return $this + */ + public function setImageUrl($imageUrl) + { + $this->container['imageUrl'] = $imageUrl; + + return $this; + } + + /** + * Gets sku + * + * @return string + */ + public function getSku() + { + return $this->container['sku']; + } + + /** + * Sets sku + * + * @param string $sku Product identifier from the shop + * + * @return $this + */ + public function setSku($sku) + { + $this->container['sku'] = $sku; + + return $this; + } + + /** + * Gets price + * + * @return float + */ + public function getPrice() + { + return $this->container['price']; + } + + /** + * Sets price + * + * @param float $price Price of the product + * + * @return $this + */ + public function setPrice($price) + { + $this->container['price'] = $price; + + return $this; + } + + /** + * Gets categories + * + * @return string[] + */ + public function getCategories() + { + return $this->container['categories']; + } + + /** + * Sets categories + * + * @param string[] $categories Category ID-s of the product + * + * @return $this + */ + public function setCategories($categories) + { + $this->container['categories'] = $categories; + + return $this; + } + + /** + * Gets parentId + * + * @return string + */ + public function getParentId() + { + return $this->container['parentId']; + } + + /** + * Sets parentId + * + * @param string $parentId Parent product id of the product + * + * @return $this + */ + public function setParentId($parentId) + { + $this->container['parentId'] = $parentId; + + return $this; + } + + /** + * Gets s3Original + * + * @return string + */ + public function getS3Original() + { + return $this->container['s3Original']; + } + + /** + * Sets s3Original + * + * @param string $s3Original S3 url of original image + * + * @return $this + */ + public function setS3Original($s3Original) + { + $this->container['s3Original'] = $s3Original; + + return $this; + } + + /** + * Gets s3ThumbAnalytics + * + * @return string + */ + public function getS3ThumbAnalytics() + { + return $this->container['s3ThumbAnalytics']; + } + + /** + * Sets s3ThumbAnalytics + * + * @param string $s3ThumbAnalytics S3 thumbnail url of original image in 120x120 dimension for analytics section + * + * @return $this + */ + public function setS3ThumbAnalytics($s3ThumbAnalytics) + { + $this->container['s3ThumbAnalytics'] = $s3ThumbAnalytics; + + return $this; + } + + /** + * Gets metaInfo + * + * @return object + */ + public function getMetaInfo() + { + return $this->container['metaInfo']; + } + + /** + * Sets metaInfo + * + * @param object $metaInfo Meta data of product such as description, vendor, producer, stock level, etc. + * + * @return $this + */ + public function setMetaInfo($metaInfo) + { + $this->container['metaInfo'] = $metaInfo; + + return $this; + } + + /** + * Gets s3ThumbEditor + * + * @return string + */ + public function getS3ThumbEditor() + { + return $this->container['s3ThumbEditor']; + } + + /** + * Sets s3ThumbEditor + * + * @param string $s3ThumbEditor S3 thumbnail url of original image in 600x400 dimension for editor section + * + * @return $this + */ + public function setS3ThumbEditor($s3ThumbEditor) + { + $this->container['s3ThumbEditor'] = $s3ThumbEditor; + + return $this; + } + + /** + * Gets isDeleted + * + * @return bool + */ + public function getIsDeleted() + { + return $this->container['isDeleted']; + } + + /** + * Sets isDeleted + * + * @param bool $isDeleted product deleted from the shop's database + * + * @return $this + */ + public function setIsDeleted($isDeleted) + { + $this->container['isDeleted'] = $isDeleted; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetProducts.php b/vendor/getbrevo/brevo-php/lib/Model/GetProducts.php new file mode 100644 index 0000000..3e432a0 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetProducts.php @@ -0,0 +1,341 @@ + 'object[]', + 'count' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'products' => null, + 'count' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'products' => 'products', + 'count' => 'count' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'products' => 'setProducts', + 'count' => 'setCount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'products' => 'getProducts', + 'count' => 'getCount' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['products'] = isset($data['products']) ? $data['products'] : null; + $this->container['count'] = isset($data['count']) ? $data['count'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['products'] === null) { + $invalidProperties[] = "'products' can't be null"; + } + if ($this->container['count'] === null) { + $invalidProperties[] = "'count' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets products + * + * @return object[] + */ + public function getProducts() + { + return $this->container['products']; + } + + /** + * Sets products + * + * @param object[] $products products + * + * @return $this + */ + public function setProducts($products) + { + $this->container['products'] = $products; + + return $this; + } + + /** + * Gets count + * + * @return int + */ + public function getCount() + { + return $this->container['count']; + } + + /** + * Sets count + * + * @param int $count Number of products + * + * @return $this + */ + public function setCount($count) + { + $this->container['count'] = $count; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetReports.php b/vendor/getbrevo/brevo-php/lib/Model/GetReports.php new file mode 100644 index 0000000..07d8bf7 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetReports.php @@ -0,0 +1,305 @@ + '\Brevo\Client\Model\GetReportsReports[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'reports' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'reports' => 'reports' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'reports' => 'setReports' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'reports' => 'getReports' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['reports'] = isset($data['reports']) ? $data['reports'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets reports + * + * @return \Brevo\Client\Model\GetReportsReports[] + */ + public function getReports() + { + return $this->container['reports']; + } + + /** + * Sets reports + * + * @param \Brevo\Client\Model\GetReportsReports[] $reports reports + * + * @return $this + */ + public function setReports($reports) + { + $this->container['reports'] = $reports; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetReportsReports.php b/vendor/getbrevo/brevo-php/lib/Model/GetReportsReports.php new file mode 100644 index 0000000..49106d6 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetReportsReports.php @@ -0,0 +1,704 @@ + '\DateTime', + 'requests' => 'int', + 'delivered' => 'int', + 'hardBounces' => 'int', + 'softBounces' => 'int', + 'clicks' => 'int', + 'uniqueClicks' => 'int', + 'opens' => 'int', + 'uniqueOpens' => 'int', + 'spamReports' => 'int', + 'blocked' => 'int', + 'invalid' => 'int', + 'unsubscribed' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'date' => 'date', + 'requests' => 'int64', + 'delivered' => 'int64', + 'hardBounces' => 'int64', + 'softBounces' => 'int64', + 'clicks' => 'int64', + 'uniqueClicks' => 'int64', + 'opens' => 'int64', + 'uniqueOpens' => 'int64', + 'spamReports' => 'int64', + 'blocked' => 'int64', + 'invalid' => 'int64', + 'unsubscribed' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'date' => 'date', + 'requests' => 'requests', + 'delivered' => 'delivered', + 'hardBounces' => 'hardBounces', + 'softBounces' => 'softBounces', + 'clicks' => 'clicks', + 'uniqueClicks' => 'uniqueClicks', + 'opens' => 'opens', + 'uniqueOpens' => 'uniqueOpens', + 'spamReports' => 'spamReports', + 'blocked' => 'blocked', + 'invalid' => 'invalid', + 'unsubscribed' => 'unsubscribed' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'date' => 'setDate', + 'requests' => 'setRequests', + 'delivered' => 'setDelivered', + 'hardBounces' => 'setHardBounces', + 'softBounces' => 'setSoftBounces', + 'clicks' => 'setClicks', + 'uniqueClicks' => 'setUniqueClicks', + 'opens' => 'setOpens', + 'uniqueOpens' => 'setUniqueOpens', + 'spamReports' => 'setSpamReports', + 'blocked' => 'setBlocked', + 'invalid' => 'setInvalid', + 'unsubscribed' => 'setUnsubscribed' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'date' => 'getDate', + 'requests' => 'getRequests', + 'delivered' => 'getDelivered', + 'hardBounces' => 'getHardBounces', + 'softBounces' => 'getSoftBounces', + 'clicks' => 'getClicks', + 'uniqueClicks' => 'getUniqueClicks', + 'opens' => 'getOpens', + 'uniqueOpens' => 'getUniqueOpens', + 'spamReports' => 'getSpamReports', + 'blocked' => 'getBlocked', + 'invalid' => 'getInvalid', + 'unsubscribed' => 'getUnsubscribed' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['date'] = isset($data['date']) ? $data['date'] : null; + $this->container['requests'] = isset($data['requests']) ? $data['requests'] : null; + $this->container['delivered'] = isset($data['delivered']) ? $data['delivered'] : null; + $this->container['hardBounces'] = isset($data['hardBounces']) ? $data['hardBounces'] : null; + $this->container['softBounces'] = isset($data['softBounces']) ? $data['softBounces'] : null; + $this->container['clicks'] = isset($data['clicks']) ? $data['clicks'] : null; + $this->container['uniqueClicks'] = isset($data['uniqueClicks']) ? $data['uniqueClicks'] : null; + $this->container['opens'] = isset($data['opens']) ? $data['opens'] : null; + $this->container['uniqueOpens'] = isset($data['uniqueOpens']) ? $data['uniqueOpens'] : null; + $this->container['spamReports'] = isset($data['spamReports']) ? $data['spamReports'] : null; + $this->container['blocked'] = isset($data['blocked']) ? $data['blocked'] : null; + $this->container['invalid'] = isset($data['invalid']) ? $data['invalid'] : null; + $this->container['unsubscribed'] = isset($data['unsubscribed']) ? $data['unsubscribed'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['date'] === null) { + $invalidProperties[] = "'date' can't be null"; + } + if ($this->container['requests'] === null) { + $invalidProperties[] = "'requests' can't be null"; + } + if ($this->container['delivered'] === null) { + $invalidProperties[] = "'delivered' can't be null"; + } + if ($this->container['hardBounces'] === null) { + $invalidProperties[] = "'hardBounces' can't be null"; + } + if ($this->container['softBounces'] === null) { + $invalidProperties[] = "'softBounces' can't be null"; + } + if ($this->container['clicks'] === null) { + $invalidProperties[] = "'clicks' can't be null"; + } + if ($this->container['uniqueClicks'] === null) { + $invalidProperties[] = "'uniqueClicks' can't be null"; + } + if ($this->container['opens'] === null) { + $invalidProperties[] = "'opens' can't be null"; + } + if ($this->container['uniqueOpens'] === null) { + $invalidProperties[] = "'uniqueOpens' can't be null"; + } + if ($this->container['spamReports'] === null) { + $invalidProperties[] = "'spamReports' can't be null"; + } + if ($this->container['blocked'] === null) { + $invalidProperties[] = "'blocked' can't be null"; + } + if ($this->container['invalid'] === null) { + $invalidProperties[] = "'invalid' can't be null"; + } + if ($this->container['unsubscribed'] === null) { + $invalidProperties[] = "'unsubscribed' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets date + * + * @return \DateTime + */ + public function getDate() + { + return $this->container['date']; + } + + /** + * Sets date + * + * @param \DateTime $date Date of the statistics + * + * @return $this + */ + public function setDate($date) + { + $this->container['date'] = $date; + + return $this; + } + + /** + * Gets requests + * + * @return int + */ + public function getRequests() + { + return $this->container['requests']; + } + + /** + * Sets requests + * + * @param int $requests Number of requests for the date + * + * @return $this + */ + public function setRequests($requests) + { + $this->container['requests'] = $requests; + + return $this; + } + + /** + * Gets delivered + * + * @return int + */ + public function getDelivered() + { + return $this->container['delivered']; + } + + /** + * Sets delivered + * + * @param int $delivered Number of delivered emails for the date + * + * @return $this + */ + public function setDelivered($delivered) + { + $this->container['delivered'] = $delivered; + + return $this; + } + + /** + * Gets hardBounces + * + * @return int + */ + public function getHardBounces() + { + return $this->container['hardBounces']; + } + + /** + * Sets hardBounces + * + * @param int $hardBounces Number of hardbounces for the date + * + * @return $this + */ + public function setHardBounces($hardBounces) + { + $this->container['hardBounces'] = $hardBounces; + + return $this; + } + + /** + * Gets softBounces + * + * @return int + */ + public function getSoftBounces() + { + return $this->container['softBounces']; + } + + /** + * Sets softBounces + * + * @param int $softBounces Number of softbounces for the date + * + * @return $this + */ + public function setSoftBounces($softBounces) + { + $this->container['softBounces'] = $softBounces; + + return $this; + } + + /** + * Gets clicks + * + * @return int + */ + public function getClicks() + { + return $this->container['clicks']; + } + + /** + * Sets clicks + * + * @param int $clicks Number of clicks for the date + * + * @return $this + */ + public function setClicks($clicks) + { + $this->container['clicks'] = $clicks; + + return $this; + } + + /** + * Gets uniqueClicks + * + * @return int + */ + public function getUniqueClicks() + { + return $this->container['uniqueClicks']; + } + + /** + * Sets uniqueClicks + * + * @param int $uniqueClicks Number of unique clicks for the date + * + * @return $this + */ + public function setUniqueClicks($uniqueClicks) + { + $this->container['uniqueClicks'] = $uniqueClicks; + + return $this; + } + + /** + * Gets opens + * + * @return int + */ + public function getOpens() + { + return $this->container['opens']; + } + + /** + * Sets opens + * + * @param int $opens Number of openings for the date + * + * @return $this + */ + public function setOpens($opens) + { + $this->container['opens'] = $opens; + + return $this; + } + + /** + * Gets uniqueOpens + * + * @return int + */ + public function getUniqueOpens() + { + return $this->container['uniqueOpens']; + } + + /** + * Sets uniqueOpens + * + * @param int $uniqueOpens Number of unique openings for the date + * + * @return $this + */ + public function setUniqueOpens($uniqueOpens) + { + $this->container['uniqueOpens'] = $uniqueOpens; + + return $this; + } + + /** + * Gets spamReports + * + * @return int + */ + public function getSpamReports() + { + return $this->container['spamReports']; + } + + /** + * Sets spamReports + * + * @param int $spamReports Number of complaints (spam reports) for the date + * + * @return $this + */ + public function setSpamReports($spamReports) + { + $this->container['spamReports'] = $spamReports; + + return $this; + } + + /** + * Gets blocked + * + * @return int + */ + public function getBlocked() + { + return $this->container['blocked']; + } + + /** + * Sets blocked + * + * @param int $blocked Number of blocked emails for the date + * + * @return $this + */ + public function setBlocked($blocked) + { + $this->container['blocked'] = $blocked; + + return $this; + } + + /** + * Gets invalid + * + * @return int + */ + public function getInvalid() + { + return $this->container['invalid']; + } + + /** + * Sets invalid + * + * @param int $invalid Number of invalid emails for the date + * + * @return $this + */ + public function setInvalid($invalid) + { + $this->container['invalid'] = $invalid; + + return $this; + } + + /** + * Gets unsubscribed + * + * @return int + */ + public function getUnsubscribed() + { + return $this->container['unsubscribed']; + } + + /** + * Sets unsubscribed + * + * @param int $unsubscribed Number of unsubscribed emails for the date + * + * @return $this + */ + public function setUnsubscribed($unsubscribed) + { + $this->container['unsubscribed'] = $unsubscribed; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetScheduledEmailByBatchId.php b/vendor/getbrevo/brevo-php/lib/Model/GetScheduledEmailByBatchId.php new file mode 100644 index 0000000..fc0ad3e --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetScheduledEmailByBatchId.php @@ -0,0 +1,335 @@ + 'int', + 'batches' => '\Brevo\Client\Model\GetScheduledEmailByBatchIdBatches[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'count' => null, + 'batches' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'count' => 'count', + 'batches' => 'batches' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'count' => 'setCount', + 'batches' => 'setBatches' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'count' => 'getCount', + 'batches' => 'getBatches' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['count'] = isset($data['count']) ? $data['count'] : null; + $this->container['batches'] = isset($data['batches']) ? $data['batches'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets count + * + * @return int + */ + public function getCount() + { + return $this->container['count']; + } + + /** + * Sets count + * + * @param int $count Total number of batches + * + * @return $this + */ + public function setCount($count) + { + $this->container['count'] = $count; + + return $this; + } + + /** + * Gets batches + * + * @return \Brevo\Client\Model\GetScheduledEmailByBatchIdBatches[] + */ + public function getBatches() + { + return $this->container['batches']; + } + + /** + * Sets batches + * + * @param \Brevo\Client\Model\GetScheduledEmailByBatchIdBatches[] $batches batches + * + * @return $this + */ + public function setBatches($batches) + { + $this->container['batches'] = $batches; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetScheduledEmailByBatchIdBatches.php b/vendor/getbrevo/brevo-php/lib/Model/GetScheduledEmailByBatchIdBatches.php new file mode 100644 index 0000000..59bc501 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetScheduledEmailByBatchIdBatches.php @@ -0,0 +1,410 @@ + '\DateTime', + 'createdAt' => '\DateTime', + 'status' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'scheduledAt' => 'date-time', + 'createdAt' => 'date-time', + 'status' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'scheduledAt' => 'scheduledAt', + 'createdAt' => 'createdAt', + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'scheduledAt' => 'setScheduledAt', + 'createdAt' => 'setCreatedAt', + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'scheduledAt' => 'getScheduledAt', + 'createdAt' => 'getCreatedAt', + 'status' => 'getStatus' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const STATUS_IN_PROGRESS = 'inProgress'; + const STATUS_QUEUED = 'queued'; + const STATUS_PROCESSED = 'processed'; + const STATUS_ERROR = 'error'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_IN_PROGRESS, + self::STATUS_QUEUED, + self::STATUS_PROCESSED, + self::STATUS_ERROR, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['scheduledAt'] = isset($data['scheduledAt']) ? $data['scheduledAt'] : null; + $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['scheduledAt'] === null) { + $invalidProperties[] = "'scheduledAt' can't be null"; + } + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'status', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets scheduledAt + * + * @return \DateTime + */ + public function getScheduledAt() + { + return $this->container['scheduledAt']; + } + + /** + * Sets scheduledAt + * + * @param \DateTime $scheduledAt Datetime for which the batch was scheduled + * + * @return $this + */ + public function setScheduledAt($scheduledAt) + { + $this->container['scheduledAt'] = $scheduledAt; + + return $this; + } + + /** + * Gets createdAt + * + * @return \DateTime + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param \DateTime $createdAt Datetime on which the batch was scheduled + * + * @return $this + */ + public function setCreatedAt($createdAt) + { + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status Current status of the scheduled batch + * + * @return $this + */ + public function setStatus($status) + { + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'status', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetScheduledEmailByMessageId.php b/vendor/getbrevo/brevo-php/lib/Model/GetScheduledEmailByMessageId.php new file mode 100644 index 0000000..7064a41 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetScheduledEmailByMessageId.php @@ -0,0 +1,410 @@ + '\DateTime', + 'createdAt' => '\DateTime', + 'status' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'scheduledAt' => 'date-time', + 'createdAt' => 'date-time', + 'status' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'scheduledAt' => 'scheduledAt', + 'createdAt' => 'createdAt', + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'scheduledAt' => 'setScheduledAt', + 'createdAt' => 'setCreatedAt', + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'scheduledAt' => 'getScheduledAt', + 'createdAt' => 'getCreatedAt', + 'status' => 'getStatus' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const STATUS_IN_PROGRESS = 'inProgress'; + const STATUS_QUEUED = 'queued'; + const STATUS_PROCESSED = 'processed'; + const STATUS_ERROR = 'error'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_IN_PROGRESS, + self::STATUS_QUEUED, + self::STATUS_PROCESSED, + self::STATUS_ERROR, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['scheduledAt'] = isset($data['scheduledAt']) ? $data['scheduledAt'] : null; + $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['scheduledAt'] === null) { + $invalidProperties[] = "'scheduledAt' can't be null"; + } + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'status', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets scheduledAt + * + * @return \DateTime + */ + public function getScheduledAt() + { + return $this->container['scheduledAt']; + } + + /** + * Sets scheduledAt + * + * @param \DateTime $scheduledAt Datetime for which the email was scheduled + * + * @return $this + */ + public function setScheduledAt($scheduledAt) + { + $this->container['scheduledAt'] = $scheduledAt; + + return $this; + } + + /** + * Gets createdAt + * + * @return \DateTime + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param \DateTime $createdAt Datetime on which the email was scheduled + * + * @return $this + */ + public function setCreatedAt($createdAt) + { + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status Current status of the scheduled email + * + * @return $this + */ + public function setStatus($status) + { + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'status', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetSegments.php b/vendor/getbrevo/brevo-php/lib/Model/GetSegments.php new file mode 100644 index 0000000..96c0b51 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetSegments.php @@ -0,0 +1,335 @@ + '\Brevo\Client\Model\GetSegmentsSegments', + 'count' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'segments' => null, + 'count' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'segments' => 'segments', + 'count' => 'count' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'segments' => 'setSegments', + 'count' => 'setCount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'segments' => 'getSegments', + 'count' => 'getCount' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['segments'] = isset($data['segments']) ? $data['segments'] : null; + $this->container['count'] = isset($data['count']) ? $data['count'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets segments + * + * @return \Brevo\Client\Model\GetSegmentsSegments + */ + public function getSegments() + { + return $this->container['segments']; + } + + /** + * Sets segments + * + * @param \Brevo\Client\Model\GetSegmentsSegments $segments segments + * + * @return $this + */ + public function setSegments($segments) + { + $this->container['segments'] = $segments; + + return $this; + } + + /** + * Gets count + * + * @return int + */ + public function getCount() + { + return $this->container['count']; + } + + /** + * Sets count + * + * @param int $count Number of Segments available in your account + * + * @return $this + */ + public function setCount($count) + { + $this->container['count'] = $count; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetSegmentsSegments.php b/vendor/getbrevo/brevo-php/lib/Model/GetSegmentsSegments.php new file mode 100644 index 0000000..fed8fc0 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetSegmentsSegments.php @@ -0,0 +1,395 @@ + 'int', + 'segmentName' => 'string', + 'categoryName' => 'string', + 'updatedAt' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'int64', + 'segmentName' => null, + 'categoryName' => 'string', + 'updatedAt' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'segmentName' => 'segmentName', + 'categoryName' => 'categoryName', + 'updatedAt' => 'updatedAt' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'segmentName' => 'setSegmentName', + 'categoryName' => 'setCategoryName', + 'updatedAt' => 'setUpdatedAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'segmentName' => 'getSegmentName', + 'categoryName' => 'getCategoryName', + 'updatedAt' => 'getUpdatedAt' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['segmentName'] = isset($data['segmentName']) ? $data['segmentName'] : null; + $this->container['categoryName'] = isset($data['categoryName']) ? $data['categoryName'] : null; + $this->container['updatedAt'] = isset($data['updatedAt']) ? $data['updatedAt'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id ID of the list + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets segmentName + * + * @return string + */ + public function getSegmentName() + { + return $this->container['segmentName']; + } + + /** + * Sets segmentName + * + * @param string $segmentName Name of the Segment + * + * @return $this + */ + public function setSegmentName($segmentName) + { + $this->container['segmentName'] = $segmentName; + + return $this; + } + + /** + * Gets categoryName + * + * @return string + */ + public function getCategoryName() + { + return $this->container['categoryName']; + } + + /** + * Sets categoryName + * + * @param string $categoryName Name of the Segment Category + * + * @return $this + */ + public function setCategoryName($categoryName) + { + $this->container['categoryName'] = $categoryName; + + return $this; + } + + /** + * Gets updatedAt + * + * @return string + */ + public function getUpdatedAt() + { + return $this->container['updatedAt']; + } + + /** + * Sets updatedAt + * + * @param string $updatedAt Updation UTC date-time of the segment (YYYY-MM-DDTHH:mm:ss.SSSZ) + * + * @return $this + */ + public function setUpdatedAt($updatedAt) + { + $this->container['updatedAt'] = $updatedAt; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetSendersList.php b/vendor/getbrevo/brevo-php/lib/Model/GetSendersList.php new file mode 100644 index 0000000..4651dc8 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetSendersList.php @@ -0,0 +1,305 @@ + '\Brevo\Client\Model\GetSendersListSenders[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'senders' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'senders' => 'senders' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'senders' => 'setSenders' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'senders' => 'getSenders' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['senders'] = isset($data['senders']) ? $data['senders'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets senders + * + * @return \Brevo\Client\Model\GetSendersListSenders[] + */ + public function getSenders() + { + return $this->container['senders']; + } + + /** + * Sets senders + * + * @param \Brevo\Client\Model\GetSendersListSenders[] $senders List of the senders available in your account + * + * @return $this + */ + public function setSenders($senders) + { + $this->container['senders'] = $senders; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetSendersListIps.php b/vendor/getbrevo/brevo-php/lib/Model/GetSendersListIps.php new file mode 100644 index 0000000..8bfc1fb --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetSendersListIps.php @@ -0,0 +1,374 @@ + 'string', + 'domain' => 'string', + 'weight' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'ip' => null, + 'domain' => null, + 'weight' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'ip' => 'ip', + 'domain' => 'domain', + 'weight' => 'weight' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'ip' => 'setIp', + 'domain' => 'setDomain', + 'weight' => 'setWeight' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'ip' => 'getIp', + 'domain' => 'getDomain', + 'weight' => 'getWeight' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; + $this->container['domain'] = isset($data['domain']) ? $data['domain'] : null; + $this->container['weight'] = isset($data['weight']) ? $data['weight'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['ip'] === null) { + $invalidProperties[] = "'ip' can't be null"; + } + if ($this->container['domain'] === null) { + $invalidProperties[] = "'domain' can't be null"; + } + if ($this->container['weight'] === null) { + $invalidProperties[] = "'weight' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets ip + * + * @return string + */ + public function getIp() + { + return $this->container['ip']; + } + + /** + * Sets ip + * + * @param string $ip Dedicated IP available in your account + * + * @return $this + */ + public function setIp($ip) + { + $this->container['ip'] = $ip; + + return $this; + } + + /** + * Gets domain + * + * @return string + */ + public function getDomain() + { + return $this->container['domain']; + } + + /** + * Sets domain + * + * @param string $domain Domain of the IP + * + * @return $this + */ + public function setDomain($domain) + { + $this->container['domain'] = $domain; + + return $this; + } + + /** + * Gets weight + * + * @return int + */ + public function getWeight() + { + return $this->container['weight']; + } + + /** + * Sets weight + * + * @param int $weight Weight of the IP for this sender + * + * @return $this + */ + public function setWeight($weight) + { + $this->container['weight'] = $weight; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetSendersListSenders.php b/vendor/getbrevo/brevo-php/lib/Model/GetSendersListSenders.php new file mode 100644 index 0000000..b621f86 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetSendersListSenders.php @@ -0,0 +1,437 @@ + 'int', + 'name' => 'string', + 'email' => 'string', + 'active' => 'bool', + 'ips' => '\Brevo\Client\Model\GetSendersListIps[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'int64', + 'name' => null, + 'email' => null, + 'active' => null, + 'ips' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'email' => 'email', + 'active' => 'active', + 'ips' => 'ips' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'email' => 'setEmail', + 'active' => 'setActive', + 'ips' => 'setIps' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'email' => 'getEmail', + 'active' => 'getActive', + 'ips' => 'getIps' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['active'] = isset($data['active']) ? $data['active'] : null; + $this->container['ips'] = isset($data['ips']) ? $data['ips'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + if ($this->container['active'] === null) { + $invalidProperties[] = "'active' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id Id of the sender + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name From Name associated to the sender + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email From Email associated to the sender + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets active + * + * @return bool + */ + public function getActive() + { + return $this->container['active']; + } + + /** + * Sets active + * + * @param bool $active Status of sender (true=activated, false=deactivated) + * + * @return $this + */ + public function setActive($active) + { + $this->container['active'] = $active; + + return $this; + } + + /** + * Gets ips + * + * @return \Brevo\Client\Model\GetSendersListIps[] + */ + public function getIps() + { + return $this->container['ips']; + } + + /** + * Sets ips + * + * @param \Brevo\Client\Model\GetSendersListIps[] $ips List of dedicated IP(s) available in the account. This data is displayed only for dedicated IPs + * + * @return $this + */ + public function setIps($ips) + { + $this->container['ips'] = $ips; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetSharedTemplateUrl.php b/vendor/getbrevo/brevo-php/lib/Model/GetSharedTemplateUrl.php new file mode 100644 index 0000000..62e3eb3 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetSharedTemplateUrl.php @@ -0,0 +1,308 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'sharedUrl' => 'url' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'sharedUrl' => 'sharedUrl' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'sharedUrl' => 'setSharedUrl' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'sharedUrl' => 'getSharedUrl' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['sharedUrl'] = isset($data['sharedUrl']) ? $data['sharedUrl'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['sharedUrl'] === null) { + $invalidProperties[] = "'sharedUrl' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets sharedUrl + * + * @return string + */ + public function getSharedUrl() + { + return $this->container['sharedUrl']; + } + + /** + * Sets sharedUrl + * + * @param string $sharedUrl A unique URL for the email campaign or transactional template. This URL can be shared with other Brevo users. + * + * @return $this + */ + public function setSharedUrl($sharedUrl) + { + $this->container['sharedUrl'] = $sharedUrl; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetSmsCampaign.php b/vendor/getbrevo/brevo-php/lib/Model/GetSmsCampaign.php new file mode 100644 index 0000000..4499ec6 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetSmsCampaign.php @@ -0,0 +1,642 @@ + 'int', + 'name' => 'string', + 'status' => 'string', + 'content' => 'string', + 'scheduledAt' => 'string', + 'sender' => 'string', + 'createdAt' => 'string', + 'modifiedAt' => 'string', + 'recipients' => 'object', + 'statistics' => 'object' + ]; + + /** + @@ -75,14 +65,6 @@ class GetSmsCampaign implements ModelInterface, ArrayAccess + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'int64', + 'name' => null, + 'status' => null, + 'content' => null, + 'scheduledAt' => null, + 'sender' => null, + 'createdAt' => null, + 'modifiedAt' => null, + 'recipients' => null, + 'statistics' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'status' => 'status', + 'content' => 'content', + 'scheduledAt' => 'scheduledAt', + 'sender' => 'sender', + 'createdAt' => 'createdAt', + 'modifiedAt' => 'modifiedAt', + 'recipients' => 'recipients', + 'statistics' => 'statistics' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'status' => 'setStatus', + 'content' => 'setContent', + 'scheduledAt' => 'setScheduledAt', + 'sender' => 'setSender', + 'createdAt' => 'setCreatedAt', + 'modifiedAt' => 'setModifiedAt', + 'recipients' => 'setRecipients', + 'statistics' => 'setStatistics' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'status' => 'getStatus', + 'content' => 'getContent', + 'scheduledAt' => 'getScheduledAt', + 'sender' => 'getSender', + 'createdAt' => 'getCreatedAt', + 'modifiedAt' => 'getModifiedAt', + 'recipients' => 'getRecipients', + 'statistics' => 'getStatistics' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const STATUS_DRAFT = 'draft'; + const STATUS_SENT = 'sent'; + const STATUS_ARCHIVE = 'archive'; + const STATUS_QUEUED = 'queued'; + const STATUS_SUSPENDED = 'suspended'; + const STATUS_IN_PROCESS = 'inProcess'; + + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_DRAFT, + self::STATUS_SENT, + self::STATUS_ARCHIVE, + self::STATUS_QUEUED, + self::STATUS_SUSPENDED, + self::STATUS_IN_PROCESS, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['content'] = isset($data['content']) ? $data['content'] : null; + $this->container['scheduledAt'] = isset($data['scheduledAt']) ? $data['scheduledAt'] : null; + $this->container['sender'] = isset($data['sender']) ? $data['sender'] : null; + $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; + $this->container['modifiedAt'] = isset($data['modifiedAt']) ? $data['modifiedAt'] : null; + $this->container['recipients'] = isset($data['recipients']) ? $data['recipients'] : null; + $this->container['statistics'] = isset($data['statistics']) ? $data['statistics'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'status', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['content'] === null) { + $invalidProperties[] = "'content' can't be null"; + } + if ($this->container['sender'] === null) { + $invalidProperties[] = "'sender' can't be null"; + } + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + if ($this->container['modifiedAt'] === null) { + $invalidProperties[] = "'modifiedAt' can't be null"; + } + if ($this->container['recipients'] === null) { + $invalidProperties[] = "'recipients' can't be null"; + } + if ($this->container['statistics'] === null) { + $invalidProperties[] = "'statistics' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id ID of the SMS Campaign + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the SMS Campaign + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status Status of the SMS Campaign + * + * @return $this + */ + public function setStatus($status) + { + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'status', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets content + * + * @return string + */ + public function getContent() + { + return $this->container['content']; + } + + /** + * Sets content + * + * @param string $content Content of the SMS Campaign + * + * @return $this + */ + public function setContent($content) + { + $this->container['content'] = $content; + + return $this; + } + + /** + * Gets scheduledAt + * + * @return string + */ + public function getScheduledAt() + { + return $this->container['scheduledAt']; + } + + /** + * Sets scheduledAt + * + * @param string $scheduledAt UTC date-time on which SMS campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format + * + * @return $this + */ + public function setScheduledAt($scheduledAt) + { + $this->container['scheduledAt'] = $scheduledAt; + + return $this; + } + + /** + * Gets sender + * + * @return string + */ + public function getSender() + { + return $this->container['sender']; + } + + /** + * Sets sender + * + * @param string $sender Sender of the SMS Campaign + * + * @return $this + */ + public function setSender($sender) + { + $this->container['sender'] = $sender; + + return $this; + } + + /** + * Gets createdAt + * + * @return string + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param string $createdAt Creation UTC date-time of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + * + * @return $this + */ + public function setCreatedAt($createdAt) + { + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets modifiedAt + * + * @return string + */ + public function getModifiedAt() + { + return $this->container['modifiedAt']; + } + + /** + * Sets modifiedAt + * + * @param string $modifiedAt UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + * + * @return $this + */ + public function setModifiedAt($modifiedAt) + { + $this->container['modifiedAt'] = $modifiedAt; + + return $this; + } + + /** + * Gets recipients + * + * @return object + */ + public function getRecipients() + { + return $this->container['recipients']; + } + + /** + * Sets recipients + * + * @param object $recipients recipients + * + * @return $this + */ + public function setRecipients($recipients) + { + $this->container['recipients'] = $recipients; + + return $this; + } + + /** + * Gets statistics + * + * @return object + */ + public function getStatistics() + { + return $this->container['statistics']; + } + + /** + * Sets statistics + * + * @param object $statistics statistics + * + * @return $this + */ + public function setStatistics($statistics) + { + $this->container['statistics'] = $statistics; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetSmsCampaignOverview.php b/vendor/getbrevo/brevo-php/lib/Model/GetSmsCampaignOverview.php new file mode 100644 index 0000000..739cde9 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetSmsCampaignOverview.php @@ -0,0 +1,576 @@ + 'int', + 'name' => 'string', + 'status' => 'string', + 'content' => 'string', + 'scheduledAt' => 'string', + 'sender' => 'string', + 'createdAt' => 'string', + 'modifiedAt' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'int64', + 'name' => null, + 'status' => null, + 'content' => null, + 'scheduledAt' => null, + 'sender' => null, + 'createdAt' => null, + 'modifiedAt' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'status' => 'status', + 'content' => 'content', + 'scheduledAt' => 'scheduledAt', + 'sender' => 'sender', + 'createdAt' => 'createdAt', + 'modifiedAt' => 'modifiedAt' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'status' => 'setStatus', + 'content' => 'setContent', + 'scheduledAt' => 'setScheduledAt', + 'sender' => 'setSender', + 'createdAt' => 'setCreatedAt', + 'modifiedAt' => 'setModifiedAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'status' => 'getStatus', + 'content' => 'getContent', + 'scheduledAt' => 'getScheduledAt', + 'sender' => 'getSender', + 'createdAt' => 'getCreatedAt', + 'modifiedAt' => 'getModifiedAt' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const STATUS_DRAFT = 'draft'; + const STATUS_SENT = 'sent'; + const STATUS_ARCHIVE = 'archive'; + const STATUS_QUEUED = 'queued'; + const STATUS_SUSPENDED = 'suspended'; + const STATUS_IN_PROCESS = 'inProcess'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_DRAFT, + self::STATUS_SENT, + self::STATUS_ARCHIVE, + self::STATUS_QUEUED, + self::STATUS_SUSPENDED, + self::STATUS_IN_PROCESS, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['content'] = isset($data['content']) ? $data['content'] : null; + $this->container['scheduledAt'] = isset($data['scheduledAt']) ? $data['scheduledAt'] : null; + $this->container['sender'] = isset($data['sender']) ? $data['sender'] : null; + $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; + $this->container['modifiedAt'] = isset($data['modifiedAt']) ? $data['modifiedAt'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'status', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['content'] === null) { + $invalidProperties[] = "'content' can't be null"; + } + if ($this->container['sender'] === null) { + $invalidProperties[] = "'sender' can't be null"; + } + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + if ($this->container['modifiedAt'] === null) { + $invalidProperties[] = "'modifiedAt' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id ID of the SMS Campaign + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the SMS Campaign + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status Status of the SMS Campaign + * + * @return $this + */ + public function setStatus($status) + { + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'status', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets content + * + * @return string + */ + public function getContent() + { + return $this->container['content']; + } + + /** + * Sets content + * + * @param string $content Content of the SMS Campaign + * + * @return $this + */ + public function setContent($content) + { + $this->container['content'] = $content; + + return $this; + } + + /** + * Gets scheduledAt + * + * @return string + */ + public function getScheduledAt() + { + return $this->container['scheduledAt']; + } + + /** + * Sets scheduledAt + * + * @param string $scheduledAt UTC date-time on which SMS campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format + * + * @return $this + */ + public function setScheduledAt($scheduledAt) + { + $this->container['scheduledAt'] = $scheduledAt; + + return $this; + } + + /** + * Gets sender + * + * @return string + */ + public function getSender() + { + return $this->container['sender']; + } + + /** + * Sets sender + * + * @param string $sender Sender of the SMS Campaign + * + * @return $this + */ + public function setSender($sender) + { + $this->container['sender'] = $sender; + + return $this; + } + + /** + * Gets createdAt + * + * @return string + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param string $createdAt Creation UTC date-time of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + * + * @return $this + */ + public function setCreatedAt($createdAt) + { + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets modifiedAt + * + * @return string + */ + public function getModifiedAt() + { + return $this->container['modifiedAt']; + } + + /** + * Sets modifiedAt + * + * @param string $modifiedAt UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + * + * @return $this + */ + public function setModifiedAt($modifiedAt) + { + $this->container['modifiedAt'] = $modifiedAt; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetSmsCampaignRecipients.php b/vendor/getbrevo/brevo-php/lib/Model/GetSmsCampaignRecipients.php new file mode 100644 index 0000000..fecf2a6 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetSmsCampaignRecipients.php @@ -0,0 +1,280 @@ +listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetSmsCampaignStats.php b/vendor/getbrevo/brevo-php/lib/Model/GetSmsCampaignStats.php new file mode 100644 index 0000000..d6b528d --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetSmsCampaignStats.php @@ -0,0 +1,506 @@ + 'int', + 'sent' => 'int', + 'processing' => 'int', + 'softBounces' => 'int', + 'hardBounces' => 'int', + 'unsubscriptions' => 'int', + 'answered' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'delivered' => 'int64', + 'sent' => 'int64', + 'processing' => 'int64', + 'softBounces' => 'int64', + 'hardBounces' => 'int64', + 'unsubscriptions' => 'int64', + 'answered' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'delivered' => 'delivered', + 'sent' => 'sent', + 'processing' => 'processing', + 'softBounces' => 'softBounces', + 'hardBounces' => 'hardBounces', + 'unsubscriptions' => 'unsubscriptions', + 'answered' => 'answered' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'delivered' => 'setDelivered', + 'sent' => 'setSent', + 'processing' => 'setProcessing', + 'softBounces' => 'setSoftBounces', + 'hardBounces' => 'setHardBounces', + 'unsubscriptions' => 'setUnsubscriptions', + 'answered' => 'setAnswered' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'delivered' => 'getDelivered', + 'sent' => 'getSent', + 'processing' => 'getProcessing', + 'softBounces' => 'getSoftBounces', + 'hardBounces' => 'getHardBounces', + 'unsubscriptions' => 'getUnsubscriptions', + 'answered' => 'getAnswered' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['delivered'] = isset($data['delivered']) ? $data['delivered'] : null; + $this->container['sent'] = isset($data['sent']) ? $data['sent'] : null; + $this->container['processing'] = isset($data['processing']) ? $data['processing'] : null; + $this->container['softBounces'] = isset($data['softBounces']) ? $data['softBounces'] : null; + $this->container['hardBounces'] = isset($data['hardBounces']) ? $data['hardBounces'] : null; + $this->container['unsubscriptions'] = isset($data['unsubscriptions']) ? $data['unsubscriptions'] : null; + $this->container['answered'] = isset($data['answered']) ? $data['answered'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['delivered'] === null) { + $invalidProperties[] = "'delivered' can't be null"; + } + if ($this->container['sent'] === null) { + $invalidProperties[] = "'sent' can't be null"; + } + if ($this->container['processing'] === null) { + $invalidProperties[] = "'processing' can't be null"; + } + if ($this->container['softBounces'] === null) { + $invalidProperties[] = "'softBounces' can't be null"; + } + if ($this->container['hardBounces'] === null) { + $invalidProperties[] = "'hardBounces' can't be null"; + } + if ($this->container['unsubscriptions'] === null) { + $invalidProperties[] = "'unsubscriptions' can't be null"; + } + if ($this->container['answered'] === null) { + $invalidProperties[] = "'answered' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets delivered + * + * @return int + */ + public function getDelivered() + { + return $this->container['delivered']; + } + + /** + * Sets delivered + * + * @param int $delivered Number of delivered SMS + * + * @return $this + */ + public function setDelivered($delivered) + { + $this->container['delivered'] = $delivered; + + return $this; + } + + /** + * Gets sent + * + * @return int + */ + public function getSent() + { + return $this->container['sent']; + } + + /** + * Sets sent + * + * @param int $sent Number of sent SMS + * + * @return $this + */ + public function setSent($sent) + { + $this->container['sent'] = $sent; + + return $this; + } + + /** + * Gets processing + * + * @return int + */ + public function getProcessing() + { + return $this->container['processing']; + } + + /** + * Sets processing + * + * @param int $processing Number of processing SMS + * + * @return $this + */ + public function setProcessing($processing) + { + $this->container['processing'] = $processing; + + return $this; + } + + /** + * Gets softBounces + * + * @return int + */ + public function getSoftBounces() + { + return $this->container['softBounces']; + } + + /** + * Sets softBounces + * + * @param int $softBounces Number of softbounced SMS + * + * @return $this + */ + public function setSoftBounces($softBounces) + { + $this->container['softBounces'] = $softBounces; + + return $this; + } + + /** + * Gets hardBounces + * + * @return int + */ + public function getHardBounces() + { + return $this->container['hardBounces']; + } + + /** + * Sets hardBounces + * + * @param int $hardBounces Number of hardbounced SMS + * + * @return $this + */ + public function setHardBounces($hardBounces) + { + $this->container['hardBounces'] = $hardBounces; + + return $this; + } + + /** + * Gets unsubscriptions + * + * @return int + */ + public function getUnsubscriptions() + { + return $this->container['unsubscriptions']; + } + + /** + * Sets unsubscriptions + * + * @param int $unsubscriptions Number of unsubscription SMS + * + * @return $this + */ + public function setUnsubscriptions($unsubscriptions) + { + $this->container['unsubscriptions'] = $unsubscriptions; + + return $this; + } + + /** + * Gets answered + * + * @return int + */ + public function getAnswered() + { + return $this->container['answered']; + } + + /** + * Sets answered + * + * @param int $answered Number of replies to the SMS + * + * @return $this + */ + public function setAnswered($answered) + { + $this->container['answered'] = $answered; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetSmsCampaigns.php b/vendor/getbrevo/brevo-php/lib/Model/GetSmsCampaigns.php new file mode 100644 index 0000000..09a711d --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetSmsCampaigns.php @@ -0,0 +1,335 @@ + 'object[]', + 'count' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'campaigns' => null, + 'count' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'campaigns' => 'campaigns', + 'count' => 'count' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'campaigns' => 'setCampaigns', + 'count' => 'setCount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'campaigns' => 'getCampaigns', + 'count' => 'getCount' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['campaigns'] = isset($data['campaigns']) ? $data['campaigns'] : null; + $this->container['count'] = isset($data['count']) ? $data['count'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets campaigns + * + * @return object[] + */ + public function getCampaigns() + { + return $this->container['campaigns']; + } + + /** + * Sets campaigns + * + * @param object[] $campaigns campaigns + * + * @return $this + */ + public function setCampaigns($campaigns) + { + $this->container['campaigns'] = $campaigns; + + return $this; + } + + /** + * Gets count + * + * @return int + */ + public function getCount() + { + return $this->container['count']; + } + + /** + * Sets count + * + * @param int $count Number of SMS campaigns retrieved + * + * @return $this + */ + public function setCount($count) + { + $this->container['count'] = $count; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetSmsEventReport.php b/vendor/getbrevo/brevo-php/lib/Model/GetSmsEventReport.php new file mode 100644 index 0000000..89833ec --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetSmsEventReport.php @@ -0,0 +1,305 @@ + '\Brevo\Client\Model\GetSmsEventReportEvents[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'events' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'events' => 'events' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'events' => 'setEvents' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'events' => 'getEvents' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['events'] = isset($data['events']) ? $data['events'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets events + * + * @return \Brevo\Client\Model\GetSmsEventReportEvents[] + */ + public function getEvents() + { + return $this->container['events']; + } + + /** + * Sets events + * + * @param \Brevo\Client\Model\GetSmsEventReportEvents[] $events events + * + * @return $this + */ + public function setEvents($events) + { + $this->container['events'] = $events; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetSmsEventReportEvents.php b/vendor/getbrevo/brevo-php/lib/Model/GetSmsEventReportEvents.php new file mode 100644 index 0000000..d10ee82 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetSmsEventReportEvents.php @@ -0,0 +1,533 @@ + 'string', + 'date' => 'string', + 'messageId' => 'string', + 'event' => 'string', + 'reason' => 'string', + 'reply' => 'string', + 'tag' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'phoneNumber' => null, + 'date' => null, + 'messageId' => null, + 'event' => null, + 'reason' => null, + 'reply' => null, + 'tag' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'phoneNumber' => 'phoneNumber', + 'date' => 'date', + 'messageId' => 'messageId', + 'event' => 'event', + 'reason' => 'reason', + 'reply' => 'reply', + 'tag' => 'tag' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'phoneNumber' => 'setPhoneNumber', + 'date' => 'setDate', + 'messageId' => 'setMessageId', + 'event' => 'setEvent', + 'reason' => 'setReason', + 'reply' => 'setReply', + 'tag' => 'setTag' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'phoneNumber' => 'getPhoneNumber', + 'date' => 'getDate', + 'messageId' => 'getMessageId', + 'event' => 'getEvent', + 'reason' => 'getReason', + 'reply' => 'getReply', + 'tag' => 'getTag' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const EVENT_BOUNCES = 'bounces'; + const EVENT_HARD_BOUNCES = 'hardBounces'; + const EVENT_SOFT_BOUNCES = 'softBounces'; + const EVENT_DELIVERED = 'delivered'; + const EVENT_SENT = 'sent'; + const EVENT_ACCEPTED = 'accepted'; + const EVENT_UNSUBSCRIPTION = 'unsubscription'; + const EVENT_REPLIES = 'replies'; + const EVENT_BLOCKED = 'blocked'; + const EVENT_REJECTED = 'rejected'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getEventAllowableValues() + { + return [ + self::EVENT_BOUNCES, + self::EVENT_HARD_BOUNCES, + self::EVENT_SOFT_BOUNCES, + self::EVENT_DELIVERED, + self::EVENT_SENT, + self::EVENT_ACCEPTED, + self::EVENT_UNSUBSCRIPTION, + self::EVENT_REPLIES, + self::EVENT_BLOCKED, + self::EVENT_REJECTED, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['phoneNumber'] = isset($data['phoneNumber']) ? $data['phoneNumber'] : null; + $this->container['date'] = isset($data['date']) ? $data['date'] : null; + $this->container['messageId'] = isset($data['messageId']) ? $data['messageId'] : null; + $this->container['event'] = isset($data['event']) ? $data['event'] : null; + $this->container['reason'] = isset($data['reason']) ? $data['reason'] : null; + $this->container['reply'] = isset($data['reply']) ? $data['reply'] : null; + $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getEventAllowableValues(); + if (!is_null($this->container['event']) && !in_array($this->container['event'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'event', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets phoneNumber + * + * @return string + */ + public function getPhoneNumber() + { + return $this->container['phoneNumber']; + } + + /** + * Sets phoneNumber + * + * @param string $phoneNumber Phone number which has generated the event + * + * @return $this + */ + public function setPhoneNumber($phoneNumber) + { + $this->container['phoneNumber'] = $phoneNumber; + + return $this; + } + + /** + * Gets date + * + * @return string + */ + public function getDate() + { + return $this->container['date']; + } + + /** + * Sets date + * + * @param string $date UTC date-time on which the event has been generated + * + * @return $this + */ + public function setDate($date) + { + $this->container['date'] = $date; + + return $this; + } + + /** + * Gets messageId + * + * @return string + */ + public function getMessageId() + { + return $this->container['messageId']; + } + + /** + * Sets messageId + * + * @param string $messageId Message ID which generated the event + * + * @return $this + */ + public function setMessageId($messageId) + { + $this->container['messageId'] = $messageId; + + return $this; + } + + /** + * Gets event + * + * @return string + */ + public function getEvent() + { + return $this->container['event']; + } + + /** + * Sets event + * + * @param string $event Event which occurred + * + * @return $this + */ + public function setEvent($event) + { + $allowedValues = $this->getEventAllowableValues(); + if (!is_null($event) && !in_array($event, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'event', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['event'] = $event; + + return $this; + } + + /** + * Gets reason + * + * @return string + */ + public function getReason() + { + return $this->container['reason']; + } + + /** + * Sets reason + * + * @param string $reason Reason of bounce (only available if the event is hardbounce or softbounce) + * + * @return $this + */ + public function setReason($reason) + { + $this->container['reason'] = $reason; + + return $this; + } + + /** + * Gets reply + * + * @return string + */ + public function getReply() + { + return $this->container['reply']; + } + + /** + * Sets reply + * + * @param string $reply reply + * + * @return $this + */ + public function setReply($reply) + { + $this->container['reply'] = $reply; + + return $this; + } + + /** + * Gets tag + * + * @return string + */ + public function getTag() + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string $tag Tag of the SMS which generated the event + * + * @return $this + */ + public function setTag($tag) + { + $this->container['tag'] = $tag; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetSmtpTemplateOverview.php b/vendor/getbrevo/brevo-php/lib/Model/GetSmtpTemplateOverview.php new file mode 100644 index 0000000..4a42b55 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetSmtpTemplateOverview.php @@ -0,0 +1,701 @@ + 'int', + 'name' => 'string', + 'subject' => 'string', + 'isActive' => 'bool', + 'testSent' => 'bool', + 'sender' => '\Brevo\Client\Model\GetSmtpTemplateOverviewSender', + 'replyTo' => 'string', + 'toField' => 'string', + 'tag' => 'string', + 'htmlContent' => 'string', + 'createdAt' => 'string', + 'modifiedAt' => 'string', + 'doiTemplate' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'int64', + 'name' => null, + 'subject' => null, + 'isActive' => null, + 'testSent' => null, + 'sender' => null, + 'replyTo' => 'email', + 'toField' => null, + 'tag' => null, + 'htmlContent' => null, + 'createdAt' => null, + 'modifiedAt' => null, + 'doiTemplate' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'subject' => 'subject', + 'isActive' => 'isActive', + 'testSent' => 'testSent', + 'sender' => 'sender', + 'replyTo' => 'replyTo', + 'toField' => 'toField', + 'tag' => 'tag', + 'htmlContent' => 'htmlContent', + 'createdAt' => 'createdAt', + 'modifiedAt' => 'modifiedAt', + 'doiTemplate' => 'doiTemplate' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'subject' => 'setSubject', + 'isActive' => 'setIsActive', + 'testSent' => 'setTestSent', + 'sender' => 'setSender', + 'replyTo' => 'setReplyTo', + 'toField' => 'setToField', + 'tag' => 'setTag', + 'htmlContent' => 'setHtmlContent', + 'createdAt' => 'setCreatedAt', + 'modifiedAt' => 'setModifiedAt', + 'doiTemplate' => 'setDoiTemplate' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'subject' => 'getSubject', + 'isActive' => 'getIsActive', + 'testSent' => 'getTestSent', + 'sender' => 'getSender', + 'replyTo' => 'getReplyTo', + 'toField' => 'getToField', + 'tag' => 'getTag', + 'htmlContent' => 'getHtmlContent', + 'createdAt' => 'getCreatedAt', + 'modifiedAt' => 'getModifiedAt', + 'doiTemplate' => 'getDoiTemplate' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['subject'] = isset($data['subject']) ? $data['subject'] : null; + $this->container['isActive'] = isset($data['isActive']) ? $data['isActive'] : null; + $this->container['testSent'] = isset($data['testSent']) ? $data['testSent'] : null; + $this->container['sender'] = isset($data['sender']) ? $data['sender'] : null; + $this->container['replyTo'] = isset($data['replyTo']) ? $data['replyTo'] : null; + $this->container['toField'] = isset($data['toField']) ? $data['toField'] : null; + $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; + $this->container['htmlContent'] = isset($data['htmlContent']) ? $data['htmlContent'] : null; + $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; + $this->container['modifiedAt'] = isset($data['modifiedAt']) ? $data['modifiedAt'] : null; + $this->container['doiTemplate'] = isset($data['doiTemplate']) ? $data['doiTemplate'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['subject'] === null) { + $invalidProperties[] = "'subject' can't be null"; + } + if ($this->container['isActive'] === null) { + $invalidProperties[] = "'isActive' can't be null"; + } + if ($this->container['testSent'] === null) { + $invalidProperties[] = "'testSent' can't be null"; + } + if ($this->container['sender'] === null) { + $invalidProperties[] = "'sender' can't be null"; + } + if ($this->container['replyTo'] === null) { + $invalidProperties[] = "'replyTo' can't be null"; + } + if ($this->container['toField'] === null) { + $invalidProperties[] = "'toField' can't be null"; + } + if ($this->container['tag'] === null) { + $invalidProperties[] = "'tag' can't be null"; + } + if ($this->container['htmlContent'] === null) { + $invalidProperties[] = "'htmlContent' can't be null"; + } + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + if ($this->container['modifiedAt'] === null) { + $invalidProperties[] = "'modifiedAt' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id ID of the template + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the template + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets subject + * + * @return string + */ + public function getSubject() + { + return $this->container['subject']; + } + + /** + * Sets subject + * + * @param string $subject Subject of the template + * + * @return $this + */ + public function setSubject($subject) + { + $this->container['subject'] = $subject; + + return $this; + } + + /** + * Gets isActive + * + * @return bool + */ + public function getIsActive() + { + return $this->container['isActive']; + } + + /** + * Sets isActive + * + * @param bool $isActive Status of template (true=active, false=inactive) + * + * @return $this + */ + public function setIsActive($isActive) + { + $this->container['isActive'] = $isActive; + + return $this; + } + + /** + * Gets testSent + * + * @return bool + */ + public function getTestSent() + { + return $this->container['testSent']; + } + + /** + * Sets testSent + * + * @param bool $testSent Status of test sending for the template (true=test email has been sent, false=test email has not been sent) + * + * @return $this + */ + public function setTestSent($testSent) + { + $this->container['testSent'] = $testSent; + + return $this; + } + + /** + * Gets sender + * + * @return \Brevo\Client\Model\GetSmtpTemplateOverviewSender + */ + public function getSender() + { + return $this->container['sender']; + } + + /** + * Sets sender + * + * @param \Brevo\Client\Model\GetSmtpTemplateOverviewSender $sender sender + * + * @return $this + */ + public function setSender($sender) + { + $this->container['sender'] = $sender; + + return $this; + } + + /** + * Gets replyTo + * + * @return string + */ + public function getReplyTo() + { + return $this->container['replyTo']; + } + + /** + * Sets replyTo + * + * @param string $replyTo Email defined as the \"Reply to\" for the template + * + * @return $this + */ + public function setReplyTo($replyTo) + { + $this->container['replyTo'] = $replyTo; + + return $this; + } + + /** + * Gets toField + * + * @return string + */ + public function getToField() + { + return $this->container['toField']; + } + + /** + * Sets toField + * + * @param string $toField Customisation of the \"to\" field for the template + * + * @return $this + */ + public function setToField($toField) + { + $this->container['toField'] = $toField; + + return $this; + } + + /** + * Gets tag + * + * @return string + */ + public function getTag() + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string $tag Tag of the template + * + * @return $this + */ + public function setTag($tag) + { + $this->container['tag'] = $tag; + + return $this; + } + + /** + * Gets htmlContent + * + * @return string + */ + public function getHtmlContent() + { + return $this->container['htmlContent']; + } + + /** + * Sets htmlContent + * + * @param string $htmlContent HTML content of the template + * + * @return $this + */ + public function setHtmlContent($htmlContent) + { + $this->container['htmlContent'] = $htmlContent; + + return $this; + } + + /** + * Gets createdAt + * + * @return string + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param string $createdAt Creation UTC date-time of the template (YYYY-MM-DDTHH:mm:ss.SSSZ) + * + * @return $this + */ + public function setCreatedAt($createdAt) + { + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets modifiedAt + * + * @return string + */ + public function getModifiedAt() + { + return $this->container['modifiedAt']; + } + + /** + * Sets modifiedAt + * + * @param string $modifiedAt Last modification UTC date-time of the template (YYYY-MM-DDTHH:mm:ss.SSSZ) + * + * @return $this + */ + public function setModifiedAt($modifiedAt) + { + $this->container['modifiedAt'] = $modifiedAt; + + return $this; + } + + /** + * Gets doiTemplate + * + * @return bool + */ + public function getDoiTemplate() + { + return $this->container['doiTemplate']; + } + + /** + * Sets doiTemplate + * + * @param bool $doiTemplate It is true if template is a valid Double opt-in (DOI) template, otherwise it is false. This field will be available only in case of single template detail call. + * + * @return $this + */ + public function setDoiTemplate($doiTemplate) + { + $this->container['doiTemplate'] = $doiTemplate; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetSmtpTemplateOverviewSender.php b/vendor/getbrevo/brevo-php/lib/Model/GetSmtpTemplateOverviewSender.php new file mode 100644 index 0000000..c753826 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetSmtpTemplateOverviewSender.php @@ -0,0 +1,365 @@ + 'string', + 'email' => 'string', + 'id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null, + 'email' => 'email', + 'id' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'email' => 'email', + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'email' => 'setEmail', + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'email' => 'getEmail', + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name From email for the template + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email From email for the template + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Sender id of the template + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetSmtpTemplates.php b/vendor/getbrevo/brevo-php/lib/Model/GetSmtpTemplates.php new file mode 100644 index 0000000..fd481a4 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetSmtpTemplates.php @@ -0,0 +1,335 @@ + 'int', + 'templates' => '\Brevo\Client\Model\GetSmtpTemplateOverview[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'count' => 'int64', + 'templates' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'count' => 'count', + 'templates' => 'templates' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'count' => 'setCount', + 'templates' => 'setTemplates' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'count' => 'getCount', + 'templates' => 'getTemplates' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['count'] = isset($data['count']) ? $data['count'] : null; + $this->container['templates'] = isset($data['templates']) ? $data['templates'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets count + * + * @return int + */ + public function getCount() + { + return $this->container['count']; + } + + /** + * Sets count + * + * @param int $count Count of transactional email templates + * + * @return $this + */ + public function setCount($count) + { + $this->container['count'] = $count; + + return $this; + } + + /** + * Gets templates + * + * @return \Brevo\Client\Model\GetSmtpTemplateOverview[] + */ + public function getTemplates() + { + return $this->container['templates']; + } + + /** + * Sets templates + * + * @param \Brevo\Client\Model\GetSmtpTemplateOverview[] $templates templates + * + * @return $this + */ + public function setTemplates($templates) + { + $this->container['templates'] = $templates; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetSsoToken.php b/vendor/getbrevo/brevo-php/lib/Model/GetSsoToken.php new file mode 100644 index 0000000..37dd969 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetSsoToken.php @@ -0,0 +1,308 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'token' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'token' => 'token' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'token' => 'setToken' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'token' => 'getToken' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['token'] = isset($data['token']) ? $data['token'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['token'] === null) { + $invalidProperties[] = "'token' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets token + * + * @return string + */ + public function getToken() + { + return $this->container['token']; + } + + /** + * Sets token + * + * @param string $token Session token, it will remain valid for 15 days. + * + * @return $this + */ + public function setToken($token) + { + $this->container['token'] = $token; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetStatsByBrowser.php b/vendor/getbrevo/brevo-php/lib/Model/GetStatsByBrowser.php new file mode 100644 index 0000000..f999856 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetStatsByBrowser.php @@ -0,0 +1,280 @@ +listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetStatsByDevice.php b/vendor/getbrevo/brevo-php/lib/Model/GetStatsByDevice.php new file mode 100644 index 0000000..ab3d9b5 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetStatsByDevice.php @@ -0,0 +1,395 @@ + 'map[string,\Brevo\Client\Model\GetDeviceBrowserStats]', + 'mobile' => 'map[string,\Brevo\Client\Model\GetDeviceBrowserStats]', + 'tablet' => 'map[string,\Brevo\Client\Model\GetDeviceBrowserStats]', + 'unknown' => 'map[string,\Brevo\Client\Model\GetDeviceBrowserStats]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'desktop' => null, + 'mobile' => null, + 'tablet' => null, + 'unknown' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'desktop' => 'desktop', + 'mobile' => 'mobile', + 'tablet' => 'tablet', + 'unknown' => 'unknown' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'desktop' => 'setDesktop', + 'mobile' => 'setMobile', + 'tablet' => 'setTablet', + 'unknown' => 'setUnknown' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'desktop' => 'getDesktop', + 'mobile' => 'getMobile', + 'tablet' => 'getTablet', + 'unknown' => 'getUnknown' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['desktop'] = isset($data['desktop']) ? $data['desktop'] : null; + $this->container['mobile'] = isset($data['mobile']) ? $data['mobile'] : null; + $this->container['tablet'] = isset($data['tablet']) ? $data['tablet'] : null; + $this->container['unknown'] = isset($data['unknown']) ? $data['unknown'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets desktop + * + * @return map[string,\Brevo\Client\Model\GetDeviceBrowserStats] + */ + public function getDesktop() + { + return $this->container['desktop']; + } + + /** + * Sets desktop + * + * @param map[string,\Brevo\Client\Model\GetDeviceBrowserStats] $desktop Statistics of the campaign on the basis of desktop devices + * + * @return $this + */ + public function setDesktop($desktop) + { + $this->container['desktop'] = $desktop; + + return $this; + } + + /** + * Gets mobile + * + * @return map[string,\Brevo\Client\Model\GetDeviceBrowserStats] + */ + public function getMobile() + { + return $this->container['mobile']; + } + + /** + * Sets mobile + * + * @param map[string,\Brevo\Client\Model\GetDeviceBrowserStats] $mobile Statistics of the campaign on the basis of mobile devices + * + * @return $this + */ + public function setMobile($mobile) + { + $this->container['mobile'] = $mobile; + + return $this; + } + + /** + * Gets tablet + * + * @return map[string,\Brevo\Client\Model\GetDeviceBrowserStats] + */ + public function getTablet() + { + return $this->container['tablet']; + } + + /** + * Sets tablet + * + * @param map[string,\Brevo\Client\Model\GetDeviceBrowserStats] $tablet Statistics of the campaign on the basis of tablet devices + * + * @return $this + */ + public function setTablet($tablet) + { + $this->container['tablet'] = $tablet; + + return $this; + } + + /** + * Gets unknown + * + * @return map[string,\Brevo\Client\Model\GetDeviceBrowserStats] + */ + public function getUnknown() + { + return $this->container['unknown']; + } + + /** + * Sets unknown + * + * @param map[string,\Brevo\Client\Model\GetDeviceBrowserStats] $unknown Statistics of the campaign on the basis of unknown devices + * + * @return $this + */ + public function setUnknown($unknown) + { + $this->container['unknown'] = $unknown; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetStatsByDomain.php b/vendor/getbrevo/brevo-php/lib/Model/GetStatsByDomain.php new file mode 100644 index 0000000..fca7c01 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetStatsByDomain.php @@ -0,0 +1,280 @@ +listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetTransacAggregatedSmsReport.php b/vendor/getbrevo/brevo-php/lib/Model/GetTransacAggregatedSmsReport.php new file mode 100644 index 0000000..97c0af0 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetTransacAggregatedSmsReport.php @@ -0,0 +1,575 @@ + 'string', + 'requests' => 'int', + 'delivered' => 'int', + 'hardBounces' => 'int', + 'softBounces' => 'int', + 'blocked' => 'int', + 'unsubscribed' => 'int', + 'replied' => 'int', + 'accepted' => 'int', + 'rejected' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'range' => null, + 'requests' => 'int64', + 'delivered' => 'int64', + 'hardBounces' => 'int64', + 'softBounces' => 'int64', + 'blocked' => 'int64', + 'unsubscribed' => 'int64', + 'replied' => 'int64', + 'accepted' => 'int64', + 'rejected' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'range' => 'range', + 'requests' => 'requests', + 'delivered' => 'delivered', + 'hardBounces' => 'hardBounces', + 'softBounces' => 'softBounces', + 'blocked' => 'blocked', + 'unsubscribed' => 'unsubscribed', + 'replied' => 'replied', + 'accepted' => 'accepted', + 'rejected' => 'rejected' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'range' => 'setRange', + 'requests' => 'setRequests', + 'delivered' => 'setDelivered', + 'hardBounces' => 'setHardBounces', + 'softBounces' => 'setSoftBounces', + 'blocked' => 'setBlocked', + 'unsubscribed' => 'setUnsubscribed', + 'replied' => 'setReplied', + 'accepted' => 'setAccepted', + 'rejected' => 'setRejected' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'range' => 'getRange', + 'requests' => 'getRequests', + 'delivered' => 'getDelivered', + 'hardBounces' => 'getHardBounces', + 'softBounces' => 'getSoftBounces', + 'blocked' => 'getBlocked', + 'unsubscribed' => 'getUnsubscribed', + 'replied' => 'getReplied', + 'accepted' => 'getAccepted', + 'rejected' => 'getRejected' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['range'] = isset($data['range']) ? $data['range'] : null; + $this->container['requests'] = isset($data['requests']) ? $data['requests'] : null; + $this->container['delivered'] = isset($data['delivered']) ? $data['delivered'] : null; + $this->container['hardBounces'] = isset($data['hardBounces']) ? $data['hardBounces'] : null; + $this->container['softBounces'] = isset($data['softBounces']) ? $data['softBounces'] : null; + $this->container['blocked'] = isset($data['blocked']) ? $data['blocked'] : null; + $this->container['unsubscribed'] = isset($data['unsubscribed']) ? $data['unsubscribed'] : null; + $this->container['replied'] = isset($data['replied']) ? $data['replied'] : null; + $this->container['accepted'] = isset($data['accepted']) ? $data['accepted'] : null; + $this->container['rejected'] = isset($data['rejected']) ? $data['rejected'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets range + * + * @return string + */ + public function getRange() + { + return $this->container['range']; + } + + /** + * Sets range + * + * @param string $range Time frame of the report + * + * @return $this + */ + public function setRange($range) + { + $this->container['range'] = $range; + + return $this; + } + + /** + * Gets requests + * + * @return int + */ + public function getRequests() + { + return $this->container['requests']; + } + + /** + * Sets requests + * + * @param int $requests Number of requests for the timeframe + * + * @return $this + */ + public function setRequests($requests) + { + $this->container['requests'] = $requests; + + return $this; + } + + /** + * Gets delivered + * + * @return int + */ + public function getDelivered() + { + return $this->container['delivered']; + } + + /** + * Sets delivered + * + * @param int $delivered Number of delivered SMS for the timeframe + * + * @return $this + */ + public function setDelivered($delivered) + { + $this->container['delivered'] = $delivered; + + return $this; + } + + /** + * Gets hardBounces + * + * @return int + */ + public function getHardBounces() + { + return $this->container['hardBounces']; + } + + /** + * Sets hardBounces + * + * @param int $hardBounces Number of hardbounces for the timeframe + * + * @return $this + */ + public function setHardBounces($hardBounces) + { + $this->container['hardBounces'] = $hardBounces; + + return $this; + } + + /** + * Gets softBounces + * + * @return int + */ + public function getSoftBounces() + { + return $this->container['softBounces']; + } + + /** + * Sets softBounces + * + * @param int $softBounces Number of softbounces for the timeframe + * + * @return $this + */ + public function setSoftBounces($softBounces) + { + $this->container['softBounces'] = $softBounces; + + return $this; + } + + /** + * Gets blocked + * + * @return int + */ + public function getBlocked() + { + return $this->container['blocked']; + } + + /** + * Sets blocked + * + * @param int $blocked Number of blocked contact for the timeframe + * + * @return $this + */ + public function setBlocked($blocked) + { + $this->container['blocked'] = $blocked; + + return $this; + } + + /** + * Gets unsubscribed + * + * @return int + */ + public function getUnsubscribed() + { + return $this->container['unsubscribed']; + } + + /** + * Sets unsubscribed + * + * @param int $unsubscribed Number of unsubscription for the timeframe + * + * @return $this + */ + public function setUnsubscribed($unsubscribed) + { + $this->container['unsubscribed'] = $unsubscribed; + + return $this; + } + + /** + * Gets replied + * + * @return int + */ + public function getReplied() + { + return $this->container['replied']; + } + + /** + * Sets replied + * + * @param int $replied Number of answered SMS for the timeframe + * + * @return $this + */ + public function setReplied($replied) + { + $this->container['replied'] = $replied; + + return $this; + } + + /** + * Gets accepted + * + * @return int + */ + public function getAccepted() + { + return $this->container['accepted']; + } + + /** + * Sets accepted + * + * @param int $accepted Number of accepted for the timeframe + * + * @return $this + */ + public function setAccepted($accepted) + { + $this->container['accepted'] = $accepted; + + return $this; + } + + /** + * Gets rejected + * + * @return int + */ + public function getRejected() + { + return $this->container['rejected']; + } + + /** + * Sets rejected + * + * @param int $rejected Number of rejected for the timeframe + * + * @return $this + */ + public function setRejected($rejected) + { + $this->container['rejected'] = $rejected; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetTransacBlockedContacts.php b/vendor/getbrevo/brevo-php/lib/Model/GetTransacBlockedContacts.php new file mode 100644 index 0000000..0481377 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetTransacBlockedContacts.php @@ -0,0 +1,335 @@ + 'int', + 'contacts' => '\Brevo\Client\Model\GetTransacBlockedContactsContacts[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'count' => 'int64', + 'contacts' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'count' => 'count', + 'contacts' => 'contacts' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'count' => 'setCount', + 'contacts' => 'setContacts' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'count' => 'getCount', + 'contacts' => 'getContacts' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['count'] = isset($data['count']) ? $data['count'] : null; + $this->container['contacts'] = isset($data['contacts']) ? $data['contacts'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets count + * + * @return int + */ + public function getCount() + { + return $this->container['count']; + } + + /** + * Sets count + * + * @param int $count Count of blocked or unsubscribed contact + * + * @return $this + */ + public function setCount($count) + { + $this->container['count'] = $count; + + return $this; + } + + /** + * Gets contacts + * + * @return \Brevo\Client\Model\GetTransacBlockedContactsContacts[] + */ + public function getContacts() + { + return $this->container['contacts']; + } + + /** + * Sets contacts + * + * @param \Brevo\Client\Model\GetTransacBlockedContactsContacts[] $contacts contacts + * + * @return $this + */ + public function setContacts($contacts) + { + $this->container['contacts'] = $contacts; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetTransacBlockedContactsContacts.php b/vendor/getbrevo/brevo-php/lib/Model/GetTransacBlockedContactsContacts.php new file mode 100644 index 0000000..d66e52a --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetTransacBlockedContactsContacts.php @@ -0,0 +1,407 @@ + 'string', + 'senderEmail' => 'string', + 'reason' => '\Brevo\Client\Model\GetTransacBlockedContactsReason', + 'blockedAt' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'email' => 'email', + 'senderEmail' => 'email', + 'reason' => null, + 'blockedAt' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'email' => 'email', + 'senderEmail' => 'senderEmail', + 'reason' => 'reason', + 'blockedAt' => 'blockedAt' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'email' => 'setEmail', + 'senderEmail' => 'setSenderEmail', + 'reason' => 'setReason', + 'blockedAt' => 'setBlockedAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'email' => 'getEmail', + 'senderEmail' => 'getSenderEmail', + 'reason' => 'getReason', + 'blockedAt' => 'getBlockedAt' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['senderEmail'] = isset($data['senderEmail']) ? $data['senderEmail'] : null; + $this->container['reason'] = isset($data['reason']) ? $data['reason'] : null; + $this->container['blockedAt'] = isset($data['blockedAt']) ? $data['blockedAt'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + if ($this->container['senderEmail'] === null) { + $invalidProperties[] = "'senderEmail' can't be null"; + } + if ($this->container['reason'] === null) { + $invalidProperties[] = "'reason' can't be null"; + } + if ($this->container['blockedAt'] === null) { + $invalidProperties[] = "'blockedAt' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email Email address of the blocked or unsubscribed contact + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets senderEmail + * + * @return string + */ + public function getSenderEmail() + { + return $this->container['senderEmail']; + } + + /** + * Sets senderEmail + * + * @param string $senderEmail Sender email address of the blocked or unsubscribed contact + * + * @return $this + */ + public function setSenderEmail($senderEmail) + { + $this->container['senderEmail'] = $senderEmail; + + return $this; + } + + /** + * Gets reason + * + * @return \Brevo\Client\Model\GetTransacBlockedContactsReason + */ + public function getReason() + { + return $this->container['reason']; + } + + /** + * Sets reason + * + * @param \Brevo\Client\Model\GetTransacBlockedContactsReason $reason reason + * + * @return $this + */ + public function setReason($reason) + { + $this->container['reason'] = $reason; + + return $this; + } + + /** + * Gets blockedAt + * + * @return string + */ + public function getBlockedAt() + { + return $this->container['blockedAt']; + } + + /** + * Sets blockedAt + * + * @param string $blockedAt Date when the contact was blocked or unsubscribed on + * + * @return $this + */ + public function setBlockedAt($blockedAt) + { + $this->container['blockedAt'] = $blockedAt; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetTransacBlockedContactsReason.php b/vendor/getbrevo/brevo-php/lib/Model/GetTransacBlockedContactsReason.php new file mode 100644 index 0000000..ea51329 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetTransacBlockedContactsReason.php @@ -0,0 +1,376 @@ + 'string', + 'message' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'code' => null, + 'message' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'code' => 'code', + 'message' => 'message' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'code' => 'setCode', + 'message' => 'setMessage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'code' => 'getCode', + 'message' => 'getMessage' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const CODE_UNSUBSCRIBED_VIA_MA = 'unsubscribedViaMA'; + const CODE_UNSUBSCRIBED_VIA_EMAIL = 'unsubscribedViaEmail'; + const CODE_ADMIN_BLOCKED = 'adminBlocked'; + const CODE_UNSUBSCRIBED_VIA_API = 'unsubscribedViaApi'; + const CODE_HARD_BOUNCE = 'hardBounce'; + const CODE_CONTACT_FLAGGED_AS_SPAM = 'contactFlaggedAsSpam'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getCodeAllowableValues() + { + return [ + self::CODE_UNSUBSCRIBED_VIA_MA, + self::CODE_UNSUBSCRIBED_VIA_EMAIL, + self::CODE_ADMIN_BLOCKED, + self::CODE_UNSUBSCRIBED_VIA_API, + self::CODE_HARD_BOUNCE, + self::CODE_CONTACT_FLAGGED_AS_SPAM, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getCodeAllowableValues(); + if (!is_null($this->container['code']) && !in_array($this->container['code'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'code', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets code + * + * @return string + */ + public function getCode() + { + return $this->container['code']; + } + + /** + * Sets code + * + * @param string $code Reason code for blocking / unsubscribing (This code is safe for comparison) + * + * @return $this + */ + public function setCode($code) + { + $allowedValues = $this->getCodeAllowableValues(); + if (!is_null($code) && !in_array($code, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'code', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['code'] = $code; + + return $this; + } + + /** + * Gets message + * + * @return string + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string $message Reason for blocking / unsubscribing (This string is not safe for comparison) + * + * @return $this + */ + public function setMessage($message) + { + $this->container['message'] = $message; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetTransacEmailContent.php b/vendor/getbrevo/brevo-php/lib/Model/GetTransacEmailContent.php new file mode 100644 index 0000000..75e2357 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetTransacEmailContent.php @@ -0,0 +1,503 @@ + 'string', + 'subject' => 'string', + 'templateId' => 'int', + 'date' => 'string', + 'events' => '\Brevo\Client\Model\GetTransacEmailContentEvents[]', + 'body' => 'string', + 'attachmentCount' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'email' => 'email', + 'subject' => null, + 'templateId' => 'int64', + 'date' => null, + 'events' => null, + 'body' => null, + 'attachmentCount' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'email' => 'email', + 'subject' => 'subject', + 'templateId' => 'templateId', + 'date' => 'date', + 'events' => 'events', + 'body' => 'body', + 'attachmentCount' => 'attachmentCount' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'email' => 'setEmail', + 'subject' => 'setSubject', + 'templateId' => 'setTemplateId', + 'date' => 'setDate', + 'events' => 'setEvents', + 'body' => 'setBody', + 'attachmentCount' => 'setAttachmentCount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'email' => 'getEmail', + 'subject' => 'getSubject', + 'templateId' => 'getTemplateId', + 'date' => 'getDate', + 'events' => 'getEvents', + 'body' => 'getBody', + 'attachmentCount' => 'getAttachmentCount' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['subject'] = isset($data['subject']) ? $data['subject'] : null; + $this->container['templateId'] = isset($data['templateId']) ? $data['templateId'] : null; + $this->container['date'] = isset($data['date']) ? $data['date'] : null; + $this->container['events'] = isset($data['events']) ? $data['events'] : null; + $this->container['body'] = isset($data['body']) ? $data['body'] : null; + $this->container['attachmentCount'] = isset($data['attachmentCount']) ? $data['attachmentCount'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + if ($this->container['subject'] === null) { + $invalidProperties[] = "'subject' can't be null"; + } + if ($this->container['date'] === null) { + $invalidProperties[] = "'date' can't be null"; + } + if ($this->container['events'] === null) { + $invalidProperties[] = "'events' can't be null"; + } + if ($this->container['body'] === null) { + $invalidProperties[] = "'body' can't be null"; + } + if ($this->container['attachmentCount'] === null) { + $invalidProperties[] = "'attachmentCount' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email Email address to which transactional email has been sent + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets subject + * + * @return string + */ + public function getSubject() + { + return $this->container['subject']; + } + + /** + * Sets subject + * + * @param string $subject Subject of the sent email + * + * @return $this + */ + public function setSubject($subject) + { + $this->container['subject'] = $subject; + + return $this; + } + + /** + * Gets templateId + * + * @return int + */ + public function getTemplateId() + { + return $this->container['templateId']; + } + + /** + * Sets templateId + * + * @param int $templateId Id of the template + * + * @return $this + */ + public function setTemplateId($templateId) + { + $this->container['templateId'] = $templateId; + + return $this; + } + + /** + * Gets date + * + * @return string + */ + public function getDate() + { + return $this->container['date']; + } + + /** + * Sets date + * + * @param string $date Date on which transactional email was sent + * + * @return $this + */ + public function setDate($date) + { + $this->container['date'] = $date; + + return $this; + } + + /** + * Gets events + * + * @return \Brevo\Client\Model\GetTransacEmailContentEvents[] + */ + public function getEvents() + { + return $this->container['events']; + } + + /** + * Sets events + * + * @param \Brevo\Client\Model\GetTransacEmailContentEvents[] $events Series of events which occurred on the transactional email + * + * @return $this + */ + public function setEvents($events) + { + $this->container['events'] = $events; + + return $this; + } + + /** + * Gets body + * + * @return string + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param string $body Actual content of the transactional email that has been sent + * + * @return $this + */ + public function setBody($body) + { + $this->container['body'] = $body; + + return $this; + } + + /** + * Gets attachmentCount + * + * @return int + */ + public function getAttachmentCount() + { + return $this->container['attachmentCount']; + } + + /** + * Sets attachmentCount + * + * @param int $attachmentCount Count of the attachments that were sent in the email + * + * @return $this + */ + public function setAttachmentCount($attachmentCount) + { + $this->container['attachmentCount'] = $attachmentCount; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetTransacEmailContentEvents.php b/vendor/getbrevo/brevo-php/lib/Model/GetTransacEmailContentEvents.php new file mode 100644 index 0000000..138080e --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetTransacEmailContentEvents.php @@ -0,0 +1,341 @@ + 'string', + 'time' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null, + 'time' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'time' => 'time' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'time' => 'setTime' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'time' => 'getTime' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['time'] = isset($data['time']) ? $data['time'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['time'] === null) { + $invalidProperties[] = "'time' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the event that occurred on the sent email + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets time + * + * @return string + */ + public function getTime() + { + return $this->container['time']; + } + + /** + * Sets time + * + * @param string $time Time at which the event occurred + * + * @return $this + */ + public function setTime($time) + { + $this->container['time'] = $time; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetTransacEmailsList.php b/vendor/getbrevo/brevo-php/lib/Model/GetTransacEmailsList.php new file mode 100644 index 0000000..ff752dd --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetTransacEmailsList.php @@ -0,0 +1,335 @@ + 'int', + 'transactionalEmails' => '\Brevo\Client\Model\GetTransacEmailsListTransactionalEmails[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'count' => 'int64', + 'transactionalEmails' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'count' => 'count', + 'transactionalEmails' => 'transactionalEmails' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'count' => 'setCount', + 'transactionalEmails' => 'setTransactionalEmails' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'count' => 'getCount', + 'transactionalEmails' => 'getTransactionalEmails' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['count'] = isset($data['count']) ? $data['count'] : null; + $this->container['transactionalEmails'] = isset($data['transactionalEmails']) ? $data['transactionalEmails'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets count + * + * @return int + */ + public function getCount() + { + return $this->container['count']; + } + + /** + * Sets count + * + * @param int $count Total number of transactional emails available on your account according to the passed filter + * + * @return $this + */ + public function setCount($count) + { + $this->container['count'] = $count; + + return $this; + } + + /** + * Gets transactionalEmails + * + * @return \Brevo\Client\Model\GetTransacEmailsListTransactionalEmails[] + */ + public function getTransactionalEmails() + { + return $this->container['transactionalEmails']; + } + + /** + * Sets transactionalEmails + * + * @param \Brevo\Client\Model\GetTransacEmailsListTransactionalEmails[] $transactionalEmails transactionalEmails + * + * @return $this + */ + public function setTransactionalEmails($transactionalEmails) + { + $this->container['transactionalEmails'] = $transactionalEmails; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetTransacEmailsListTransactionalEmails.php b/vendor/getbrevo/brevo-php/lib/Model/GetTransacEmailsListTransactionalEmails.php new file mode 100644 index 0000000..23df786 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetTransacEmailsListTransactionalEmails.php @@ -0,0 +1,530 @@ + 'string', + 'subject' => 'string', + 'templateId' => 'int', + 'messageId' => 'string', + 'uuid' => 'string', + 'date' => 'string', + 'from' => 'string', + 'tags' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'email' => 'email', + 'subject' => null, + 'templateId' => 'int64', + 'messageId' => null, + 'uuid' => null, + 'date' => null, + 'from' => 'email', + 'tags' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'email' => 'email', + 'subject' => 'subject', + 'templateId' => 'templateId', + 'messageId' => 'messageId', + 'uuid' => 'uuid', + 'date' => 'date', + 'from' => 'from', + 'tags' => 'tags' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'email' => 'setEmail', + 'subject' => 'setSubject', + 'templateId' => 'setTemplateId', + 'messageId' => 'setMessageId', + 'uuid' => 'setUuid', + 'date' => 'setDate', + 'from' => 'setFrom', + 'tags' => 'setTags' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'email' => 'getEmail', + 'subject' => 'getSubject', + 'templateId' => 'getTemplateId', + 'messageId' => 'getMessageId', + 'uuid' => 'getUuid', + 'date' => 'getDate', + 'from' => 'getFrom', + 'tags' => 'getTags' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['subject'] = isset($data['subject']) ? $data['subject'] : null; + $this->container['templateId'] = isset($data['templateId']) ? $data['templateId'] : null; + $this->container['messageId'] = isset($data['messageId']) ? $data['messageId'] : null; + $this->container['uuid'] = isset($data['uuid']) ? $data['uuid'] : null; + $this->container['date'] = isset($data['date']) ? $data['date'] : null; + $this->container['from'] = isset($data['from']) ? $data['from'] : null; + $this->container['tags'] = isset($data['tags']) ? $data['tags'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + if ($this->container['subject'] === null) { + $invalidProperties[] = "'subject' can't be null"; + } + if ($this->container['messageId'] === null) { + $invalidProperties[] = "'messageId' can't be null"; + } + if ($this->container['uuid'] === null) { + $invalidProperties[] = "'uuid' can't be null"; + } + if ($this->container['date'] === null) { + $invalidProperties[] = "'date' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email Email address to which transactional email has been sent + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets subject + * + * @return string + */ + public function getSubject() + { + return $this->container['subject']; + } + + /** + * Sets subject + * + * @param string $subject Subject of the sent email + * + * @return $this + */ + public function setSubject($subject) + { + $this->container['subject'] = $subject; + + return $this; + } + + /** + * Gets templateId + * + * @return int + */ + public function getTemplateId() + { + return $this->container['templateId']; + } + + /** + * Sets templateId + * + * @param int $templateId Id of the template + * + * @return $this + */ + public function setTemplateId($templateId) + { + $this->container['templateId'] = $templateId; + + return $this; + } + + /** + * Gets messageId + * + * @return string + */ + public function getMessageId() + { + return $this->container['messageId']; + } + + /** + * Sets messageId + * + * @param string $messageId Message Id of the sent email + * + * @return $this + */ + public function setMessageId($messageId) + { + $this->container['messageId'] = $messageId; + + return $this; + } + + /** + * Gets uuid + * + * @return string + */ + public function getUuid() + { + return $this->container['uuid']; + } + + /** + * Sets uuid + * + * @param string $uuid Unique id of the email sent to a particular contact + * + * @return $this + */ + public function setUuid($uuid) + { + $this->container['uuid'] = $uuid; + + return $this; + } + + /** + * Gets date + * + * @return string + */ + public function getDate() + { + return $this->container['date']; + } + + /** + * Sets date + * + * @param string $date Date on which transactional email was sent + * + * @return $this + */ + public function setDate($date) + { + $this->container['date'] = $date; + + return $this; + } + + /** + * Gets from + * + * @return string + */ + public function getFrom() + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param string $from Email address of the sender from which the email was sent + * + * @return $this + */ + public function setFrom($from) + { + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets tags + * + * @return string[] + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param string[] $tags Tags used for your email + * + * @return $this + */ + public function setTags($tags) + { + $this->container['tags'] = $tags; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetTransacSmsReport.php b/vendor/getbrevo/brevo-php/lib/Model/GetTransacSmsReport.php new file mode 100644 index 0000000..9363b55 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetTransacSmsReport.php @@ -0,0 +1,305 @@ + '\Brevo\Client\Model\GetTransacSmsReportReports[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'reports' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'reports' => 'reports' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'reports' => 'setReports' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'reports' => 'getReports' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['reports'] = isset($data['reports']) ? $data['reports'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets reports + * + * @return \Brevo\Client\Model\GetTransacSmsReportReports[] + */ + public function getReports() + { + return $this->container['reports']; + } + + /** + * Sets reports + * + * @param \Brevo\Client\Model\GetTransacSmsReportReports[] $reports reports + * + * @return $this + */ + public function setReports($reports) + { + $this->container['reports'] = $reports; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetTransacSmsReportReports.php b/vendor/getbrevo/brevo-php/lib/Model/GetTransacSmsReportReports.php new file mode 100644 index 0000000..87d2bdd --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetTransacSmsReportReports.php @@ -0,0 +1,575 @@ + '\DateTime', + 'requests' => 'int', + 'delivered' => 'int', + 'hardBounces' => 'int', + 'softBounces' => 'int', + 'blocked' => 'int', + 'unsubscribed' => 'int', + 'replied' => 'int', + 'accepted' => 'int', + 'rejected' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'date' => 'date', + 'requests' => 'int64', + 'delivered' => 'int64', + 'hardBounces' => 'int64', + 'softBounces' => 'int64', + 'blocked' => 'int64', + 'unsubscribed' => 'int64', + 'replied' => 'int64', + 'accepted' => 'int64', + 'rejected' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'date' => 'date', + 'requests' => 'requests', + 'delivered' => 'delivered', + 'hardBounces' => 'hardBounces', + 'softBounces' => 'softBounces', + 'blocked' => 'blocked', + 'unsubscribed' => 'unsubscribed', + 'replied' => 'replied', + 'accepted' => 'accepted', + 'rejected' => 'rejected' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'date' => 'setDate', + 'requests' => 'setRequests', + 'delivered' => 'setDelivered', + 'hardBounces' => 'setHardBounces', + 'softBounces' => 'setSoftBounces', + 'blocked' => 'setBlocked', + 'unsubscribed' => 'setUnsubscribed', + 'replied' => 'setReplied', + 'accepted' => 'setAccepted', + 'rejected' => 'setRejected' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'date' => 'getDate', + 'requests' => 'getRequests', + 'delivered' => 'getDelivered', + 'hardBounces' => 'getHardBounces', + 'softBounces' => 'getSoftBounces', + 'blocked' => 'getBlocked', + 'unsubscribed' => 'getUnsubscribed', + 'replied' => 'getReplied', + 'accepted' => 'getAccepted', + 'rejected' => 'getRejected' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['date'] = isset($data['date']) ? $data['date'] : null; + $this->container['requests'] = isset($data['requests']) ? $data['requests'] : null; + $this->container['delivered'] = isset($data['delivered']) ? $data['delivered'] : null; + $this->container['hardBounces'] = isset($data['hardBounces']) ? $data['hardBounces'] : null; + $this->container['softBounces'] = isset($data['softBounces']) ? $data['softBounces'] : null; + $this->container['blocked'] = isset($data['blocked']) ? $data['blocked'] : null; + $this->container['unsubscribed'] = isset($data['unsubscribed']) ? $data['unsubscribed'] : null; + $this->container['replied'] = isset($data['replied']) ? $data['replied'] : null; + $this->container['accepted'] = isset($data['accepted']) ? $data['accepted'] : null; + $this->container['rejected'] = isset($data['rejected']) ? $data['rejected'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets date + * + * @return \DateTime + */ + public function getDate() + { + return $this->container['date']; + } + + /** + * Sets date + * + * @param \DateTime $date Date for which statistics are retrieved + * + * @return $this + */ + public function setDate($date) + { + $this->container['date'] = $date; + + return $this; + } + + /** + * Gets requests + * + * @return int + */ + public function getRequests() + { + return $this->container['requests']; + } + + /** + * Sets requests + * + * @param int $requests Number of requests for the date + * + * @return $this + */ + public function setRequests($requests) + { + $this->container['requests'] = $requests; + + return $this; + } + + /** + * Gets delivered + * + * @return int + */ + public function getDelivered() + { + return $this->container['delivered']; + } + + /** + * Sets delivered + * + * @param int $delivered Number of delivered SMS for the date + * + * @return $this + */ + public function setDelivered($delivered) + { + $this->container['delivered'] = $delivered; + + return $this; + } + + /** + * Gets hardBounces + * + * @return int + */ + public function getHardBounces() + { + return $this->container['hardBounces']; + } + + /** + * Sets hardBounces + * + * @param int $hardBounces Number of hardbounces for the date + * + * @return $this + */ + public function setHardBounces($hardBounces) + { + $this->container['hardBounces'] = $hardBounces; + + return $this; + } + + /** + * Gets softBounces + * + * @return int + */ + public function getSoftBounces() + { + return $this->container['softBounces']; + } + + /** + * Sets softBounces + * + * @param int $softBounces Number of softbounces for the date + * + * @return $this + */ + public function setSoftBounces($softBounces) + { + $this->container['softBounces'] = $softBounces; + + return $this; + } + + /** + * Gets blocked + * + * @return int + */ + public function getBlocked() + { + return $this->container['blocked']; + } + + /** + * Sets blocked + * + * @param int $blocked Number of blocked contact for the date + * + * @return $this + */ + public function setBlocked($blocked) + { + $this->container['blocked'] = $blocked; + + return $this; + } + + /** + * Gets unsubscribed + * + * @return int + */ + public function getUnsubscribed() + { + return $this->container['unsubscribed']; + } + + /** + * Sets unsubscribed + * + * @param int $unsubscribed Number of unsubscription for the date + * + * @return $this + */ + public function setUnsubscribed($unsubscribed) + { + $this->container['unsubscribed'] = $unsubscribed; + + return $this; + } + + /** + * Gets replied + * + * @return int + */ + public function getReplied() + { + return $this->container['replied']; + } + + /** + * Sets replied + * + * @param int $replied Number of answered SMS for the date + * + * @return $this + */ + public function setReplied($replied) + { + $this->container['replied'] = $replied; + + return $this; + } + + /** + * Gets accepted + * + * @return int + */ + public function getAccepted() + { + return $this->container['accepted']; + } + + /** + * Sets accepted + * + * @param int $accepted Number of accepted for the date + * + * @return $this + */ + public function setAccepted($accepted) + { + $this->container['accepted'] = $accepted; + + return $this; + } + + /** + * Gets rejected + * + * @return int + */ + public function getRejected() + { + return $this->container['rejected']; + } + + /** + * Sets rejected + * + * @param int $rejected Number of rejected for the date + * + * @return $this + */ + public function setRejected($rejected) + { + $this->container['rejected'] = $rejected; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetUserPermission.php b/vendor/getbrevo/brevo-php/lib/Model/GetUserPermission.php new file mode 100644 index 0000000..5ce95fd --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetUserPermission.php @@ -0,0 +1,375 @@ + 'string', + 'status' => 'string', + 'privileges' => '\Brevo\Client\Model\GetUserPermissionPrivileges[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'email' => null, + 'status' => null, + 'privileges' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'email' => 'email', + 'status' => 'status', + 'privileges' => 'privileges' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'email' => 'setEmail', + 'status' => 'setStatus', + 'privileges' => 'setPrivileges' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'email' => 'getEmail', + 'status' => 'getStatus', + 'privileges' => 'getPrivileges' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['privileges'] = isset($data['privileges']) ? $data['privileges'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } + if ($this->container['privileges'] === null) { + $invalidProperties[] = "'privileges' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email Email address of the user. + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status Status of the invited user. + * + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets privileges + * + * @return \Brevo\Client\Model\GetUserPermissionPrivileges[] + */ + public function getPrivileges() + { + return $this->container['privileges']; + } + + /** + * Sets privileges + * + * @param \Brevo\Client\Model\GetUserPermissionPrivileges[] $privileges Granular feature permissions given to the user. + * + * @return $this + */ + public function setPrivileges($privileges) + { + $this->container['privileges'] = $privileges; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetUserPermissionPrivileges.php b/vendor/getbrevo/brevo-php/lib/Model/GetUserPermissionPrivileges.php new file mode 100644 index 0000000..03a5d17 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetUserPermissionPrivileges.php @@ -0,0 +1,341 @@ + 'string', + 'permissions' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'feature' => null, + 'permissions' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'feature' => 'feature', + 'permissions' => 'permissions' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'feature' => 'setFeature', + 'permissions' => 'setPermissions' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'feature' => 'getFeature', + 'permissions' => 'getPermissions' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['feature'] = isset($data['feature']) ? $data['feature'] : null; + $this->container['permissions'] = isset($data['permissions']) ? $data['permissions'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['feature'] === null) { + $invalidProperties[] = "'feature' can't be null"; + } + if ($this->container['permissions'] === null) { + $invalidProperties[] = "'permissions' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets feature + * + * @return string + */ + public function getFeature() + { + return $this->container['feature']; + } + + /** + * Sets feature + * + * @param string $feature feature + * + * @return $this + */ + public function setFeature($feature) + { + $this->container['feature'] = $feature; + + return $this; + } + + /** + * Gets permissions + * + * @return string[] + */ + public function getPermissions() + { + return $this->container['permissions']; + } + + /** + * Sets permissions + * + * @param string[] $permissions permissions + * + * @return $this + */ + public function setPermissions($permissions) + { + $this->container['permissions'] = $permissions; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetWATemplates.php b/vendor/getbrevo/brevo-php/lib/Model/GetWATemplates.php new file mode 100644 index 0000000..9d4eebd --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetWATemplates.php @@ -0,0 +1,341 @@ + '\Brevo\Client\Model\GetWATemplatesTemplates[]', + 'count' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'templates' => null, + 'count' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'templates' => 'templates', + 'count' => 'count' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'templates' => 'setTemplates', + 'count' => 'setCount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'templates' => 'getTemplates', + 'count' => 'getCount' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['templates'] = isset($data['templates']) ? $data['templates'] : null; + $this->container['count'] = isset($data['count']) ? $data['count'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['templates'] === null) { + $invalidProperties[] = "'templates' can't be null"; + } + if ($this->container['count'] === null) { + $invalidProperties[] = "'count' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets templates + * + * @return \Brevo\Client\Model\GetWATemplatesTemplates[] + */ + public function getTemplates() + { + return $this->container['templates']; + } + + /** + * Sets templates + * + * @param \Brevo\Client\Model\GetWATemplatesTemplates[] $templates templates + * + * @return $this + */ + public function setTemplates($templates) + { + $this->container['templates'] = $templates; + + return $this; + } + + /** + * Gets count + * + * @return int + */ + public function getCount() + { + return $this->container['count']; + } + + /** + * Sets count + * + * @param int $count Number of whatsApp templates retrived + * + * @return $this + */ + public function setCount($count) + { + $this->container['count'] = $count; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetWATemplatesTemplates.php b/vendor/getbrevo/brevo-php/lib/Model/GetWATemplatesTemplates.php new file mode 100644 index 0000000..f1aef50 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetWATemplatesTemplates.php @@ -0,0 +1,536 @@ + 'string', + 'name' => 'string', + 'status' => 'string', + 'language' => 'string', + 'category' => 'string', + 'errorReason' => 'string', + 'createdAt' => 'string', + 'modifiedAt' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => null, + 'name' => null, + 'status' => null, + 'language' => null, + 'category' => null, + 'errorReason' => null, + 'createdAt' => null, + 'modifiedAt' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'status' => 'status', + 'language' => 'language', + 'category' => 'category', + 'errorReason' => 'errorReason', + 'createdAt' => 'createdAt', + 'modifiedAt' => 'modifiedAt' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'status' => 'setStatus', + 'language' => 'setLanguage', + 'category' => 'setCategory', + 'errorReason' => 'setErrorReason', + 'createdAt' => 'setCreatedAt', + 'modifiedAt' => 'setModifiedAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'status' => 'getStatus', + 'language' => 'getLanguage', + 'category' => 'getCategory', + 'errorReason' => 'getErrorReason', + 'createdAt' => 'getCreatedAt', + 'modifiedAt' => 'getModifiedAt' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['language'] = isset($data['language']) ? $data['language'] : null; + $this->container['category'] = isset($data['category']) ? $data['category'] : null; + $this->container['errorReason'] = isset($data['errorReason']) ? $data['errorReason'] : null; + $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; + $this->container['modifiedAt'] = isset($data['modifiedAt']) ? $data['modifiedAt'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } + if ($this->container['language'] === null) { + $invalidProperties[] = "'language' can't be null"; + } + if ($this->container['category'] === null) { + $invalidProperties[] = "'category' can't be null"; + } + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + if ($this->container['modifiedAt'] === null) { + $invalidProperties[] = "'modifiedAt' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id id of the template + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the WhatsApp template + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status Status of the WhatsApp template + * + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets language + * + * @return string + */ + public function getLanguage() + { + return $this->container['language']; + } + + /** + * Sets language + * + * @param string $language Language in which template exists + * + * @return $this + */ + public function setLanguage($language) + { + $this->container['language'] = $language; + + return $this; + } + + /** + * Gets category + * + * @return string + */ + public function getCategory() + { + return $this->container['category']; + } + + /** + * Sets category + * + * @param string $category category of the template + * + * @return $this + */ + public function setCategory($category) + { + $this->container['category'] = $category; + + return $this; + } + + /** + * Gets errorReason + * + * @return string + */ + public function getErrorReason() + { + return $this->container['errorReason']; + } + + /** + * Sets errorReason + * + * @param string $errorReason Error reason in the template creation + * + * @return $this + */ + public function setErrorReason($errorReason) + { + $this->container['errorReason'] = $errorReason; + + return $this; + } + + /** + * Gets createdAt + * + * @return string + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param string $createdAt Creation UTC date-time of the whatsApp template (YYYY-MM-DDTHH:mm:ss.SSSZ) + * + * @return $this + */ + public function setCreatedAt($createdAt) + { + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets modifiedAt + * + * @return string + */ + public function getModifiedAt() + { + return $this->container['modifiedAt']; + } + + /** + * Sets modifiedAt + * + * @param string $modifiedAt UTC date-time of last modification of the whatsApp template (YYYY-MM-DDTHH:mm:ss.SSSZ) + * + * @return $this + */ + public function setModifiedAt($modifiedAt) + { + $this->container['modifiedAt'] = $modifiedAt; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetWebhook.php b/vendor/getbrevo/brevo-php/lib/Model/GetWebhook.php new file mode 100644 index 0000000..0e4871d --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetWebhook.php @@ -0,0 +1,628 @@ + 'string', + 'id' => 'int', + 'description' => 'string', + 'events' => 'string[]', + 'type' => 'string', + 'createdAt' => 'string', + 'modifiedAt' => 'string', + 'batched' => 'bool', + 'auth' => '\Brevo\Client\Model\GetWebhookAuth', + 'headers' => '\Brevo\Client\Model\GetWebhookHeaders[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'url' => 'url', + 'id' => 'int64', + 'description' => null, + 'events' => null, + 'type' => null, + 'createdAt' => null, + 'modifiedAt' => null, + 'batched' => null, + 'auth' => null, + 'headers' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'url' => 'url', + 'id' => 'id', + 'description' => 'description', + 'events' => 'events', + 'type' => 'type', + 'createdAt' => 'createdAt', + 'modifiedAt' => 'modifiedAt', + 'batched' => 'batched', + 'auth' => 'auth', + 'headers' => 'headers' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'url' => 'setUrl', + 'id' => 'setId', + 'description' => 'setDescription', + 'events' => 'setEvents', + 'type' => 'setType', + 'createdAt' => 'setCreatedAt', + 'modifiedAt' => 'setModifiedAt', + 'batched' => 'setBatched', + 'auth' => 'setAuth', + 'headers' => 'setHeaders' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'url' => 'getUrl', + 'id' => 'getId', + 'description' => 'getDescription', + 'events' => 'getEvents', + 'type' => 'getType', + 'createdAt' => 'getCreatedAt', + 'modifiedAt' => 'getModifiedAt', + 'batched' => 'getBatched', + 'auth' => 'getAuth', + 'headers' => 'getHeaders' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const TYPE_MARKETING = 'marketing'; + const TYPE_TRANSACTIONAL = 'transactional'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_MARKETING, + self::TYPE_TRANSACTIONAL, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['url'] = isset($data['url']) ? $data['url'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['description'] = isset($data['description']) ? $data['description'] : null; + $this->container['events'] = isset($data['events']) ? $data['events'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : null; + $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; + $this->container['modifiedAt'] = isset($data['modifiedAt']) ? $data['modifiedAt'] : null; + $this->container['batched'] = isset($data['batched']) ? $data['batched'] : null; + $this->container['auth'] = isset($data['auth']) ? $data['auth'] : null; + $this->container['headers'] = isset($data['headers']) ? $data['headers'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['url'] === null) { + $invalidProperties[] = "'url' can't be null"; + } + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['description'] === null) { + $invalidProperties[] = "'description' can't be null"; + } + if ($this->container['events'] === null) { + $invalidProperties[] = "'events' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + if ($this->container['modifiedAt'] === null) { + $invalidProperties[] = "'modifiedAt' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets url + * + * @return string + */ + public function getUrl() + { + return $this->container['url']; + } + + /** + * Sets url + * + * @param string $url URL of the webhook + * + * @return $this + */ + public function setUrl($url) + { + $this->container['url'] = $url; + + return $this; + } + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id ID of the webhook + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets description + * + * @return string + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string $description Description of the webhook + * + * @return $this + */ + public function setDescription($description) + { + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets events + * + * @return string[] + */ + public function getEvents() + { + return $this->container['events']; + } + + /** + * Sets events + * + * @param string[] $events events + * + * @return $this + */ + public function setEvents($events) + { + $this->container['events'] = $events; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Type of webhook (marketing or transactional) + * + * @return $this + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets createdAt + * + * @return string + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param string $createdAt Creation UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) + * + * @return $this + */ + public function setCreatedAt($createdAt) + { + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets modifiedAt + * + * @return string + */ + public function getModifiedAt() + { + return $this->container['modifiedAt']; + } + + /** + * Sets modifiedAt + * + * @param string $modifiedAt Last modification UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) + * + * @return $this + */ + public function setModifiedAt($modifiedAt) + { + $this->container['modifiedAt'] = $modifiedAt; + + return $this; + } + + /** + * Gets batched + * + * @return bool + */ + public function getBatched() + { + return $this->container['batched']; + } + + /** + * Sets batched + * + * @param bool $batched To send batched webhooks + * + * @return $this + */ + public function setBatched($batched) + { + $this->container['batched'] = $batched; + + return $this; + } + + /** + * Gets auth + * + * @return \Brevo\Client\Model\GetWebhookAuth + */ + public function getAuth() + { + return $this->container['auth']; + } + + /** + * Sets auth + * + * @param \Brevo\Client\Model\GetWebhookAuth $auth auth + * + * @return $this + */ + public function setAuth($auth) + { + $this->container['auth'] = $auth; + + return $this; + } + + /** + * Gets headers + * + * @return \Brevo\Client\Model\GetWebhookHeaders[] + */ + public function getHeaders() + { + return $this->container['headers']; + } + + /** + * Sets headers + * + * @param \Brevo\Client\Model\GetWebhookHeaders[] $headers Custom headers to be send with webhooks + * + * @return $this + */ + public function setHeaders($headers) + { + $this->container['headers'] = $headers; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetWebhookAuth.php b/vendor/getbrevo/brevo-php/lib/Model/GetWebhookAuth.php new file mode 100644 index 0000000..234333d --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetWebhookAuth.php @@ -0,0 +1,336 @@ + 'string', + 'token' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'type' => null, + 'token' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'type' => 'type', + 'token' => 'token' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'type' => 'setType', + 'token' => 'setToken' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'type' => 'getType', + 'token' => 'getToken' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['type'] = isset($data['type']) ? $data['type'] : null; + $this->container['token'] = isset($data['token']) ? $data['token'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Type of authentication + * + * @return $this + */ + public function setType($type) + { + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets token + * + * @return string + */ + public function getToken() + { + return $this->container['token']; + } + + /** + * Sets token + * + * @param string $token Webhook authentication token + * + * @return $this + */ + public function setToken($token) + { + $this->container['token'] = $token; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetWebhookHeaders.php b/vendor/getbrevo/brevo-php/lib/Model/GetWebhookHeaders.php new file mode 100644 index 0000000..aa1f6f0 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetWebhookHeaders.php @@ -0,0 +1,335 @@ + 'string', + 'value' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'key' => null, + 'value' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'key' => 'key', + 'value' => 'value' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'key' => 'setKey', + 'value' => 'setValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'key' => 'getKey', + 'value' => 'getValue' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['key'] = isset($data['key']) ? $data['key'] : null; + $this->container['value'] = isset($data['value']) ? $data['value'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets key + * + * @return string + */ + public function getKey() + { + return $this->container['key']; + } + + /** + * Sets key + * + * @param string $key Header key name + * + * @return $this + */ + public function setKey($key) + { + $this->container['key'] = $key; + + return $this; + } + + /** + * Gets value + * + * @return string + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param string $value Header value + * + * @return $this + */ + public function setValue($value) + { + $this->container['value'] = $value; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetWebhooks.php b/vendor/getbrevo/brevo-php/lib/Model/GetWebhooks.php new file mode 100644 index 0000000..6737fe2 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetWebhooks.php @@ -0,0 +1,308 @@ + 'object[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'webhooks' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'webhooks' => 'webhooks' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'webhooks' => 'setWebhooks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'webhooks' => 'getWebhooks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['webhooks'] = isset($data['webhooks']) ? $data['webhooks'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['webhooks'] === null) { + $invalidProperties[] = "'webhooks' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets webhooks + * + * @return object[] + */ + public function getWebhooks() + { + return $this->container['webhooks']; + } + + /** + * Sets webhooks + * + * @param object[] $webhooks webhooks + * + * @return $this + */ + public function setWebhooks($webhooks) + { + $this->container['webhooks'] = $webhooks; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetWhatsAppConfig.php b/vendor/getbrevo/brevo-php/lib/Model/GetWhatsAppConfig.php new file mode 100644 index 0000000..37b1719 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetWhatsAppConfig.php @@ -0,0 +1,523 @@ + 'string', + 'sendingLimit' => 'string', + 'phoneNumberQuality' => 'string', + 'whatsappBusinessAccountStatus' => 'string', + 'businessStatus' => 'string', + 'phoneNumberNameStatus' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'whatsappBusinessAccountId' => null, + 'sendingLimit' => null, + 'phoneNumberQuality' => null, + 'whatsappBusinessAccountStatus' => null, + 'businessStatus' => null, + 'phoneNumberNameStatus' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'whatsappBusinessAccountId' => 'whatsappBusinessAccountId', + 'sendingLimit' => 'sendingLimit', + 'phoneNumberQuality' => 'phoneNumberQuality', + 'whatsappBusinessAccountStatus' => 'whatsappBusinessAccountStatus', + 'businessStatus' => 'businessStatus', + 'phoneNumberNameStatus' => 'phoneNumberNameStatus' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'whatsappBusinessAccountId' => 'setWhatsappBusinessAccountId', + 'sendingLimit' => 'setSendingLimit', + 'phoneNumberQuality' => 'setPhoneNumberQuality', + 'whatsappBusinessAccountStatus' => 'setWhatsappBusinessAccountStatus', + 'businessStatus' => 'setBusinessStatus', + 'phoneNumberNameStatus' => 'setPhoneNumberNameStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'whatsappBusinessAccountId' => 'getWhatsappBusinessAccountId', + 'sendingLimit' => 'getSendingLimit', + 'phoneNumberQuality' => 'getPhoneNumberQuality', + 'whatsappBusinessAccountStatus' => 'getWhatsappBusinessAccountStatus', + 'businessStatus' => 'getBusinessStatus', + 'phoneNumberNameStatus' => 'getPhoneNumberNameStatus' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const PHONE_NUMBER_QUALITY_GREEN = 'GREEN'; + const PHONE_NUMBER_QUALITY_YELLOW = 'YELLOW'; + const PHONE_NUMBER_QUALITY_RED = 'RED'; + const PHONE_NUMBER_NAME_STATUS_APPROVED = 'APPROVED'; + const PHONE_NUMBER_NAME_STATUS_PENDING = 'PENDING'; + const PHONE_NUMBER_NAME_STATUS_REJECTED = 'REJECTED'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getPhoneNumberQualityAllowableValues() + { + return [ + self::PHONE_NUMBER_QUALITY_GREEN, + self::PHONE_NUMBER_QUALITY_YELLOW, + self::PHONE_NUMBER_QUALITY_RED, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getPhoneNumberNameStatusAllowableValues() + { + return [ + self::PHONE_NUMBER_NAME_STATUS_APPROVED, + self::PHONE_NUMBER_NAME_STATUS_PENDING, + self::PHONE_NUMBER_NAME_STATUS_REJECTED, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['whatsappBusinessAccountId'] = isset($data['whatsappBusinessAccountId']) ? $data['whatsappBusinessAccountId'] : null; + $this->container['sendingLimit'] = isset($data['sendingLimit']) ? $data['sendingLimit'] : null; + $this->container['phoneNumberQuality'] = isset($data['phoneNumberQuality']) ? $data['phoneNumberQuality'] : null; + $this->container['whatsappBusinessAccountStatus'] = isset($data['whatsappBusinessAccountStatus']) ? $data['whatsappBusinessAccountStatus'] : null; + $this->container['businessStatus'] = isset($data['businessStatus']) ? $data['businessStatus'] : null; + $this->container['phoneNumberNameStatus'] = isset($data['phoneNumberNameStatus']) ? $data['phoneNumberNameStatus'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getPhoneNumberQualityAllowableValues(); + if (!is_null($this->container['phoneNumberQuality']) && !in_array($this->container['phoneNumberQuality'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'phoneNumberQuality', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getPhoneNumberNameStatusAllowableValues(); + if (!is_null($this->container['phoneNumberNameStatus']) && !in_array($this->container['phoneNumberNameStatus'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'phoneNumberNameStatus', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets whatsappBusinessAccountId + * + * @return string + */ + public function getWhatsappBusinessAccountId() + { + return $this->container['whatsappBusinessAccountId']; + } + + /** + * Sets whatsappBusinessAccountId + * + * @param string $whatsappBusinessAccountId Id of the WhatsApp business account + * + * @return $this + */ + public function setWhatsappBusinessAccountId($whatsappBusinessAccountId) + { + $this->container['whatsappBusinessAccountId'] = $whatsappBusinessAccountId; + + return $this; + } + + /** + * Gets sendingLimit + * + * @return string + */ + public function getSendingLimit() + { + return $this->container['sendingLimit']; + } + + /** + * Sets sendingLimit + * + * @param string $sendingLimit Sending limit Information of the WhatsApp API account + * + * @return $this + */ + public function setSendingLimit($sendingLimit) + { + $this->container['sendingLimit'] = $sendingLimit; + + return $this; + } + + /** + * Gets phoneNumberQuality + * + * @return string + */ + public function getPhoneNumberQuality() + { + return $this->container['phoneNumberQuality']; + } + + /** + * Sets phoneNumberQuality + * + * @param string $phoneNumberQuality Quality status of phone number associated with WhatsApp account. There are three quality ratings. example - **High (GREEN) , Medium (YELLOW) and Low(RED)** + * + * @return $this + */ + public function setPhoneNumberQuality($phoneNumberQuality) + { + $allowedValues = $this->getPhoneNumberQualityAllowableValues(); + if (!is_null($phoneNumberQuality) && !in_array($phoneNumberQuality, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'phoneNumberQuality', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['phoneNumberQuality'] = $phoneNumberQuality; + + return $this; + } + + /** + * Gets whatsappBusinessAccountStatus + * + * @return string + */ + public function getWhatsappBusinessAccountStatus() + { + return $this->container['whatsappBusinessAccountStatus']; + } + + /** + * Sets whatsappBusinessAccountStatus + * + * @param string $whatsappBusinessAccountStatus Status information related to WhatsApp Api account + * + * @return $this + */ + public function setWhatsappBusinessAccountStatus($whatsappBusinessAccountStatus) + { + $this->container['whatsappBusinessAccountStatus'] = $whatsappBusinessAccountStatus; + + return $this; + } + + /** + * Gets businessStatus + * + * @return string + */ + public function getBusinessStatus() + { + return $this->container['businessStatus']; + } + + /** + * Sets businessStatus + * + * @param string $businessStatus Verification status information of the Business account + * + * @return $this + */ + public function setBusinessStatus($businessStatus) + { + $this->container['businessStatus'] = $businessStatus; + + return $this; + } + + /** + * Gets phoneNumberNameStatus + * + * @return string + */ + public function getPhoneNumberNameStatus() + { + return $this->container['phoneNumberNameStatus']; + } + + /** + * Sets phoneNumberNameStatus + * + * @param string $phoneNumberNameStatus Status of the name associated with WhatsApp Phone number + * + * @return $this + */ + public function setPhoneNumberNameStatus($phoneNumberNameStatus) + { + $allowedValues = $this->getPhoneNumberNameStatusAllowableValues(); + if (!is_null($phoneNumberNameStatus) && !in_array($phoneNumberNameStatus, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'phoneNumberNameStatus', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['phoneNumberNameStatus'] = $phoneNumberNameStatus; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetWhatsappCampaignOverview.php b/vendor/getbrevo/brevo-php/lib/Model/GetWhatsappCampaignOverview.php new file mode 100644 index 0000000..6d534b4 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetWhatsappCampaignOverview.php @@ -0,0 +1,610 @@ + 'int', + 'campaignName' => 'string', + 'campaignStatus' => 'string', + 'scheduledAt' => 'string', + 'senderNumber' => 'string', + 'stats' => '\Brevo\Client\Model\WhatsappCampStats', + 'template' => '\Brevo\Client\Model\WhatsappCampTemplate', + 'createdAt' => 'string', + 'modifiedAt' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'int64', + 'campaignName' => null, + 'campaignStatus' => null, + 'scheduledAt' => null, + 'senderNumber' => null, + 'stats' => null, + 'template' => null, + 'createdAt' => null, + 'modifiedAt' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'campaignName' => 'campaignName', + 'campaignStatus' => 'campaignStatus', + 'scheduledAt' => 'scheduledAt', + 'senderNumber' => 'senderNumber', + 'stats' => 'stats', + 'template' => 'template', + 'createdAt' => 'createdAt', + 'modifiedAt' => 'modifiedAt' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'campaignName' => 'setCampaignName', + 'campaignStatus' => 'setCampaignStatus', + 'scheduledAt' => 'setScheduledAt', + 'senderNumber' => 'setSenderNumber', + 'stats' => 'setStats', + 'template' => 'setTemplate', + 'createdAt' => 'setCreatedAt', + 'modifiedAt' => 'setModifiedAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'campaignName' => 'getCampaignName', + 'campaignStatus' => 'getCampaignStatus', + 'scheduledAt' => 'getScheduledAt', + 'senderNumber' => 'getSenderNumber', + 'stats' => 'getStats', + 'template' => 'getTemplate', + 'createdAt' => 'getCreatedAt', + 'modifiedAt' => 'getModifiedAt' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const CAMPAIGN_STATUS_DRAFT = 'draft'; + const CAMPAIGN_STATUS_SCHEDULED = 'scheduled'; + const CAMPAIGN_STATUS_PENDING = 'pending'; + const CAMPAIGN_STATUS_APPROVED = 'approved'; + const CAMPAIGN_STATUS_RUNNING = 'running'; + const CAMPAIGN_STATUS_SUSPENDED = 'suspended'; + const CAMPAIGN_STATUS_REJECTED = 'rejected'; + const CAMPAIGN_STATUS_SENT = 'sent'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getCampaignStatusAllowableValues() + { + return [ + self::CAMPAIGN_STATUS_DRAFT, + self::CAMPAIGN_STATUS_SCHEDULED, + self::CAMPAIGN_STATUS_PENDING, + self::CAMPAIGN_STATUS_APPROVED, + self::CAMPAIGN_STATUS_RUNNING, + self::CAMPAIGN_STATUS_SUSPENDED, + self::CAMPAIGN_STATUS_REJECTED, + self::CAMPAIGN_STATUS_SENT, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['campaignName'] = isset($data['campaignName']) ? $data['campaignName'] : null; + $this->container['campaignStatus'] = isset($data['campaignStatus']) ? $data['campaignStatus'] : null; + $this->container['scheduledAt'] = isset($data['scheduledAt']) ? $data['scheduledAt'] : null; + $this->container['senderNumber'] = isset($data['senderNumber']) ? $data['senderNumber'] : null; + $this->container['stats'] = isset($data['stats']) ? $data['stats'] : null; + $this->container['template'] = isset($data['template']) ? $data['template'] : null; + $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; + $this->container['modifiedAt'] = isset($data['modifiedAt']) ? $data['modifiedAt'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['campaignName'] === null) { + $invalidProperties[] = "'campaignName' can't be null"; + } + if ($this->container['campaignStatus'] === null) { + $invalidProperties[] = "'campaignStatus' can't be null"; + } + $allowedValues = $this->getCampaignStatusAllowableValues(); + if (!is_null($this->container['campaignStatus']) && !in_array($this->container['campaignStatus'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'campaignStatus', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['senderNumber'] === null) { + $invalidProperties[] = "'senderNumber' can't be null"; + } + if ($this->container['template'] === null) { + $invalidProperties[] = "'template' can't be null"; + } + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + if ($this->container['modifiedAt'] === null) { + $invalidProperties[] = "'modifiedAt' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id ID of the WhatsApp Campaign + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets campaignName + * + * @return string + */ + public function getCampaignName() + { + return $this->container['campaignName']; + } + + /** + * Sets campaignName + * + * @param string $campaignName Name of the WhatsApp Campaign + * + * @return $this + */ + public function setCampaignName($campaignName) + { + $this->container['campaignName'] = $campaignName; + + return $this; + } + + /** + * Gets campaignStatus + * + * @return string + */ + public function getCampaignStatus() + { + return $this->container['campaignStatus']; + } + + /** + * Sets campaignStatus + * + * @param string $campaignStatus Status of the WhatsApp Campaign + * + * @return $this + */ + public function setCampaignStatus($campaignStatus) + { + $allowedValues = $this->getCampaignStatusAllowableValues(); + if (!in_array($campaignStatus, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'campaignStatus', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['campaignStatus'] = $campaignStatus; + + return $this; + } + + /** + * Gets scheduledAt + * + * @return string + */ + public function getScheduledAt() + { + return $this->container['scheduledAt']; + } + + /** + * Sets scheduledAt + * + * @param string $scheduledAt UTC date-time on which WhatsApp campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format + * + * @return $this + */ + public function setScheduledAt($scheduledAt) + { + $this->container['scheduledAt'] = $scheduledAt; + + return $this; + } + + /** + * Gets senderNumber + * + * @return string + */ + public function getSenderNumber() + { + return $this->container['senderNumber']; + } + + /** + * Sets senderNumber + * + * @param string $senderNumber Sender of the WhatsApp Campaign + * + * @return $this + */ + public function setSenderNumber($senderNumber) + { + $this->container['senderNumber'] = $senderNumber; + + return $this; + } + + /** + * Gets stats + * + * @return \Brevo\Client\Model\WhatsappCampStats + */ + public function getStats() + { + return $this->container['stats']; + } + + /** + * Sets stats + * + * @param \Brevo\Client\Model\WhatsappCampStats $stats stats + * + * @return $this + */ + public function setStats($stats) + { + $this->container['stats'] = $stats; + + return $this; + } + + /** + * Gets template + * + * @return \Brevo\Client\Model\WhatsappCampTemplate + */ + public function getTemplate() + { + return $this->container['template']; + } + + /** + * Sets template + * + * @param \Brevo\Client\Model\WhatsappCampTemplate $template template + * + * @return $this + */ + public function setTemplate($template) + { + $this->container['template'] = $template; + + return $this; + } + + /** + * Gets createdAt + * + * @return string + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param string $createdAt Creation UTC date-time of the WhatsApp campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + * + * @return $this + */ + public function setCreatedAt($createdAt) + { + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets modifiedAt + * + * @return string + */ + public function getModifiedAt() + { + return $this->container['modifiedAt']; + } + + /** + * Sets modifiedAt + * + * @param string $modifiedAt UTC date-time of last modification of the WhatsApp campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + * + * @return $this + */ + public function setModifiedAt($modifiedAt) + { + $this->container['modifiedAt'] = $modifiedAt; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetWhatsappCampaigns.php b/vendor/getbrevo/brevo-php/lib/Model/GetWhatsappCampaigns.php new file mode 100644 index 0000000..2534986 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetWhatsappCampaigns.php @@ -0,0 +1,335 @@ + '\Brevo\Client\Model\GetWhatsappCampaignsCampaigns[]', + 'count' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'campaigns' => null, + 'count' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'campaigns' => 'campaigns', + 'count' => 'count' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'campaigns' => 'setCampaigns', + 'count' => 'setCount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'campaigns' => 'getCampaigns', + 'count' => 'getCount' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['campaigns'] = isset($data['campaigns']) ? $data['campaigns'] : null; + $this->container['count'] = isset($data['count']) ? $data['count'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets campaigns + * + * @return \Brevo\Client\Model\GetWhatsappCampaignsCampaigns[] + */ + public function getCampaigns() + { + return $this->container['campaigns']; + } + + /** + * Sets campaigns + * + * @param \Brevo\Client\Model\GetWhatsappCampaignsCampaigns[] $campaigns campaigns + * + * @return $this + */ + public function setCampaigns($campaigns) + { + $this->container['campaigns'] = $campaigns; + + return $this; + } + + /** + * Gets count + * + * @return int + */ + public function getCount() + { + return $this->container['count']; + } + + /** + * Sets count + * + * @param int $count Number of WhatsApp campaigns retrived + * + * @return $this + */ + public function setCount($count) + { + $this->container['count'] = $count; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetWhatsappCampaignsCampaigns.php b/vendor/getbrevo/brevo-php/lib/Model/GetWhatsappCampaignsCampaigns.php new file mode 100644 index 0000000..32d2ceb --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetWhatsappCampaignsCampaigns.php @@ -0,0 +1,670 @@ + 'int', + 'campaignName' => 'string', + 'templateId' => 'string', + 'campaignStatus' => 'string', + 'scheduledAt' => 'string', + 'errorReason' => 'string', + 'invalidatedContacts' => 'int', + 'readPercentage' => 'float', + 'stats' => '\Brevo\Client\Model\WhatsappCampStats', + 'createdAt' => 'string', + 'modifiedAt' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'int64', + 'campaignName' => null, + 'templateId' => null, + 'campaignStatus' => null, + 'scheduledAt' => null, + 'errorReason' => null, + 'invalidatedContacts' => 'int64', + 'readPercentage' => 'float', + 'stats' => null, + 'createdAt' => null, + 'modifiedAt' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'campaignName' => 'campaignName', + 'templateId' => 'templateId', + 'campaignStatus' => 'campaignStatus', + 'scheduledAt' => 'scheduledAt', + 'errorReason' => 'errorReason', + 'invalidatedContacts' => 'invalidatedContacts', + 'readPercentage' => 'readPercentage', + 'stats' => 'stats', + 'createdAt' => 'createdAt', + 'modifiedAt' => 'modifiedAt' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'campaignName' => 'setCampaignName', + 'templateId' => 'setTemplateId', + 'campaignStatus' => 'setCampaignStatus', + 'scheduledAt' => 'setScheduledAt', + 'errorReason' => 'setErrorReason', + 'invalidatedContacts' => 'setInvalidatedContacts', + 'readPercentage' => 'setReadPercentage', + 'stats' => 'setStats', + 'createdAt' => 'setCreatedAt', + 'modifiedAt' => 'setModifiedAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'campaignName' => 'getCampaignName', + 'templateId' => 'getTemplateId', + 'campaignStatus' => 'getCampaignStatus', + 'scheduledAt' => 'getScheduledAt', + 'errorReason' => 'getErrorReason', + 'invalidatedContacts' => 'getInvalidatedContacts', + 'readPercentage' => 'getReadPercentage', + 'stats' => 'getStats', + 'createdAt' => 'getCreatedAt', + 'modifiedAt' => 'getModifiedAt' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const CAMPAIGN_STATUS_DRAFT = 'draft'; + const CAMPAIGN_STATUS_SCHEDULED = 'scheduled'; + const CAMPAIGN_STATUS_PENDING = 'pending'; + const CAMPAIGN_STATUS_APPROVED = 'approved'; + const CAMPAIGN_STATUS_RUNNING = 'running'; + const CAMPAIGN_STATUS_SUSPENDED = 'suspended'; + const CAMPAIGN_STATUS_REJECTED = 'rejected'; + const CAMPAIGN_STATUS_SENT = 'sent'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getCampaignStatusAllowableValues() + { + return [ + self::CAMPAIGN_STATUS_DRAFT, + self::CAMPAIGN_STATUS_SCHEDULED, + self::CAMPAIGN_STATUS_PENDING, + self::CAMPAIGN_STATUS_APPROVED, + self::CAMPAIGN_STATUS_RUNNING, + self::CAMPAIGN_STATUS_SUSPENDED, + self::CAMPAIGN_STATUS_REJECTED, + self::CAMPAIGN_STATUS_SENT, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['campaignName'] = isset($data['campaignName']) ? $data['campaignName'] : null; + $this->container['templateId'] = isset($data['templateId']) ? $data['templateId'] : null; + $this->container['campaignStatus'] = isset($data['campaignStatus']) ? $data['campaignStatus'] : null; + $this->container['scheduledAt'] = isset($data['scheduledAt']) ? $data['scheduledAt'] : null; + $this->container['errorReason'] = isset($data['errorReason']) ? $data['errorReason'] : null; + $this->container['invalidatedContacts'] = isset($data['invalidatedContacts']) ? $data['invalidatedContacts'] : null; + $this->container['readPercentage'] = isset($data['readPercentage']) ? $data['readPercentage'] : null; + $this->container['stats'] = isset($data['stats']) ? $data['stats'] : null; + $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; + $this->container['modifiedAt'] = isset($data['modifiedAt']) ? $data['modifiedAt'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['campaignName'] === null) { + $invalidProperties[] = "'campaignName' can't be null"; + } + if ($this->container['templateId'] === null) { + $invalidProperties[] = "'templateId' can't be null"; + } + if ($this->container['campaignStatus'] === null) { + $invalidProperties[] = "'campaignStatus' can't be null"; + } + $allowedValues = $this->getCampaignStatusAllowableValues(); + if (!is_null($this->container['campaignStatus']) && !in_array($this->container['campaignStatus'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'campaignStatus', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['scheduledAt'] === null) { + $invalidProperties[] = "'scheduledAt' can't be null"; + } + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + if ($this->container['modifiedAt'] === null) { + $invalidProperties[] = "'modifiedAt' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id ID of the WhatsApp Campaign + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets campaignName + * + * @return string + */ + public function getCampaignName() + { + return $this->container['campaignName']; + } + + /** + * Sets campaignName + * + * @param string $campaignName Name of the WhatsApp Campaign + * + * @return $this + */ + public function setCampaignName($campaignName) + { + $this->container['campaignName'] = $campaignName; + + return $this; + } + + /** + * Gets templateId + * + * @return string + */ + public function getTemplateId() + { + return $this->container['templateId']; + } + + /** + * Sets templateId + * + * @param string $templateId Id of the WhatsApp template + * + * @return $this + */ + public function setTemplateId($templateId) + { + $this->container['templateId'] = $templateId; + + return $this; + } + + /** + * Gets campaignStatus + * + * @return string + */ + public function getCampaignStatus() + { + return $this->container['campaignStatus']; + } + + /** + * Sets campaignStatus + * + * @param string $campaignStatus Status of the WhatsApp Campaign + * + * @return $this + */ + public function setCampaignStatus($campaignStatus) + { + $allowedValues = $this->getCampaignStatusAllowableValues(); + if (!in_array($campaignStatus, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'campaignStatus', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['campaignStatus'] = $campaignStatus; + + return $this; + } + + /** + * Gets scheduledAt + * + * @return string + */ + public function getScheduledAt() + { + return $this->container['scheduledAt']; + } + + /** + * Sets scheduledAt + * + * @param string $scheduledAt UTC date-time on which WhatsApp campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format + * + * @return $this + */ + public function setScheduledAt($scheduledAt) + { + $this->container['scheduledAt'] = $scheduledAt; + + return $this; + } + + /** + * Gets errorReason + * + * @return string + */ + public function getErrorReason() + { + return $this->container['errorReason']; + } + + /** + * Sets errorReason + * + * @param string $errorReason Error reason in the campaign creation + * + * @return $this + */ + public function setErrorReason($errorReason) + { + $this->container['errorReason'] = $errorReason; + + return $this; + } + + /** + * Gets invalidatedContacts + * + * @return int + */ + public function getInvalidatedContacts() + { + return $this->container['invalidatedContacts']; + } + + /** + * Sets invalidatedContacts + * + * @param int $invalidatedContacts Count of invalidated contacts + * + * @return $this + */ + public function setInvalidatedContacts($invalidatedContacts) + { + $this->container['invalidatedContacts'] = $invalidatedContacts; + + return $this; + } + + /** + * Gets readPercentage + * + * @return float + */ + public function getReadPercentage() + { + return $this->container['readPercentage']; + } + + /** + * Sets readPercentage + * + * @param float $readPercentage Read percentage of the the WhatsApp campaign created + * + * @return $this + */ + public function setReadPercentage($readPercentage) + { + $this->container['readPercentage'] = $readPercentage; + + return $this; + } + + /** + * Gets stats + * + * @return \Brevo\Client\Model\WhatsappCampStats + */ + public function getStats() + { + return $this->container['stats']; + } + + /** + * Sets stats + * + * @param \Brevo\Client\Model\WhatsappCampStats $stats stats + * + * @return $this + */ + public function setStats($stats) + { + $this->container['stats'] = $stats; + + return $this; + } + + /** + * Gets createdAt + * + * @return string + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param string $createdAt Creation UTC date-time of the WhatsApp campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + * + * @return $this + */ + public function setCreatedAt($createdAt) + { + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets modifiedAt + * + * @return string + */ + public function getModifiedAt() + { + return $this->container['modifiedAt']; + } + + /** + * Sets modifiedAt + * + * @param string $modifiedAt UTC date-time of last modification of the whatsapp template (YYYY-MM-DDTHH:mm:ss.SSSZ) + * + * @return $this + */ + public function setModifiedAt($modifiedAt) + { + $this->container['modifiedAt'] = $modifiedAt; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetWhatsappEventReport.php b/vendor/getbrevo/brevo-php/lib/Model/GetWhatsappEventReport.php new file mode 100644 index 0000000..1ebd730 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetWhatsappEventReport.php @@ -0,0 +1,305 @@ + '\Brevo\Client\Model\GetWhatsappEventReportEvents[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'events' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'events' => 'events' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'events' => 'setEvents' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'events' => 'getEvents' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['events'] = isset($data['events']) ? $data['events'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets events + * + * @return \Brevo\Client\Model\GetWhatsappEventReportEvents[] + */ + public function getEvents() + { + return $this->container['events']; + } + + /** + * Sets events + * + * @param \Brevo\Client\Model\GetWhatsappEventReportEvents[] $events events + * + * @return $this + */ + public function setEvents($events) + { + $this->container['events'] = $events; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/GetWhatsappEventReportEvents.php b/vendor/getbrevo/brevo-php/lib/Model/GetWhatsappEventReportEvents.php new file mode 100644 index 0000000..8a45339 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/GetWhatsappEventReportEvents.php @@ -0,0 +1,572 @@ + 'string', + 'date' => 'string', + 'messageId' => 'string', + 'event' => 'string', + 'reason' => 'string', + 'body' => 'string', + 'mediaUrl' => 'string', + 'senderNumber' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'contactNumber' => 'mobile', + 'date' => null, + 'messageId' => null, + 'event' => null, + 'reason' => null, + 'body' => null, + 'mediaUrl' => 'url', + 'senderNumber' => 'mobile' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'contactNumber' => 'contactNumber', + 'date' => 'date', + 'messageId' => 'messageId', + 'event' => 'event', + 'reason' => 'reason', + 'body' => 'body', + 'mediaUrl' => 'mediaUrl', + 'senderNumber' => 'senderNumber' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'contactNumber' => 'setContactNumber', + 'date' => 'setDate', + 'messageId' => 'setMessageId', + 'event' => 'setEvent', + 'reason' => 'setReason', + 'body' => 'setBody', + 'mediaUrl' => 'setMediaUrl', + 'senderNumber' => 'setSenderNumber' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'contactNumber' => 'getContactNumber', + 'date' => 'getDate', + 'messageId' => 'getMessageId', + 'event' => 'getEvent', + 'reason' => 'getReason', + 'body' => 'getBody', + 'mediaUrl' => 'getMediaUrl', + 'senderNumber' => 'getSenderNumber' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const EVENT_SENT = 'sent'; + const EVENT_DELIVERED = 'delivered'; + const EVENT_READ = 'read'; + const EVENT_ERROR = 'error'; + const EVENT_UNSUBSCRIBE = 'unsubscribe'; + const EVENT_REPLY = 'reply'; + const EVENT_SOFT_BOUNCE = 'soft-bounce'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getEventAllowableValues() + { + return [ + self::EVENT_SENT, + self::EVENT_DELIVERED, + self::EVENT_READ, + self::EVENT_ERROR, + self::EVENT_UNSUBSCRIBE, + self::EVENT_REPLY, + self::EVENT_SOFT_BOUNCE, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['contactNumber'] = isset($data['contactNumber']) ? $data['contactNumber'] : null; + $this->container['date'] = isset($data['date']) ? $data['date'] : null; + $this->container['messageId'] = isset($data['messageId']) ? $data['messageId'] : null; + $this->container['event'] = isset($data['event']) ? $data['event'] : null; + $this->container['reason'] = isset($data['reason']) ? $data['reason'] : null; + $this->container['body'] = isset($data['body']) ? $data['body'] : null; + $this->container['mediaUrl'] = isset($data['mediaUrl']) ? $data['mediaUrl'] : null; + $this->container['senderNumber'] = isset($data['senderNumber']) ? $data['senderNumber'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['contactNumber'] === null) { + $invalidProperties[] = "'contactNumber' can't be null"; + } + if ($this->container['date'] === null) { + $invalidProperties[] = "'date' can't be null"; + } + if ($this->container['messageId'] === null) { + $invalidProperties[] = "'messageId' can't be null"; + } + if ($this->container['event'] === null) { + $invalidProperties[] = "'event' can't be null"; + } + $allowedValues = $this->getEventAllowableValues(); + if (!is_null($this->container['event']) && !in_array($this->container['event'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'event', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['senderNumber'] === null) { + $invalidProperties[] = "'senderNumber' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets contactNumber + * + * @return string + */ + public function getContactNumber() + { + return $this->container['contactNumber']; + } + + /** + * Sets contactNumber + * + * @param string $contactNumber WhatsApp Number with country code. Example, 85264318721 + * + * @return $this + */ + public function setContactNumber($contactNumber) + { + $this->container['contactNumber'] = $contactNumber; + + return $this; + } + + /** + * Gets date + * + * @return string + */ + public function getDate() + { + return $this->container['date']; + } + + /** + * Sets date + * + * @param string $date UTC date-time on which the event has been generated + * + * @return $this + */ + public function setDate($date) + { + $this->container['date'] = $date; + + return $this; + } + + /** + * Gets messageId + * + * @return string + */ + public function getMessageId() + { + return $this->container['messageId']; + } + + /** + * Sets messageId + * + * @param string $messageId Message ID which generated the event + * + * @return $this + */ + public function setMessageId($messageId) + { + $this->container['messageId'] = $messageId; + + return $this; + } + + /** + * Gets event + * + * @return string + */ + public function getEvent() + { + return $this->container['event']; + } + + /** + * Sets event + * + * @param string $event Event which occurred + * + * @return $this + */ + public function setEvent($event) + { + $allowedValues = $this->getEventAllowableValues(); + if (!in_array($event, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'event', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['event'] = $event; + + return $this; + } + + /** + * Gets reason + * + * @return string + */ + public function getReason() + { + return $this->container['reason']; + } + + /** + * Sets reason + * + * @param string $reason Reason for the event (will be there in case of `error` and `soft-bounce` events) + * + * @return $this + */ + public function setReason($reason) + { + $this->container['reason'] = $reason; + + return $this; + } + + /** + * Gets body + * + * @return string + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param string $body Text of the reply (will be there only in case of `reply` event with text) + * + * @return $this + */ + public function setBody($body) + { + $this->container['body'] = $body; + + return $this; + } + + /** + * Gets mediaUrl + * + * @return string + */ + public function getMediaUrl() + { + return $this->container['mediaUrl']; + } + + /** + * Sets mediaUrl + * + * @param string $mediaUrl Url of the media reply (will be there only in case of `reply` event with media) + * + * @return $this + */ + public function setMediaUrl($mediaUrl) + { + $this->container['mediaUrl'] = $mediaUrl; + + return $this; + } + + /** + * Gets senderNumber + * + * @return string + */ + public function getSenderNumber() + { + return $this->container['senderNumber']; + } + + /** + * Sets senderNumber + * + * @param string $senderNumber WhatsApp Number with country code. Example, 85264318721 + * + * @return $this + */ + public function setSenderNumber($senderNumber) + { + $this->container['senderNumber'] = $senderNumber; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/InlineResponse200.php b/vendor/getbrevo/brevo-php/lib/Model/InlineResponse200.php new file mode 100644 index 0000000..29347f6 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/InlineResponse200.php @@ -0,0 +1,335 @@ + 'string', + 'groupName' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => null, + 'groupName' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'groupName' => 'groupName' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'groupName' => 'setGroupName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'groupName' => 'getGroupName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['groupName'] = isset($data['groupName']) ? $data['groupName'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Unique id of the group + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets groupName + * + * @return string + */ + public function getGroupName() + { + return $this->container['groupName']; + } + + /** + * Sets groupName + * + * @param string $groupName The name of the group of sub-accounts + * + * @return $this + */ + public function setGroupName($groupName) + { + $this->container['groupName'] = $groupName; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/InlineResponse2001.php b/vendor/getbrevo/brevo-php/lib/Model/InlineResponse2001.php new file mode 100644 index 0000000..4ffa18c --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/InlineResponse2001.php @@ -0,0 +1,309 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Unique company id + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/InlineResponse2002.php b/vendor/getbrevo/brevo-php/lib/Model/InlineResponse2002.php new file mode 100644 index 0000000..52f600e --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/InlineResponse2002.php @@ -0,0 +1,374 @@ + 'string', + 'name' => 'string', + 'defaultCoupon' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'uuidv4', + 'name' => 'uuidv4', + 'defaultCoupon' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'defaultCoupon' => 'defaultCoupon' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'defaultCoupon' => 'setDefaultCoupon' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'defaultCoupon' => 'getDefaultCoupon' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['defaultCoupon'] = isset($data['defaultCoupon']) ? $data['defaultCoupon'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['defaultCoupon'] === null) { + $invalidProperties[] = "'defaultCoupon' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id The id of the collection + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name The name of the collection + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets defaultCoupon + * + * @return string + */ + public function getDefaultCoupon() + { + return $this->container['defaultCoupon']; + } + + /** + * Sets defaultCoupon + * + * @param string $defaultCoupon The default coupon of the collection + * + * @return $this + */ + public function setDefaultCoupon($defaultCoupon) + { + $this->container['defaultCoupon'] = $defaultCoupon; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/InlineResponse201.php b/vendor/getbrevo/brevo-php/lib/Model/InlineResponse201.php new file mode 100644 index 0000000..0c085bb --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/InlineResponse201.php @@ -0,0 +1,305 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id id + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/InlineResponse2011.php b/vendor/getbrevo/brevo-php/lib/Model/InlineResponse2011.php new file mode 100644 index 0000000..78d2ddc --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/InlineResponse2011.php @@ -0,0 +1,309 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Unique deal id + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/InlineResponse2012.php b/vendor/getbrevo/brevo-php/lib/Model/InlineResponse2012.php new file mode 100644 index 0000000..8cc8472 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/InlineResponse2012.php @@ -0,0 +1,309 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Unique task id + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/InlineResponse2013.php b/vendor/getbrevo/brevo-php/lib/Model/InlineResponse2013.php new file mode 100644 index 0000000..4ee7657 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/InlineResponse2013.php @@ -0,0 +1,308 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'uuidv4' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id The id of the created collection + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/InlineResponse2014.php b/vendor/getbrevo/brevo-php/lib/Model/InlineResponse2014.php new file mode 100644 index 0000000..d1cecdb --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/InlineResponse2014.php @@ -0,0 +1,308 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'messageId' => 'uuidv4' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'messageId' => 'messageId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'messageId' => 'setMessageId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'messageId' => 'getMessageId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['messageId'] = isset($data['messageId']) ? $data['messageId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['messageId'] === null) { + $invalidProperties[] = "'messageId' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets messageId + * + * @return string + */ + public function getMessageId() + { + return $this->container['messageId']; + } + + /** + * Sets messageId + * + * @param string $messageId messageId of sent message + * + * @return $this + */ + public function setMessageId($messageId) + { + $this->container['messageId'] = $messageId; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/InlineResponse2015.php b/vendor/getbrevo/brevo-php/lib/Model/InlineResponse2015.php new file mode 100644 index 0000000..65f1c00 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/InlineResponse2015.php @@ -0,0 +1,308 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'uuidv4' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id ID of the object created + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/InviteAdminUser.php b/vendor/getbrevo/brevo-php/lib/Model/InviteAdminUser.php new file mode 100644 index 0000000..75dbb6b --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/InviteAdminUser.php @@ -0,0 +1,404 @@ + 'string', + 'allFeaturesAccess' => 'bool', + 'groupIds' => 'string[]', + 'privileges' => '\Brevo\Client\Model\InviteAdminUserPrivileges[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'email' => 'email', + 'allFeaturesAccess' => null, + 'groupIds' => null, + 'privileges' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'email' => 'email', + 'allFeaturesAccess' => 'all_features_access', + 'groupIds' => 'groupIds', + 'privileges' => 'privileges' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'email' => 'setEmail', + 'allFeaturesAccess' => 'setAllFeaturesAccess', + 'groupIds' => 'setGroupIds', + 'privileges' => 'setPrivileges' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'email' => 'getEmail', + 'allFeaturesAccess' => 'getAllFeaturesAccess', + 'groupIds' => 'getGroupIds', + 'privileges' => 'getPrivileges' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['allFeaturesAccess'] = isset($data['allFeaturesAccess']) ? $data['allFeaturesAccess'] : null; + $this->container['groupIds'] = isset($data['groupIds']) ? $data['groupIds'] : null; + $this->container['privileges'] = isset($data['privileges']) ? $data['privileges'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + if ($this->container['allFeaturesAccess'] === null) { + $invalidProperties[] = "'allFeaturesAccess' can't be null"; + } + if ($this->container['privileges'] === null) { + $invalidProperties[] = "'privileges' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email Email address for the organization + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets allFeaturesAccess + * + * @return bool + */ + public function getAllFeaturesAccess() + { + return $this->container['allFeaturesAccess']; + } + + /** + * Sets allFeaturesAccess + * + * @param bool $allFeaturesAccess All access to the features + * + * @return $this + */ + public function setAllFeaturesAccess($allFeaturesAccess) + { + $this->container['allFeaturesAccess'] = $allFeaturesAccess; + + return $this; + } + + /** + * Gets groupIds + * + * @return string[] + */ + public function getGroupIds() + { + return $this->container['groupIds']; + } + + /** + * Sets groupIds + * + * @param string[] $groupIds Ids of Group + * + * @return $this + */ + public function setGroupIds($groupIds) + { + $this->container['groupIds'] = $groupIds; + + return $this; + } + + /** + * Gets privileges + * + * @return \Brevo\Client\Model\InviteAdminUserPrivileges[] + */ + public function getPrivileges() + { + return $this->container['privileges']; + } + + /** + * Sets privileges + * + * @param \Brevo\Client\Model\InviteAdminUserPrivileges[] $privileges privileges + * + * @return $this + */ + public function setPrivileges($privileges) + { + $this->container['privileges'] = $privileges; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/InviteAdminUserPrivileges.php b/vendor/getbrevo/brevo-php/lib/Model/InviteAdminUserPrivileges.php new file mode 100644 index 0000000..32b2f8c --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/InviteAdminUserPrivileges.php @@ -0,0 +1,396 @@ + 'string', + 'permissions' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'feature' => null, + 'permissions' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'feature' => 'feature', + 'permissions' => 'permissions' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'feature' => 'setFeature', + 'permissions' => 'setPermissions' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'feature' => 'getFeature', + 'permissions' => 'getPermissions' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const FEATURE_MY_PLAN = 'my_plan'; + const FEATURE_API = 'api'; + const FEATURE_USER_MANAGEMENT = 'user_management'; + const FEATURE_APP_MANAGEMENT = 'app_management'; + const PERMISSIONS_ALL = 'all'; + const PERMISSIONS_NONE = 'none'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getFeatureAllowableValues() + { + return [ + self::FEATURE_MY_PLAN, + self::FEATURE_API, + self::FEATURE_USER_MANAGEMENT, + self::FEATURE_APP_MANAGEMENT, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getPermissionsAllowableValues() + { + return [ + self::PERMISSIONS_ALL, + self::PERMISSIONS_NONE, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['feature'] = isset($data['feature']) ? $data['feature'] : null; + $this->container['permissions'] = isset($data['permissions']) ? $data['permissions'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getFeatureAllowableValues(); + if (!is_null($this->container['feature']) && !in_array($this->container['feature'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'feature', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets feature + * + * @return string + */ + public function getFeature() + { + return $this->container['feature']; + } + + /** + * Sets feature + * + * @param string $feature Feature name + * + * @return $this + */ + public function setFeature($feature) + { + $allowedValues = $this->getFeatureAllowableValues(); + if (!is_null($feature) && !in_array($feature, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'feature', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['feature'] = $feature; + + return $this; + } + + /** + * Gets permissions + * + * @return string[] + */ + public function getPermissions() + { + return $this->container['permissions']; + } + + /** + * Sets permissions + * + * @param string[] $permissions Permissions for a given feature + * + * @return $this + */ + public function setPermissions($permissions) + { + $allowedValues = $this->getPermissionsAllowableValues(); + if (!is_null($permissions) && array_diff($permissions, $allowedValues)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'permissions', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['permissions'] = $permissions; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/Inviteuser.php b/vendor/getbrevo/brevo-php/lib/Model/Inviteuser.php new file mode 100644 index 0000000..88a888a --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/Inviteuser.php @@ -0,0 +1,374 @@ + 'string', + 'allFeaturesAccess' => 'bool', + 'privileges' => '\Brevo\Client\Model\InviteuserPrivileges[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'email' => 'email', + 'allFeaturesAccess' => null, + 'privileges' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'email' => 'email', + 'allFeaturesAccess' => 'all_features_access', + 'privileges' => 'privileges' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'email' => 'setEmail', + 'allFeaturesAccess' => 'setAllFeaturesAccess', + 'privileges' => 'setPrivileges' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'email' => 'getEmail', + 'allFeaturesAccess' => 'getAllFeaturesAccess', + 'privileges' => 'getPrivileges' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['allFeaturesAccess'] = isset($data['allFeaturesAccess']) ? $data['allFeaturesAccess'] : null; + $this->container['privileges'] = isset($data['privileges']) ? $data['privileges'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + if ($this->container['allFeaturesAccess'] === null) { + $invalidProperties[] = "'allFeaturesAccess' can't be null"; + } + if ($this->container['privileges'] === null) { + $invalidProperties[] = "'privileges' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email Email address for the organization + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets allFeaturesAccess + * + * @return bool + */ + public function getAllFeaturesAccess() + { + return $this->container['allFeaturesAccess']; + } + + /** + * Sets allFeaturesAccess + * + * @param bool $allFeaturesAccess All access to the features + * + * @return $this + */ + public function setAllFeaturesAccess($allFeaturesAccess) + { + $this->container['allFeaturesAccess'] = $allFeaturesAccess; + + return $this; + } + + /** + * Gets privileges + * + * @return \Brevo\Client\Model\InviteuserPrivileges[] + */ + public function getPrivileges() + { + return $this->container['privileges']; + } + + /** + * Sets privileges + * + * @param \Brevo\Client\Model\InviteuserPrivileges[] $privileges privileges + * + * @return $this + */ + public function setPrivileges($privileges) + { + $this->container['privileges'] = $privileges; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/InviteuserPrivileges.php b/vendor/getbrevo/brevo-php/lib/Model/InviteuserPrivileges.php new file mode 100644 index 0000000..5832ae9 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/InviteuserPrivileges.php @@ -0,0 +1,468 @@ + 'string', + 'permissions' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'feature' => null, + 'permissions' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'feature' => 'feature', + 'permissions' => 'permissions' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'feature' => 'setFeature', + 'permissions' => 'setPermissions' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'feature' => 'getFeature', + 'permissions' => 'getPermissions' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const FEATURE_EMAIL_CAMPAIGNS = 'email_campaigns'; + const FEATURE_SMS_CAMPAIGNS = 'sms_campaigns'; + const FEATURE_CONTACTS = 'contacts'; + const FEATURE_TEMPLATES = 'templates'; + const FEATURE_WORKFLOWS = 'workflows'; + const FEATURE_FACEBOOK_ADS = 'facebook_ads'; + const FEATURE_LANDING_PAGES = 'landing_pages'; + const FEATURE_TRANSACTIONAL_EMAILS = 'transactional_emails'; + const FEATURE_SMTP_API = 'smtp_api'; + const FEATURE_USER_MANAGEMENT = 'user_management'; + const FEATURE_SALES_PLATFORM = 'sales_platform'; + const FEATURE_PHONE = 'phone'; + const FEATURE_CONVERSATIONS = 'conversations'; + const FEATURE_SENDERS_DOMAINS_DEDICATED_IPS = 'senders_domains_dedicated_ips'; + const FEATURE_PUSH_NOTIFICATIONS = 'push_notifications'; + const PERMISSIONS_CREATE_EDIT_DELETE = 'create_edit_delete'; + const PERMISSIONS_SEND_SCHEDULE_SUSPEND = 'send_schedule_suspend'; + const PERMISSIONS_VIEW = 'view'; + const PERMISSIONS_IMPORT = 'import'; + const PERMISSIONS_EXPORT = 'export'; + const PERMISSIONS_LIST_AND_ATTRIBUTES = 'list_and_attributes'; + const PERMISSIONS_FORMS = 'forms'; + const PERMISSIONS_ACTIVATE_DEACTIVATE = 'activate_deactivate'; + const PERMISSIONS_ACTIVATE_DEACTIVATE_PAUSE = 'activate_deactivate_pause'; + const PERMISSIONS_SETTINGS = 'settings'; + const PERMISSIONS_SCHEDULE_PAUSE = 'schedule_pause'; + const PERMISSIONS_ALL = 'all'; + const PERMISSIONS_LOGS = 'logs'; + const PERMISSIONS_ACCESS = 'access'; + const PERMISSIONS_ASSIGN = 'assign'; + const PERMISSIONS_CONFIGURE = 'configure'; + const PERMISSIONS_MANAGE_OWNED_DEALS_TASKS_COMPANIES = 'manage_owned_deals_tasks_companies'; + const PERMISSIONS_MANAGE_OTHERS_DEALS_TASKS_COMPANIES = 'manage_others_deals_tasks_companies'; + const PERMISSIONS_REPORTS = 'reports'; + const PERMISSIONS_SENDERS_MANAGEMENT = 'senders_management'; + const PERMISSIONS_DOMAINS_MANAGEMENT = 'domains_management'; + const PERMISSIONS_DEDICATED_IPS_MANAGEMENT = 'dedicated_ips_management'; + const PERMISSIONS_SEND = 'send'; + const PERMISSIONS_SMTP = 'smtp'; + const PERMISSIONS_API_KEYS = 'api_keys'; + const PERMISSIONS_AUTHORIZED_IPS = 'authorized_ips'; + const PERMISSIONS_NONE = 'none'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getFeatureAllowableValues() + { + return [ + self::FEATURE_EMAIL_CAMPAIGNS, + self::FEATURE_SMS_CAMPAIGNS, + self::FEATURE_CONTACTS, + self::FEATURE_TEMPLATES, + self::FEATURE_WORKFLOWS, + self::FEATURE_FACEBOOK_ADS, + self::FEATURE_LANDING_PAGES, + self::FEATURE_TRANSACTIONAL_EMAILS, + self::FEATURE_SMTP_API, + self::FEATURE_USER_MANAGEMENT, + self::FEATURE_SALES_PLATFORM, + self::FEATURE_PHONE, + self::FEATURE_CONVERSATIONS, + self::FEATURE_SENDERS_DOMAINS_DEDICATED_IPS, + self::FEATURE_PUSH_NOTIFICATIONS, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getPermissionsAllowableValues() + { + return [ + self::PERMISSIONS_CREATE_EDIT_DELETE, + self::PERMISSIONS_SEND_SCHEDULE_SUSPEND, + self::PERMISSIONS_VIEW, + self::PERMISSIONS_IMPORT, + self::PERMISSIONS_EXPORT, + self::PERMISSIONS_LIST_AND_ATTRIBUTES, + self::PERMISSIONS_FORMS, + self::PERMISSIONS_ACTIVATE_DEACTIVATE, + self::PERMISSIONS_ACTIVATE_DEACTIVATE_PAUSE, + self::PERMISSIONS_SETTINGS, + self::PERMISSIONS_SCHEDULE_PAUSE, + self::PERMISSIONS_ALL, + self::PERMISSIONS_LOGS, + self::PERMISSIONS_ACCESS, + self::PERMISSIONS_ASSIGN, + self::PERMISSIONS_CONFIGURE, + self::PERMISSIONS_MANAGE_OWNED_DEALS_TASKS_COMPANIES, + self::PERMISSIONS_MANAGE_OTHERS_DEALS_TASKS_COMPANIES, + self::PERMISSIONS_REPORTS, + self::PERMISSIONS_SENDERS_MANAGEMENT, + self::PERMISSIONS_DOMAINS_MANAGEMENT, + self::PERMISSIONS_DEDICATED_IPS_MANAGEMENT, + self::PERMISSIONS_SEND, + self::PERMISSIONS_SMTP, + self::PERMISSIONS_API_KEYS, + self::PERMISSIONS_AUTHORIZED_IPS, + self::PERMISSIONS_NONE, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['feature'] = isset($data['feature']) ? $data['feature'] : null; + $this->container['permissions'] = isset($data['permissions']) ? $data['permissions'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getFeatureAllowableValues(); + if (!is_null($this->container['feature']) && !in_array($this->container['feature'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'feature', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets feature + * + * @return string + */ + public function getFeature() + { + return $this->container['feature']; + } + + /** + * Sets feature + * + * @param string $feature Feature name + * + * @return $this + */ + public function setFeature($feature) + { + $allowedValues = $this->getFeatureAllowableValues(); + if (!is_null($feature) && !in_array($feature, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'feature', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['feature'] = $feature; + + return $this; + } + + /** + * Gets permissions + * + * @return string[] + */ + public function getPermissions() + { + return $this->container['permissions']; + } + + /** + * Sets permissions + * + * @param string[] $permissions Permissions for a given feature + * + * @return $this + */ + public function setPermissions($permissions) + { + $allowedValues = $this->getPermissionsAllowableValues(); + if (!is_null($permissions) && array_diff($permissions, $allowedValues)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'permissions', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['permissions'] = $permissions; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/ManageIp.php b/vendor/getbrevo/brevo-php/lib/Model/ManageIp.php new file mode 100644 index 0000000..d3c973c --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/ManageIp.php @@ -0,0 +1,305 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'ip' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'ip' => 'ip' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'ip' => 'setIp' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'ip' => 'getIp' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets ip + * + * @return string + */ + public function getIp() + { + return $this->container['ip']; + } + + /** + * Sets ip + * + * @param string $ip Dedicated ID + * + * @return $this + */ + public function setIp($ip) + { + $this->container['ip'] = $ip; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/MasterDetailsResponse.php b/vendor/getbrevo/brevo-php/lib/Model/MasterDetailsResponse.php new file mode 100644 index 0000000..3b98206 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/MasterDetailsResponse.php @@ -0,0 +1,485 @@ + 'string', + 'companyName' => 'string', + 'id' => 'int', + 'currencyCode' => 'string', + 'timezone' => 'string', + 'billingInfo' => '\Brevo\Client\Model\MasterDetailsResponseBillingInfo', + 'planInfo' => '\Brevo\Client\Model\MasterDetailsResponsePlanInfo' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'email' => null, + 'companyName' => null, + 'id' => 'int64', + 'currencyCode' => null, + 'timezone' => null, + 'billingInfo' => null, + 'planInfo' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'email' => 'email', + 'companyName' => 'companyName', + 'id' => 'id', + 'currencyCode' => 'currencyCode', + 'timezone' => 'timezone', + 'billingInfo' => 'billingInfo', + 'planInfo' => 'planInfo' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'email' => 'setEmail', + 'companyName' => 'setCompanyName', + 'id' => 'setId', + 'currencyCode' => 'setCurrencyCode', + 'timezone' => 'setTimezone', + 'billingInfo' => 'setBillingInfo', + 'planInfo' => 'setPlanInfo' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'email' => 'getEmail', + 'companyName' => 'getCompanyName', + 'id' => 'getId', + 'currencyCode' => 'getCurrencyCode', + 'timezone' => 'getTimezone', + 'billingInfo' => 'getBillingInfo', + 'planInfo' => 'getPlanInfo' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['companyName'] = isset($data['companyName']) ? $data['companyName'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['currencyCode'] = isset($data['currencyCode']) ? $data['currencyCode'] : null; + $this->container['timezone'] = isset($data['timezone']) ? $data['timezone'] : null; + $this->container['billingInfo'] = isset($data['billingInfo']) ? $data['billingInfo'] : null; + $this->container['planInfo'] = isset($data['planInfo']) ? $data['planInfo'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email Email id of master account + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets companyName + * + * @return string + */ + public function getCompanyName() + { + return $this->container['companyName']; + } + + /** + * Sets companyName + * + * @param string $companyName Company name of master account organization + * + * @return $this + */ + public function setCompanyName($companyName) + { + $this->container['companyName'] = $companyName; + + return $this; + } + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id Unique identifier of the master account organization + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets currencyCode + * + * @return string + */ + public function getCurrencyCode() + { + return $this->container['currencyCode']; + } + + /** + * Sets currencyCode + * + * @param string $currencyCode Currency code of the master account organization + * + * @return $this + */ + public function setCurrencyCode($currencyCode) + { + $this->container['currencyCode'] = $currencyCode; + + return $this; + } + + /** + * Gets timezone + * + * @return string + */ + public function getTimezone() + { + return $this->container['timezone']; + } + + /** + * Sets timezone + * + * @param string $timezone Timezone of the master account organization + * + * @return $this + */ + public function setTimezone($timezone) + { + $this->container['timezone'] = $timezone; + + return $this; + } + + /** + * Gets billingInfo + * + * @return \Brevo\Client\Model\MasterDetailsResponseBillingInfo + */ + public function getBillingInfo() + { + return $this->container['billingInfo']; + } + + /** + * Sets billingInfo + * + * @param \Brevo\Client\Model\MasterDetailsResponseBillingInfo $billingInfo billingInfo + * + * @return $this + */ + public function setBillingInfo($billingInfo) + { + $this->container['billingInfo'] = $billingInfo; + + return $this; + } + + /** + * Gets planInfo + * + * @return \Brevo\Client\Model\MasterDetailsResponsePlanInfo + */ + public function getPlanInfo() + { + return $this->container['planInfo']; + } + + /** + * Sets planInfo + * + * @param \Brevo\Client\Model\MasterDetailsResponsePlanInfo $planInfo planInfo + * + * @return $this + */ + public function setPlanInfo($planInfo) + { + $this->container['planInfo'] = $planInfo; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/MasterDetailsResponseBillingInfo.php b/vendor/getbrevo/brevo-php/lib/Model/MasterDetailsResponseBillingInfo.php new file mode 100644 index 0000000..519790b --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/MasterDetailsResponseBillingInfo.php @@ -0,0 +1,396 @@ + 'string', + 'companyName' => 'string', + 'name' => '\Brevo\Client\Model\MasterDetailsResponseBillingInfoName', + 'address' => '\Brevo\Client\Model\MasterDetailsResponseBillingInfoAddress' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'email' => null, + 'companyName' => null, + 'name' => null, + 'address' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'email' => 'email', + 'companyName' => 'companyName', + 'name' => 'name', + 'address' => 'address' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'email' => 'setEmail', + 'companyName' => 'setCompanyName', + 'name' => 'setName', + 'address' => 'setAddress' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'email' => 'getEmail', + 'companyName' => 'getCompanyName', + 'name' => 'getName', + 'address' => 'getAddress' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['companyName'] = isset($data['companyName']) ? $data['companyName'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['address'] = isset($data['address']) ? $data['address'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email Billing email id of master account + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets companyName + * + * @return string + */ + public function getCompanyName() + { + return $this->container['companyName']; + } + + /** + * Sets companyName + * + * @param string $companyName Company name of master account + * + * @return $this + */ + public function setCompanyName($companyName) + { + $this->container['companyName'] = $companyName; + + return $this; + } + + /** + * Gets name + * + * @return \Brevo\Client\Model\MasterDetailsResponseBillingInfoName + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param \Brevo\Client\Model\MasterDetailsResponseBillingInfoName $name name + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets address + * + * @return \Brevo\Client\Model\MasterDetailsResponseBillingInfoAddress + */ + public function getAddress() + { + return $this->container['address']; + } + + /** + * Sets address + * + * @param \Brevo\Client\Model\MasterDetailsResponseBillingInfoAddress $address address + * + * @return $this + */ + public function setAddress($address) + { + $this->container['address'] = $address; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/MasterDetailsResponseBillingInfoAddress.php b/vendor/getbrevo/brevo-php/lib/Model/MasterDetailsResponseBillingInfoAddress.php new file mode 100644 index 0000000..0fd11cf --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/MasterDetailsResponseBillingInfoAddress.php @@ -0,0 +1,426 @@ + 'string', + 'locality' => 'string', + 'postalCode' => 'string', + 'stateCode' => 'string', + 'countryCode' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'streetAddress' => null, + 'locality' => null, + 'postalCode' => null, + 'stateCode' => null, + 'countryCode' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'streetAddress' => 'streetAddress', + 'locality' => 'locality', + 'postalCode' => 'postalCode', + 'stateCode' => 'stateCode', + 'countryCode' => 'countryCode' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'streetAddress' => 'setStreetAddress', + 'locality' => 'setLocality', + 'postalCode' => 'setPostalCode', + 'stateCode' => 'setStateCode', + 'countryCode' => 'setCountryCode' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'streetAddress' => 'getStreetAddress', + 'locality' => 'getLocality', + 'postalCode' => 'getPostalCode', + 'stateCode' => 'getStateCode', + 'countryCode' => 'getCountryCode' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['streetAddress'] = isset($data['streetAddress']) ? $data['streetAddress'] : null; + $this->container['locality'] = isset($data['locality']) ? $data['locality'] : null; + $this->container['postalCode'] = isset($data['postalCode']) ? $data['postalCode'] : null; + $this->container['stateCode'] = isset($data['stateCode']) ? $data['stateCode'] : null; + $this->container['countryCode'] = isset($data['countryCode']) ? $data['countryCode'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets streetAddress + * + * @return string + */ + public function getStreetAddress() + { + return $this->container['streetAddress']; + } + + /** + * Sets streetAddress + * + * @param string $streetAddress Street address + * + * @return $this + */ + public function setStreetAddress($streetAddress) + { + $this->container['streetAddress'] = $streetAddress; + + return $this; + } + + /** + * Gets locality + * + * @return string + */ + public function getLocality() + { + return $this->container['locality']; + } + + /** + * Sets locality + * + * @param string $locality Locality + * + * @return $this + */ + public function setLocality($locality) + { + $this->container['locality'] = $locality; + + return $this; + } + + /** + * Gets postalCode + * + * @return string + */ + public function getPostalCode() + { + return $this->container['postalCode']; + } + + /** + * Sets postalCode + * + * @param string $postalCode Postal code + * + * @return $this + */ + public function setPostalCode($postalCode) + { + $this->container['postalCode'] = $postalCode; + + return $this; + } + + /** + * Gets stateCode + * + * @return string + */ + public function getStateCode() + { + return $this->container['stateCode']; + } + + /** + * Sets stateCode + * + * @param string $stateCode State code + * + * @return $this + */ + public function setStateCode($stateCode) + { + $this->container['stateCode'] = $stateCode; + + return $this; + } + + /** + * Gets countryCode + * + * @return string + */ + public function getCountryCode() + { + return $this->container['countryCode']; + } + + /** + * Sets countryCode + * + * @param string $countryCode Country code + * + * @return $this + */ + public function setCountryCode($countryCode) + { + $this->container['countryCode'] = $countryCode; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/MasterDetailsResponseBillingInfoName.php b/vendor/getbrevo/brevo-php/lib/Model/MasterDetailsResponseBillingInfoName.php new file mode 100644 index 0000000..9eaebdf --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/MasterDetailsResponseBillingInfoName.php @@ -0,0 +1,336 @@ + 'string', + 'familyName' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'givenName' => null, + 'familyName' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'givenName' => 'givenName', + 'familyName' => 'familyName' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'givenName' => 'setGivenName', + 'familyName' => 'setFamilyName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'givenName' => 'getGivenName', + 'familyName' => 'getFamilyName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['givenName'] = isset($data['givenName']) ? $data['givenName'] : null; + $this->container['familyName'] = isset($data['familyName']) ? $data['familyName'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets givenName + * + * @return string + */ + public function getGivenName() + { + return $this->container['givenName']; + } + + /** + * Sets givenName + * + * @param string $givenName First name for billing + * + * @return $this + */ + public function setGivenName($givenName) + { + $this->container['givenName'] = $givenName; + + return $this; + } + + /** + * Gets familyName + * + * @return string + */ + public function getFamilyName() + { + return $this->container['familyName']; + } + + /** + * Sets familyName + * + * @param string $familyName Last name for billing + * + * @return $this + */ + public function setFamilyName($familyName) + { + $this->container['familyName'] = $familyName; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/MasterDetailsResponsePlanInfo.php b/vendor/getbrevo/brevo-php/lib/Model/MasterDetailsResponsePlanInfo.php new file mode 100644 index 0000000..366576b --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/MasterDetailsResponsePlanInfo.php @@ -0,0 +1,488 @@ + 'string', + 'nextBillingAt' => 'int', + 'price' => 'float', + 'planPeriod' => 'string', + 'subAccounts' => 'int', + 'features' => '\Brevo\Client\Model\MasterDetailsResponsePlanInfoFeatures[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'currencyCode' => null, + 'nextBillingAt' => 'int64', + 'price' => null, + 'planPeriod' => null, + 'subAccounts' => null, + 'features' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'currencyCode' => 'currencyCode', + 'nextBillingAt' => 'nextBillingAt', + 'price' => 'price', + 'planPeriod' => 'planPeriod', + 'subAccounts' => 'subAccounts', + 'features' => 'features' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'currencyCode' => 'setCurrencyCode', + 'nextBillingAt' => 'setNextBillingAt', + 'price' => 'setPrice', + 'planPeriod' => 'setPlanPeriod', + 'subAccounts' => 'setSubAccounts', + 'features' => 'setFeatures' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'currencyCode' => 'getCurrencyCode', + 'nextBillingAt' => 'getNextBillingAt', + 'price' => 'getPrice', + 'planPeriod' => 'getPlanPeriod', + 'subAccounts' => 'getSubAccounts', + 'features' => 'getFeatures' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const PLAN_PERIOD_MONTH = 'month'; + const PLAN_PERIOD_YEAR = 'year'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getPlanPeriodAllowableValues() + { + return [ + self::PLAN_PERIOD_MONTH, + self::PLAN_PERIOD_YEAR, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['currencyCode'] = isset($data['currencyCode']) ? $data['currencyCode'] : null; + $this->container['nextBillingAt'] = isset($data['nextBillingAt']) ? $data['nextBillingAt'] : null; + $this->container['price'] = isset($data['price']) ? $data['price'] : null; + $this->container['planPeriod'] = isset($data['planPeriod']) ? $data['planPeriod'] : null; + $this->container['subAccounts'] = isset($data['subAccounts']) ? $data['subAccounts'] : null; + $this->container['features'] = isset($data['features']) ? $data['features'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getPlanPeriodAllowableValues(); + if (!is_null($this->container['planPeriod']) && !in_array($this->container['planPeriod'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'planPeriod', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets currencyCode + * + * @return string + */ + public function getCurrencyCode() + { + return $this->container['currencyCode']; + } + + /** + * Sets currencyCode + * + * @param string $currencyCode Plan currency + * + * @return $this + */ + public function setCurrencyCode($currencyCode) + { + $this->container['currencyCode'] = $currencyCode; + + return $this; + } + + /** + * Gets nextBillingAt + * + * @return int + */ + public function getNextBillingAt() + { + return $this->container['nextBillingAt']; + } + + /** + * Sets nextBillingAt + * + * @param int $nextBillingAt Timestamp of next billing date + * + * @return $this + */ + public function setNextBillingAt($nextBillingAt) + { + $this->container['nextBillingAt'] = $nextBillingAt; + + return $this; + } + + /** + * Gets price + * + * @return float + */ + public function getPrice() + { + return $this->container['price']; + } + + /** + * Sets price + * + * @param float $price Plan amount + * + * @return $this + */ + public function setPrice($price) + { + $this->container['price'] = $price; + + return $this; + } + + /** + * Gets planPeriod + * + * @return string + */ + public function getPlanPeriod() + { + return $this->container['planPeriod']; + } + + /** + * Sets planPeriod + * + * @param string $planPeriod Plan period type + * + * @return $this + */ + public function setPlanPeriod($planPeriod) + { + $allowedValues = $this->getPlanPeriodAllowableValues(); + if (!is_null($planPeriod) && !in_array($planPeriod, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'planPeriod', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['planPeriod'] = $planPeriod; + + return $this; + } + + /** + * Gets subAccounts + * + * @return int + */ + public function getSubAccounts() + { + return $this->container['subAccounts']; + } + + /** + * Sets subAccounts + * + * @param int $subAccounts Number of sub-accounts + * + * @return $this + */ + public function setSubAccounts($subAccounts) + { + $this->container['subAccounts'] = $subAccounts; + + return $this; + } + + /** + * Gets features + * + * @return \Brevo\Client\Model\MasterDetailsResponsePlanInfoFeatures[] + */ + public function getFeatures() + { + return $this->container['features']; + } + + /** + * Sets features + * + * @param \Brevo\Client\Model\MasterDetailsResponsePlanInfoFeatures[] $features List of provided features in the plan + * + * @return $this + */ + public function setFeatures($features) + { + $this->container['features'] = $features; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/MasterDetailsResponsePlanInfoFeatures.php b/vendor/getbrevo/brevo-php/lib/Model/MasterDetailsResponsePlanInfoFeatures.php new file mode 100644 index 0000000..cb40811 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/MasterDetailsResponsePlanInfoFeatures.php @@ -0,0 +1,485 @@ + 'string', + 'unitValue' => 'string', + 'quantity' => 'int', + 'quantityWithOverages' => 'int', + 'used' => 'int', + 'usedOverages' => 'int', + 'remaining' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null, + 'unitValue' => null, + 'quantity' => 'int64', + 'quantityWithOverages' => 'int64', + 'used' => 'int64', + 'usedOverages' => 'int64', + 'remaining' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'unitValue' => 'unitValue', + 'quantity' => 'quantity', + 'quantityWithOverages' => 'quantityWithOverages', + 'used' => 'used', + 'usedOverages' => 'usedOverages', + 'remaining' => 'remaining' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'unitValue' => 'setUnitValue', + 'quantity' => 'setQuantity', + 'quantityWithOverages' => 'setQuantityWithOverages', + 'used' => 'setUsed', + 'usedOverages' => 'setUsedOverages', + 'remaining' => 'setRemaining' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'unitValue' => 'getUnitValue', + 'quantity' => 'getQuantity', + 'quantityWithOverages' => 'getQuantityWithOverages', + 'used' => 'getUsed', + 'usedOverages' => 'getUsedOverages', + 'remaining' => 'getRemaining' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['unitValue'] = isset($data['unitValue']) ? $data['unitValue'] : null; + $this->container['quantity'] = isset($data['quantity']) ? $data['quantity'] : null; + $this->container['quantityWithOverages'] = isset($data['quantityWithOverages']) ? $data['quantityWithOverages'] : null; + $this->container['used'] = isset($data['used']) ? $data['used'] : null; + $this->container['usedOverages'] = isset($data['usedOverages']) ? $data['usedOverages'] : null; + $this->container['remaining'] = isset($data['remaining']) ? $data['remaining'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the feature + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets unitValue + * + * @return string + */ + public function getUnitValue() + { + return $this->container['unitValue']; + } + + /** + * Sets unitValue + * + * @param string $unitValue Unit value of the feature + * + * @return $this + */ + public function setUnitValue($unitValue) + { + $this->container['unitValue'] = $unitValue; + + return $this; + } + + /** + * Gets quantity + * + * @return int + */ + public function getQuantity() + { + return $this->container['quantity']; + } + + /** + * Sets quantity + * + * @param int $quantity Quantity provided in the plan + * + * @return $this + */ + public function setQuantity($quantity) + { + $this->container['quantity'] = $quantity; + + return $this; + } + + /** + * Gets quantityWithOverages + * + * @return int + */ + public function getQuantityWithOverages() + { + return $this->container['quantityWithOverages']; + } + + /** + * Sets quantityWithOverages + * + * @param int $quantityWithOverages Quantity with overages provided in the plan (only applicable on ENTv2) + * + * @return $this + */ + public function setQuantityWithOverages($quantityWithOverages) + { + $this->container['quantityWithOverages'] = $quantityWithOverages; + + return $this; + } + + /** + * Gets used + * + * @return int + */ + public function getUsed() + { + return $this->container['used']; + } + + /** + * Sets used + * + * @param int $used Quantity consumed by master + * + * @return $this + */ + public function setUsed($used) + { + $this->container['used'] = $used; + + return $this; + } + + /** + * Gets usedOverages + * + * @return int + */ + public function getUsedOverages() + { + return $this->container['usedOverages']; + } + + /** + * Sets usedOverages + * + * @param int $usedOverages Quantity consumed by sub-organizations over the admin plan limit (only applicable on ENTv2) + * + * @return $this + */ + public function setUsedOverages($usedOverages) + { + $this->container['usedOverages'] = $usedOverages; + + return $this; + } + + /** + * Gets remaining + * + * @return int + */ + public function getRemaining() + { + return $this->container['remaining']; + } + + /** + * Sets remaining + * + * @param int $remaining Quantity remaining in the plan + * + * @return $this + */ + public function setRemaining($remaining) + { + $this->container['remaining'] = $remaining; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/ModelInterface.php b/vendor/getbrevo/brevo-php/lib/Model/ModelInterface.php new file mode 100644 index 0000000..4aebc13 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/ModelInterface.php @@ -0,0 +1,96 @@ + 'string', + 'text' => 'string', + 'contactIds' => 'int[]', + 'dealIds' => 'string[]', + 'authorId' => 'object', + 'createdAt' => '\DateTime', + 'updatedAt' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => null, + 'text' => null, + 'contactIds' => null, + 'dealIds' => null, + 'authorId' => null, + 'createdAt' => 'date-time', + 'updatedAt' => 'date-time' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'text' => 'text', + 'contactIds' => 'contactIds', + 'dealIds' => 'dealIds', + 'authorId' => 'authorId', + 'createdAt' => 'createdAt', + 'updatedAt' => 'updatedAt' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'text' => 'setText', + 'contactIds' => 'setContactIds', + 'dealIds' => 'setDealIds', + 'authorId' => 'setAuthorId', + 'createdAt' => 'setCreatedAt', + 'updatedAt' => 'setUpdatedAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'text' => 'getText', + 'contactIds' => 'getContactIds', + 'dealIds' => 'getDealIds', + 'authorId' => 'getAuthorId', + 'createdAt' => 'getCreatedAt', + 'updatedAt' => 'getUpdatedAt' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['text'] = isset($data['text']) ? $data['text'] : null; + $this->container['contactIds'] = isset($data['contactIds']) ? $data['contactIds'] : null; + $this->container['dealIds'] = isset($data['dealIds']) ? $data['dealIds'] : null; + $this->container['authorId'] = isset($data['authorId']) ? $data['authorId'] : null; + $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; + $this->container['updatedAt'] = isset($data['updatedAt']) ? $data['updatedAt'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['text'] === null) { + $invalidProperties[] = "'text' can't be null"; + } + if ((mb_strlen($this->container['text']) > 3000)) { + $invalidProperties[] = "invalid value for 'text', the character length must be smaller than or equal to 3000."; + } + + if ((mb_strlen($this->container['text']) < 1)) { + $invalidProperties[] = "invalid value for 'text', the character length must be bigger than or equal to 1."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Unique note Id + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets text + * + * @return string + */ + public function getText() + { + return $this->container['text']; + } + + /** + * Sets text + * + * @param string $text Text content of a note + * + * @return $this + */ + public function setText($text) + { + if ((mb_strlen($text) > 3000)) { + throw new \InvalidArgumentException('invalid length for $text when calling Note., must be smaller than or equal to 3000.'); + } + if ((mb_strlen($text) < 1)) { + throw new \InvalidArgumentException('invalid length for $text when calling Note., must be bigger than or equal to 1.'); + } + + $this->container['text'] = $text; + + return $this; + } + + /** + * Gets contactIds + * + * @return int[] + */ + public function getContactIds() + { + return $this->container['contactIds']; + } + + /** + * Sets contactIds + * + * @param int[] $contactIds Contact ids linked to a note + * + * @return $this + */ + public function setContactIds($contactIds) + { + $this->container['contactIds'] = $contactIds; + + return $this; + } + + /** + * Gets dealIds + * + * @return string[] + */ + public function getDealIds() + { + return $this->container['dealIds']; + } + + /** + * Sets dealIds + * + * @param string[] $dealIds Deal ids linked to a note + * + * @return $this + */ + public function setDealIds($dealIds) + { + $this->container['dealIds'] = $dealIds; + + return $this; + } + + /** + * Gets authorId + * + * @return object + */ + public function getAuthorId() + { + return $this->container['authorId']; + } + + /** + * Sets authorId + * + * @param object $authorId Account details of user which created the note + * + * @return $this + */ + public function setAuthorId($authorId) + { + $this->container['authorId'] = $authorId; + + return $this; + } + + /** + * Gets createdAt + * + * @return \DateTime + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param \DateTime $createdAt Note created date/time + * + * @return $this + */ + public function setCreatedAt($createdAt) + { + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets updatedAt + * + * @return \DateTime + */ + public function getUpdatedAt() + { + return $this->container['updatedAt']; + } + + /** + * Sets updatedAt + * + * @param \DateTime $updatedAt Note updated date/time + * + * @return $this + */ + public function setUpdatedAt($updatedAt) + { + $this->container['updatedAt'] = $updatedAt; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/NoteData.php b/vendor/getbrevo/brevo-php/lib/Model/NoteData.php new file mode 100644 index 0000000..0b23fb0 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/NoteData.php @@ -0,0 +1,414 @@ + 'string', + 'contactIds' => 'int[]', + 'dealIds' => 'string[]', + 'companyIds' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'text' => null, + 'contactIds' => null, + 'dealIds' => null, + 'companyIds' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'text' => 'text', + 'contactIds' => 'contactIds', + 'dealIds' => 'dealIds', + 'companyIds' => 'companyIds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'text' => 'setText', + 'contactIds' => 'setContactIds', + 'dealIds' => 'setDealIds', + 'companyIds' => 'setCompanyIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'text' => 'getText', + 'contactIds' => 'getContactIds', + 'dealIds' => 'getDealIds', + 'companyIds' => 'getCompanyIds' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['text'] = isset($data['text']) ? $data['text'] : null; + $this->container['contactIds'] = isset($data['contactIds']) ? $data['contactIds'] : null; + $this->container['dealIds'] = isset($data['dealIds']) ? $data['dealIds'] : null; + $this->container['companyIds'] = isset($data['companyIds']) ? $data['companyIds'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['text'] === null) { + $invalidProperties[] = "'text' can't be null"; + } + if ((mb_strlen($this->container['text']) > 3000)) { + $invalidProperties[] = "invalid value for 'text', the character length must be smaller than or equal to 3000."; + } + + if ((mb_strlen($this->container['text']) < 1)) { + $invalidProperties[] = "invalid value for 'text', the character length must be bigger than or equal to 1."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets text + * + * @return string + */ + public function getText() + { + return $this->container['text']; + } + + /** + * Sets text + * + * @param string $text Text content of a note + * + * @return $this + */ + public function setText($text) + { + if ((mb_strlen($text) > 3000)) { + throw new \InvalidArgumentException('invalid length for $text when calling NoteData., must be smaller than or equal to 3000.'); + } + if ((mb_strlen($text) < 1)) { + throw new \InvalidArgumentException('invalid length for $text when calling NoteData., must be bigger than or equal to 1.'); + } + + $this->container['text'] = $text; + + return $this; + } + + /** + * Gets contactIds + * + * @return int[] + */ + public function getContactIds() + { + return $this->container['contactIds']; + } + + /** + * Sets contactIds + * + * @param int[] $contactIds Contact Ids linked to a note + * + * @return $this + */ + public function setContactIds($contactIds) + { + $this->container['contactIds'] = $contactIds; + + return $this; + } + + /** + * Gets dealIds + * + * @return string[] + */ + public function getDealIds() + { + return $this->container['dealIds']; + } + + /** + * Sets dealIds + * + * @param string[] $dealIds Deal Ids linked to a note + * + * @return $this + */ + public function setDealIds($dealIds) + { + $this->container['dealIds'] = $dealIds; + + return $this; + } + + /** + * Gets companyIds + * + * @return string[] + */ + public function getCompanyIds() + { + return $this->container['companyIds']; + } + + /** + * Sets companyIds + * + * @param string[] $companyIds Company Ids linked to a note + * + * @return $this + */ + public function setCompanyIds($companyIds) + { + $this->container['companyIds'] = $companyIds; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/NoteId.php b/vendor/getbrevo/brevo-php/lib/Model/NoteId.php new file mode 100644 index 0000000..30d6181 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/NoteId.php @@ -0,0 +1,306 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Unique note Id + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/NoteList.php b/vendor/getbrevo/brevo-php/lib/Model/NoteList.php new file mode 100644 index 0000000..93e4cad --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/NoteList.php @@ -0,0 +1,281 @@ +listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/Order.php b/vendor/getbrevo/brevo-php/lib/Model/Order.php new file mode 100644 index 0000000..688f576 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/Order.php @@ -0,0 +1,563 @@ + 'string', + 'createdAt' => 'string', + 'updatedAt' => 'string', + 'status' => 'string', + 'amount' => 'float', + 'products' => '\Brevo\Client\Model\OrderProducts[]', + 'email' => 'string', + 'billing' => '\Brevo\Client\Model\OrderBilling', + 'coupons' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => null, + 'createdAt' => null, + 'updatedAt' => null, + 'status' => null, + 'amount' => null, + 'products' => null, + 'email' => null, + 'billing' => null, + 'coupons' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'createdAt' => 'createdAt', + 'updatedAt' => 'updatedAt', + 'status' => 'status', + 'amount' => 'amount', + 'products' => 'products', + 'email' => 'email', + 'billing' => 'billing', + 'coupons' => 'coupons' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'createdAt' => 'setCreatedAt', + 'updatedAt' => 'setUpdatedAt', + 'status' => 'setStatus', + 'amount' => 'setAmount', + 'products' => 'setProducts', + 'email' => 'setEmail', + 'billing' => 'setBilling', + 'coupons' => 'setCoupons' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'createdAt' => 'getCreatedAt', + 'updatedAt' => 'getUpdatedAt', + 'status' => 'getStatus', + 'amount' => 'getAmount', + 'products' => 'getProducts', + 'email' => 'getEmail', + 'billing' => 'getBilling', + 'coupons' => 'getCoupons' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; + $this->container['updatedAt'] = isset($data['updatedAt']) ? $data['updatedAt'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['amount'] = isset($data['amount']) ? $data['amount'] : null; + $this->container['products'] = isset($data['products']) ? $data['products'] : null; + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['billing'] = isset($data['billing']) ? $data['billing'] : null; + $this->container['coupons'] = isset($data['coupons']) ? $data['coupons'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + if ($this->container['updatedAt'] === null) { + $invalidProperties[] = "'updatedAt' can't be null"; + } + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } + if ($this->container['amount'] === null) { + $invalidProperties[] = "'amount' can't be null"; + } + if ($this->container['products'] === null) { + $invalidProperties[] = "'products' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Unique ID of the order. + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets createdAt + * + * @return string + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param string $createdAt Event occurrence UTC date-time (YYYY-MM-DDTHH:mm:ssZ), when order is actually created. + * + * @return $this + */ + public function setCreatedAt($createdAt) + { + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets updatedAt + * + * @return string + */ + public function getUpdatedAt() + { + return $this->container['updatedAt']; + } + + /** + * Sets updatedAt + * + * @param string $updatedAt Event updated UTC date-time (YYYY-MM-DDTHH:mm:ssZ), when the status of the order is actually changed/updated. + * + * @return $this + */ + public function setUpdatedAt($updatedAt) + { + $this->container['updatedAt'] = $updatedAt; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status State of the order. + * + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets amount + * + * @return float + */ + public function getAmount() + { + return $this->container['amount']; + } + + /** + * Sets amount + * + * @param float $amount Total amount of the order, including all shipping expenses, tax and the price of items. + * + * @return $this + */ + public function setAmount($amount) + { + $this->container['amount'] = $amount; + + return $this; + } + + /** + * Gets products + * + * @return \Brevo\Client\Model\OrderProducts[] + */ + public function getProducts() + { + return $this->container['products']; + } + + /** + * Sets products + * + * @param \Brevo\Client\Model\OrderProducts[] $products products + * + * @return $this + */ + public function setProducts($products) + { + $this->container['products'] = $products; + + return $this; + } + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email Email of the contact, Mandatory if \"phone\" field is not passed in \"billing\" parameter. + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets billing + * + * @return \Brevo\Client\Model\OrderBilling + */ + public function getBilling() + { + return $this->container['billing']; + } + + /** + * Sets billing + * + * @param \Brevo\Client\Model\OrderBilling $billing billing + * + * @return $this + */ + public function setBilling($billing) + { + $this->container['billing'] = $billing; + + return $this; + } + + /** + * Gets coupons + * + * @return string[] + */ + public function getCoupons() + { + return $this->container['coupons']; + } + + /** + * Sets coupons + * + * @param string[] $coupons Coupons applied to the order. Stored case insensitive. + * + * @return $this + */ + public function setCoupons($coupons) + { + $this->container['coupons'] = $coupons; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/OrderBatch.php b/vendor/getbrevo/brevo-php/lib/Model/OrderBatch.php new file mode 100644 index 0000000..98a9fed --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/OrderBatch.php @@ -0,0 +1,368 @@ + '\Brevo\Client\Model\Order[]', + 'notifyUrl' => 'string', + 'historical' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'orders' => null, + 'notifyUrl' => null, + 'historical' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'orders' => 'orders', + 'notifyUrl' => 'notifyUrl', + 'historical' => 'historical' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'orders' => 'setOrders', + 'notifyUrl' => 'setNotifyUrl', + 'historical' => 'setHistorical' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'orders' => 'getOrders', + 'notifyUrl' => 'getNotifyUrl', + 'historical' => 'getHistorical' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['orders'] = isset($data['orders']) ? $data['orders'] : null; + $this->container['notifyUrl'] = isset($data['notifyUrl']) ? $data['notifyUrl'] : null; + $this->container['historical'] = isset($data['historical']) ? $data['historical'] : true; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['orders'] === null) { + $invalidProperties[] = "'orders' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets orders + * + * @return \Brevo\Client\Model\Order[] + */ + public function getOrders() + { + return $this->container['orders']; + } + + /** + * Sets orders + * + * @param \Brevo\Client\Model\Order[] $orders array of order objects + * + * @return $this + */ + public function setOrders($orders) + { + $this->container['orders'] = $orders; + + return $this; + } + + /** + * Gets notifyUrl + * + * @return string + */ + public function getNotifyUrl() + { + return $this->container['notifyUrl']; + } + + /** + * Sets notifyUrl + * + * @param string $notifyUrl Notify Url provided by client to get the status of batch request + * + * @return $this + */ + public function setNotifyUrl($notifyUrl) + { + $this->container['notifyUrl'] = $notifyUrl; + + return $this; + } + + /** + * Gets historical + * + * @return bool + */ + public function getHistorical() + { + return $this->container['historical']; + } + + /** + * Sets historical + * + * @param bool $historical Defines wether you want your orders to be considered as live data or as historical data (import of past data, synchronising data). True: orders will not trigger any automation workflows. False: orders will trigger workflows as usual. + * + * @return $this + */ + public function setHistorical($historical) + { + $this->container['historical'] = $historical; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/OrderBilling.php b/vendor/getbrevo/brevo-php/lib/Model/OrderBilling.php new file mode 100644 index 0000000..ded706a --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/OrderBilling.php @@ -0,0 +1,486 @@ + 'string', + 'city' => 'string', + 'countryCode' => 'string', + 'phone' => 'string', + 'postCode' => 'string', + 'paymentMethod' => 'string', + 'region' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'address' => null, + 'city' => null, + 'countryCode' => null, + 'phone' => null, + 'postCode' => null, + 'paymentMethod' => null, + 'region' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'address' => 'address', + 'city' => 'city', + 'countryCode' => 'countryCode', + 'phone' => 'phone', + 'postCode' => 'postCode', + 'paymentMethod' => 'paymentMethod', + 'region' => 'region' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'address' => 'setAddress', + 'city' => 'setCity', + 'countryCode' => 'setCountryCode', + 'phone' => 'setPhone', + 'postCode' => 'setPostCode', + 'paymentMethod' => 'setPaymentMethod', + 'region' => 'setRegion' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'address' => 'getAddress', + 'city' => 'getCity', + 'countryCode' => 'getCountryCode', + 'phone' => 'getPhone', + 'postCode' => 'getPostCode', + 'paymentMethod' => 'getPaymentMethod', + 'region' => 'getRegion' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['address'] = isset($data['address']) ? $data['address'] : null; + $this->container['city'] = isset($data['city']) ? $data['city'] : null; + $this->container['countryCode'] = isset($data['countryCode']) ? $data['countryCode'] : null; + $this->container['phone'] = isset($data['phone']) ? $data['phone'] : null; + $this->container['postCode'] = isset($data['postCode']) ? $data['postCode'] : null; + $this->container['paymentMethod'] = isset($data['paymentMethod']) ? $data['paymentMethod'] : null; + $this->container['region'] = isset($data['region']) ? $data['region'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets address + * + * @return string + */ + public function getAddress() + { + return $this->container['address']; + } + + /** + * Sets address + * + * @param string $address Full billing address. + * + * @return $this + */ + public function setAddress($address) + { + $this->container['address'] = $address; + + return $this; + } + + /** + * Gets city + * + * @return string + */ + public function getCity() + { + return $this->container['city']; + } + + /** + * Sets city + * + * @param string $city Exact city of the address. + * + * @return $this + */ + public function setCity($city) + { + $this->container['city'] = $city; + + return $this; + } + + /** + * Gets countryCode + * + * @return string + */ + public function getCountryCode() + { + return $this->container['countryCode']; + } + + /** + * Sets countryCode + * + * @param string $countryCode Billing country 2-letter ISO code. + * + * @return $this + */ + public function setCountryCode($countryCode) + { + $this->container['countryCode'] = $countryCode; + + return $this; + } + + /** + * Gets phone + * + * @return string + */ + public function getPhone() + { + return $this->container['phone']; + } + + /** + * Sets phone + * + * @param string $phone Phone number to contact for further details about the order, Mandatory if \"email\" field is not passed. + * + * @return $this + */ + public function setPhone($phone) + { + $this->container['phone'] = $phone; + + return $this; + } + + /** + * Gets postCode + * + * @return string + */ + public function getPostCode() + { + return $this->container['postCode']; + } + + /** + * Sets postCode + * + * @param string $postCode Postcode for delivery and billing. + * + * @return $this + */ + public function setPostCode($postCode) + { + $this->container['postCode'] = $postCode; + + return $this; + } + + /** + * Gets paymentMethod + * + * @return string + */ + public function getPaymentMethod() + { + return $this->container['paymentMethod']; + } + + /** + * Sets paymentMethod + * + * @param string $paymentMethod How the visitor will pay for the item(s), e.g. paypal, check, etc. + * + * @return $this + */ + public function setPaymentMethod($paymentMethod) + { + $this->container['paymentMethod'] = $paymentMethod; + + return $this; + } + + /** + * Gets region + * + * @return string + */ + public function getRegion() + { + return $this->container['region']; + } + + /** + * Sets region + * + * @param string $region Exact region (state/province) for delivery and billing. + * + * @return $this + */ + public function setRegion($region) + { + $this->container['region'] = $region; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/OrderProducts.php b/vendor/getbrevo/brevo-php/lib/Model/OrderProducts.php new file mode 100644 index 0000000..1a921c2 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/OrderProducts.php @@ -0,0 +1,405 @@ + 'string', + 'quantity' => 'float', + 'variantId' => 'string', + 'price' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'productId' => null, + 'quantity' => null, + 'variantId' => null, + 'price' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'productId' => 'productId', + 'quantity' => 'quantity', + 'variantId' => 'variantId', + 'price' => 'price' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'productId' => 'setProductId', + 'quantity' => 'setQuantity', + 'variantId' => 'setVariantId', + 'price' => 'setPrice' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'productId' => 'getProductId', + 'quantity' => 'getQuantity', + 'variantId' => 'getVariantId', + 'price' => 'getPrice' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['productId'] = isset($data['productId']) ? $data['productId'] : null; + $this->container['quantity'] = isset($data['quantity']) ? $data['quantity'] : null; + $this->container['variantId'] = isset($data['variantId']) ? $data['variantId'] : null; + $this->container['price'] = isset($data['price']) ? $data['price'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['productId'] === null) { + $invalidProperties[] = "'productId' can't be null"; + } + if ($this->container['quantity'] === null) { + $invalidProperties[] = "'quantity' can't be null"; + } + if ($this->container['price'] === null) { + $invalidProperties[] = "'price' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets productId + * + * @return string + */ + public function getProductId() + { + return $this->container['productId']; + } + + /** + * Sets productId + * + * @param string $productId ID of the product. + * + * @return $this + */ + public function setProductId($productId) + { + $this->container['productId'] = $productId; + + return $this; + } + + /** + * Gets quantity + * + * @return float + */ + public function getQuantity() + { + return $this->container['quantity']; + } + + /** + * Sets quantity + * + * @param float $quantity How many pieces of the product the visitor has added to the cart. + * + * @return $this + */ + public function setQuantity($quantity) + { + $this->container['quantity'] = $quantity; + + return $this; + } + + /** + * Gets variantId + * + * @return string + */ + public function getVariantId() + { + return $this->container['variantId']; + } + + /** + * Sets variantId + * + * @param string $variantId Product ID of the red color shirts. + * + * @return $this + */ + public function setVariantId($variantId) + { + $this->container['variantId'] = $variantId; + + return $this; + } + + /** + * Gets price + * + * @return float + */ + public function getPrice() + { + return $this->container['price']; + } + + /** + * Sets price + * + * @param float $price The price of a unit of product + * + * @return $this + */ + public function setPrice($price) + { + $this->container['price'] = $price; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/Otp.php b/vendor/getbrevo/brevo-php/lib/Model/Otp.php new file mode 100644 index 0000000..89a28c0 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/Otp.php @@ -0,0 +1,305 @@ + 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return int + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param int $name 6 digit OTP received on email + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/Pipeline.php b/vendor/getbrevo/brevo-php/lib/Model/Pipeline.php new file mode 100644 index 0000000..02ab62c --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/Pipeline.php @@ -0,0 +1,366 @@ + 'string', + 'pipelineName' => 'string', + 'stages' => '\Brevo\Client\Model\PipelineStage[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'pipeline' => null, + 'pipelineName' => null, + 'stages' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'pipeline' => 'pipeline', + 'pipelineName' => 'pipeline_name', + 'stages' => 'stages' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'pipeline' => 'setPipeline', + 'pipelineName' => 'setPipelineName', + 'stages' => 'setStages' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'pipeline' => 'getPipeline', + 'pipelineName' => 'getPipelineName', + 'stages' => 'getStages' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['pipeline'] = isset($data['pipeline']) ? $data['pipeline'] : null; + $this->container['pipelineName'] = isset($data['pipelineName']) ? $data['pipelineName'] : null; + $this->container['stages'] = isset($data['stages']) ? $data['stages'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets pipeline + * + * @return string + */ + public function getPipeline() + { + return $this->container['pipeline']; + } + + /** + * Sets pipeline + * + * @param string $pipeline Pipeline id + * + * @return $this + */ + public function setPipeline($pipeline) + { + $this->container['pipeline'] = $pipeline; + + return $this; + } + + /** + * Gets pipelineName + * + * @return string + */ + public function getPipelineName() + { + return $this->container['pipelineName']; + } + + /** + * Sets pipelineName + * + * @param string $pipelineName Pipeline Name + * + * @return $this + */ + public function setPipelineName($pipelineName) + { + $this->container['pipelineName'] = $pipelineName; + + return $this; + } + + /** + * Gets stages + * + * @return \Brevo\Client\Model\PipelineStage[] + */ + public function getStages() + { + return $this->container['stages']; + } + + /** + * Sets stages + * + * @param \Brevo\Client\Model\PipelineStage[] $stages List of stages + * + * @return $this + */ + public function setStages($stages) + { + $this->container['stages'] = $stages; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/PipelineStage.php b/vendor/getbrevo/brevo-php/lib/Model/PipelineStage.php new file mode 100644 index 0000000..cf6d2f8 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/PipelineStage.php @@ -0,0 +1,336 @@ + 'string', + 'name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => null, + 'name' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Stage id + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Stage name + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/Pipelines.php b/vendor/getbrevo/brevo-php/lib/Model/Pipelines.php new file mode 100644 index 0000000..c07200d --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/Pipelines.php @@ -0,0 +1,281 @@ +listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/PostContactInfo.php b/vendor/getbrevo/brevo-php/lib/Model/PostContactInfo.php new file mode 100644 index 0000000..46d17d2 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/PostContactInfo.php @@ -0,0 +1,308 @@ + '\Brevo\Client\Model\PostContactInfoContacts' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'contacts' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'contacts' => 'contacts' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'contacts' => 'setContacts' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'contacts' => 'getContacts' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['contacts'] = isset($data['contacts']) ? $data['contacts'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['contacts'] === null) { + $invalidProperties[] = "'contacts' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets contacts + * + * @return \Brevo\Client\Model\PostContactInfoContacts + */ + public function getContacts() + { + return $this->container['contacts']; + } + + /** + * Sets contacts + * + * @param \Brevo\Client\Model\PostContactInfoContacts $contacts contacts + * + * @return $this + */ + public function setContacts($contacts) + { + $this->container['contacts'] = $contacts; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/PostContactInfoContacts.php b/vendor/getbrevo/brevo-php/lib/Model/PostContactInfoContacts.php new file mode 100644 index 0000000..978c032 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/PostContactInfoContacts.php @@ -0,0 +1,395 @@ + 'string[]', + 'failure' => 'string[]', + 'total' => 'int', + 'processId' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'success' => 'email', + 'failure' => 'email', + 'total' => 'int64', + 'processId' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'success' => 'success', + 'failure' => 'failure', + 'total' => 'total', + 'processId' => 'processId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'success' => 'setSuccess', + 'failure' => 'setFailure', + 'total' => 'setTotal', + 'processId' => 'setProcessId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'success' => 'getSuccess', + 'failure' => 'getFailure', + 'total' => 'getTotal', + 'processId' => 'getProcessId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['success'] = isset($data['success']) ? $data['success'] : null; + $this->container['failure'] = isset($data['failure']) ? $data['failure'] : null; + $this->container['total'] = isset($data['total']) ? $data['total'] : null; + $this->container['processId'] = isset($data['processId']) ? $data['processId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets success + * + * @return string[] + */ + public function getSuccess() + { + return $this->container['success']; + } + + /** + * Sets success + * + * @param string[] $success success + * + * @return $this + */ + public function setSuccess($success) + { + $this->container['success'] = $success; + + return $this; + } + + /** + * Gets failure + * + * @return string[] + */ + public function getFailure() + { + return $this->container['failure']; + } + + /** + * Sets failure + * + * @param string[] $failure failure + * + * @return $this + */ + public function setFailure($failure) + { + $this->container['failure'] = $failure; + + return $this; + } + + /** + * Gets total + * + * @return int + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param int $total Displays the count of total number of contacts removed from list when user opts for \"all\" option. + * + * @return $this + */ + public function setTotal($total) + { + $this->container['total'] = $total; + + return $this; + } + + /** + * Gets processId + * + * @return int + */ + public function getProcessId() + { + return $this->container['processId']; + } + + /** + * Sets processId + * + * @param int $processId Id of the process created to remove contacts from list when user opts for \"all\" option. + * + * @return $this + */ + public function setProcessId($processId) + { + $this->container['processId'] = $processId; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/PostSendFailed.php b/vendor/getbrevo/brevo-php/lib/Model/PostSendFailed.php new file mode 100644 index 0000000..8c7567d --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/PostSendFailed.php @@ -0,0 +1,431 @@ + 'int', + 'message' => 'string', + 'unexistingEmails' => 'string[]', + 'withoutListEmails' => 'string[]', + 'blackListedEmails' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'code' => 'int64', + 'message' => null, + 'unexistingEmails' => 'email', + 'withoutListEmails' => 'email', + 'blackListedEmails' => 'email' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'code' => 'code', + 'message' => 'message', + 'unexistingEmails' => 'unexistingEmails', + 'withoutListEmails' => 'withoutListEmails', + 'blackListedEmails' => 'blackListedEmails' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'code' => 'setCode', + 'message' => 'setMessage', + 'unexistingEmails' => 'setUnexistingEmails', + 'withoutListEmails' => 'setWithoutListEmails', + 'blackListedEmails' => 'setBlackListedEmails' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'code' => 'getCode', + 'message' => 'getMessage', + 'unexistingEmails' => 'getUnexistingEmails', + 'withoutListEmails' => 'getWithoutListEmails', + 'blackListedEmails' => 'getBlackListedEmails' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + $this->container['unexistingEmails'] = isset($data['unexistingEmails']) ? $data['unexistingEmails'] : null; + $this->container['withoutListEmails'] = isset($data['withoutListEmails']) ? $data['withoutListEmails'] : null; + $this->container['blackListedEmails'] = isset($data['blackListedEmails']) ? $data['blackListedEmails'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['code'] === null) { + $invalidProperties[] = "'code' can't be null"; + } + if ($this->container['message'] === null) { + $invalidProperties[] = "'message' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets code + * + * @return int + */ + public function getCode() + { + return $this->container['code']; + } + + /** + * Sets code + * + * @param int $code Response code + * + * @return $this + */ + public function setCode($code) + { + $this->container['code'] = $code; + + return $this; + } + + /** + * Gets message + * + * @return string + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string $message Response message + * + * @return $this + */ + public function setMessage($message) + { + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets unexistingEmails + * + * @return string[] + */ + public function getUnexistingEmails() + { + return $this->container['unexistingEmails']; + } + + /** + * Sets unexistingEmails + * + * @param string[] $unexistingEmails unexistingEmails + * + * @return $this + */ + public function setUnexistingEmails($unexistingEmails) + { + $this->container['unexistingEmails'] = $unexistingEmails; + + return $this; + } + + /** + * Gets withoutListEmails + * + * @return string[] + */ + public function getWithoutListEmails() + { + return $this->container['withoutListEmails']; + } + + /** + * Sets withoutListEmails + * + * @param string[] $withoutListEmails withoutListEmails + * + * @return $this + */ + public function setWithoutListEmails($withoutListEmails) + { + $this->container['withoutListEmails'] = $withoutListEmails; + + return $this; + } + + /** + * Gets blackListedEmails + * + * @return string[] + */ + public function getBlackListedEmails() + { + return $this->container['blackListedEmails']; + } + + /** + * Sets blackListedEmails + * + * @param string[] $blackListedEmails blackListedEmails + * + * @return $this + */ + public function setBlackListedEmails($blackListedEmails) + { + $this->container['blackListedEmails'] = $blackListedEmails; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/PostSendSmsTestFailed.php b/vendor/getbrevo/brevo-php/lib/Model/PostSendSmsTestFailed.php new file mode 100644 index 0000000..a74ea9d --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/PostSendSmsTestFailed.php @@ -0,0 +1,401 @@ + 'int', + 'message' => 'string', + 'unexistingSms' => 'string[]', + 'withoutListSms' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'code' => 'int64', + 'message' => null, + 'unexistingSms' => 'email', + 'withoutListSms' => 'email' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'code' => 'code', + 'message' => 'message', + 'unexistingSms' => 'unexistingSms', + 'withoutListSms' => 'withoutListSms' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'code' => 'setCode', + 'message' => 'setMessage', + 'unexistingSms' => 'setUnexistingSms', + 'withoutListSms' => 'setWithoutListSms' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'code' => 'getCode', + 'message' => 'getMessage', + 'unexistingSms' => 'getUnexistingSms', + 'withoutListSms' => 'getWithoutListSms' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + $this->container['unexistingSms'] = isset($data['unexistingSms']) ? $data['unexistingSms'] : null; + $this->container['withoutListSms'] = isset($data['withoutListSms']) ? $data['withoutListSms'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['code'] === null) { + $invalidProperties[] = "'code' can't be null"; + } + if ($this->container['message'] === null) { + $invalidProperties[] = "'message' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets code + * + * @return int + */ + public function getCode() + { + return $this->container['code']; + } + + /** + * Sets code + * + * @param int $code Response code + * + * @return $this + */ + public function setCode($code) + { + $this->container['code'] = $code; + + return $this; + } + + /** + * Gets message + * + * @return string + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string $message Response message + * + * @return $this + */ + public function setMessage($message) + { + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets unexistingSms + * + * @return string[] + */ + public function getUnexistingSms() + { + return $this->container['unexistingSms']; + } + + /** + * Sets unexistingSms + * + * @param string[] $unexistingSms unexistingSms + * + * @return $this + */ + public function setUnexistingSms($unexistingSms) + { + $this->container['unexistingSms'] = $unexistingSms; + + return $this; + } + + /** + * Gets withoutListSms + * + * @return string[] + */ + public function getWithoutListSms() + { + return $this->container['withoutListSms']; + } + + /** + * Sets withoutListSms + * + * @param string[] $withoutListSms withoutListSms + * + * @return $this + */ + public function setWithoutListSms($withoutListSms) + { + $this->container['withoutListSms'] = $withoutListSms; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/PutRevokeUserPermission.php b/vendor/getbrevo/brevo-php/lib/Model/PutRevokeUserPermission.php new file mode 100644 index 0000000..b527afd --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/PutRevokeUserPermission.php @@ -0,0 +1,309 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'email' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'email' => 'email' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'email' => 'setEmail' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'email' => 'getEmail' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email Email address of the user. + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/Putresendcancelinvitation.php b/vendor/getbrevo/brevo-php/lib/Model/Putresendcancelinvitation.php new file mode 100644 index 0000000..ba77e8b --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/Putresendcancelinvitation.php @@ -0,0 +1,309 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'email' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'email' => 'email' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'email' => 'setEmail' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'email' => 'getEmail' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email Email address of the user. + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/RemainingCreditModel.php b/vendor/getbrevo/brevo-php/lib/Model/RemainingCreditModel.php new file mode 100644 index 0000000..2502d8c --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/RemainingCreditModel.php @@ -0,0 +1,341 @@ + '\Brevo\Client\Model\RemainingCreditModelChild', + 'reseller' => '\Brevo\Client\Model\RemainingCreditModelReseller' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'child' => null, + 'reseller' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'child' => 'child', + 'reseller' => 'reseller' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'child' => 'setChild', + 'reseller' => 'setReseller' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'child' => 'getChild', + 'reseller' => 'getReseller' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['child'] = isset($data['child']) ? $data['child'] : null; + $this->container['reseller'] = isset($data['reseller']) ? $data['reseller'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['child'] === null) { + $invalidProperties[] = "'child' can't be null"; + } + if ($this->container['reseller'] === null) { + $invalidProperties[] = "'reseller' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets child + * + * @return \Brevo\Client\Model\RemainingCreditModelChild + */ + public function getChild() + { + return $this->container['child']; + } + + /** + * Sets child + * + * @param \Brevo\Client\Model\RemainingCreditModelChild $child child + * + * @return $this + */ + public function setChild($child) + { + $this->container['child'] = $child; + + return $this; + } + + /** + * Gets reseller + * + * @return \Brevo\Client\Model\RemainingCreditModelReseller + */ + public function getReseller() + { + return $this->container['reseller']; + } + + /** + * Sets reseller + * + * @param \Brevo\Client\Model\RemainingCreditModelReseller $reseller reseller + * + * @return $this + */ + public function setReseller($reseller) + { + $this->container['reseller'] = $reseller; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/RemainingCreditModelChild.php b/vendor/getbrevo/brevo-php/lib/Model/RemainingCreditModelChild.php new file mode 100644 index 0000000..98b9769 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/RemainingCreditModelChild.php @@ -0,0 +1,342 @@ + 'double', + 'email' => 'double' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'sms' => 'double', + 'email' => 'double' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'sms' => 'sms', + 'email' => 'email' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'sms' => 'setSms', + 'email' => 'setEmail' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'sms' => 'getSms', + 'email' => 'getEmail' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['sms'] = isset($data['sms']) ? $data['sms'] : null; + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['sms'] === null) { + $invalidProperties[] = "'sms' can't be null"; + } + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets sms + * + * @return double + */ + public function getSms() + { + return $this->container['sms']; + } + + /** + * Sets sms + * + * @param double $sms SMS Credits remaining for child account + * + * @return $this + */ + public function setSms($sms) + { + $this->container['sms'] = $sms; + + return $this; + } + + /** + * Gets email + * + * @return double + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param double $email Email Credits remaining for child account + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/RemainingCreditModelReseller.php b/vendor/getbrevo/brevo-php/lib/Model/RemainingCreditModelReseller.php new file mode 100644 index 0000000..288b708 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/RemainingCreditModelReseller.php @@ -0,0 +1,341 @@ + 'double', + 'email' => 'double' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'sms' => 'double', + 'email' => 'double' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'sms' => 'sms', + 'email' => 'email' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'sms' => 'setSms', + 'email' => 'setEmail' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'sms' => 'getSms', + 'email' => 'getEmail' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['sms'] = isset($data['sms']) ? $data['sms'] : null; + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['sms'] === null) { + $invalidProperties[] = "'sms' can't be null"; + } + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets sms + * + * @return double + */ + public function getSms() + { + return $this->container['sms']; + } + + /** + * Sets sms + * + * @param double $sms SMS Credits remaining for reseller account + * + * @return $this + */ + public function setSms($sms) + { + $this->container['sms'] = $sms; + + return $this; + } + + /** + * Gets email + * + * @return double + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param double $email Email Credits remaining for reseller account + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/RemoveContactFromList.php b/vendor/getbrevo/brevo-php/lib/Model/RemoveContactFromList.php new file mode 100644 index 0000000..b34889c --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/RemoveContactFromList.php @@ -0,0 +1,365 @@ + 'string[]', + 'ids' => 'int[]', + 'all' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'emails' => null, + 'ids' => 'int64', + 'all' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'emails' => 'emails', + 'ids' => 'ids', + 'all' => 'all' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'emails' => 'setEmails', + 'ids' => 'setIds', + 'all' => 'setAll' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'emails' => 'getEmails', + 'ids' => 'getIds', + 'all' => 'getAll' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['emails'] = isset($data['emails']) ? $data['emails'] : null; + $this->container['ids'] = isset($data['ids']) ? $data['ids'] : null; + $this->container['all'] = isset($data['all']) ? $data['all'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets emails + * + * @return string[] + */ + public function getEmails() + { + return $this->container['emails']; + } + + /** + * Sets emails + * + * @param string[] $emails Required if 'all' is false. Emails to remove from a list. You can pass a maximum of 150 emails for removal in one request. + * + * @return $this + */ + public function setEmails($emails) + { + $this->container['emails'] = $emails; + + return $this; + } + + /** + * Gets ids + * + * @return int[] + */ + public function getIds() + { + return $this->container['ids']; + } + + /** + * Sets ids + * + * @param int[] $ids Mandatory if Emails are not passed, ignored otherwise. Emails to add to a list. You can pass a maximum of 150 emails for addition in one request. If you need to add the emails in bulk, please prefer /contacts/import api. + * + * @return $this + */ + public function setIds($ids) + { + $this->container['ids'] = $ids; + + return $this; + } + + /** + * Gets all + * + * @return bool + */ + public function getAll() + { + return $this->container['all']; + } + + /** + * Sets all + * + * @param bool $all Required if none of 'emails' or 'ids' are passed. Remove all existing contacts from a list. A process will be created in this scenario. You can fetch the process details to know about the progress + * + * @return $this + */ + public function setAll($all) + { + $this->container['all'] = $all; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/RemoveCredits.php b/vendor/getbrevo/brevo-php/lib/Model/RemoveCredits.php new file mode 100644 index 0000000..a214ae6 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/RemoveCredits.php @@ -0,0 +1,335 @@ + 'int', + 'email' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'sms' => 'int64', + 'email' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'sms' => 'sms', + 'email' => 'email' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'sms' => 'setSms', + 'email' => 'setEmail' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'sms' => 'getSms', + 'email' => 'getEmail' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['sms'] = isset($data['sms']) ? $data['sms'] : null; + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets sms + * + * @return int + */ + public function getSms() + { + return $this->container['sms']; + } + + /** + * Sets sms + * + * @param int $sms Required if email credits are empty. SMS credits to be removed from the child account + * + * @return $this + */ + public function setSms($sms) + { + $this->container['sms'] = $sms; + + return $this; + } + + /** + * Gets email + * + * @return int + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param int $email Required if sms credits are empty. Email credits to be removed from the child account + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/RequestContactExport.php b/vendor/getbrevo/brevo-php/lib/Model/RequestContactExport.php new file mode 100644 index 0000000..37de0a5 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/RequestContactExport.php @@ -0,0 +1,368 @@ + 'string[]', + 'customContactFilter' => '\Brevo\Client\Model\RequestContactExportCustomContactFilter', + 'notifyUrl' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'exportAttributes' => null, + 'customContactFilter' => null, + 'notifyUrl' => 'url' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'exportAttributes' => 'exportAttributes', + 'customContactFilter' => 'customContactFilter', + 'notifyUrl' => 'notifyUrl' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'exportAttributes' => 'setExportAttributes', + 'customContactFilter' => 'setCustomContactFilter', + 'notifyUrl' => 'setNotifyUrl' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'exportAttributes' => 'getExportAttributes', + 'customContactFilter' => 'getCustomContactFilter', + 'notifyUrl' => 'getNotifyUrl' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['exportAttributes'] = isset($data['exportAttributes']) ? $data['exportAttributes'] : null; + $this->container['customContactFilter'] = isset($data['customContactFilter']) ? $data['customContactFilter'] : null; + $this->container['notifyUrl'] = isset($data['notifyUrl']) ? $data['notifyUrl'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['customContactFilter'] === null) { + $invalidProperties[] = "'customContactFilter' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets exportAttributes + * + * @return string[] + */ + public function getExportAttributes() + { + return $this->container['exportAttributes']; + } + + /** + * Sets exportAttributes + * + * @param string[] $exportAttributes List of all the attributes that you want to export. These attributes must be present in your contact database. For example, ['fname', 'lname', 'email']. + * + * @return $this + */ + public function setExportAttributes($exportAttributes) + { + $this->container['exportAttributes'] = $exportAttributes; + + return $this; + } + + /** + * Gets customContactFilter + * + * @return \Brevo\Client\Model\RequestContactExportCustomContactFilter + */ + public function getCustomContactFilter() + { + return $this->container['customContactFilter']; + } + + /** + * Sets customContactFilter + * + * @param \Brevo\Client\Model\RequestContactExportCustomContactFilter $customContactFilter customContactFilter + * + * @return $this + */ + public function setCustomContactFilter($customContactFilter) + { + $this->container['customContactFilter'] = $customContactFilter; + + return $this; + } + + /** + * Gets notifyUrl + * + * @return string + */ + public function getNotifyUrl() + { + return $this->container['notifyUrl']; + } + + /** + * Sets notifyUrl + * + * @param string $notifyUrl Webhook that will be called once the export process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479 + * + * @return $this + */ + public function setNotifyUrl($notifyUrl) + { + $this->container['notifyUrl'] = $notifyUrl; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/RequestContactExportCustomContactFilter.php b/vendor/getbrevo/brevo-php/lib/Model/RequestContactExportCustomContactFilter.php new file mode 100644 index 0000000..baf63ba --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/RequestContactExportCustomContactFilter.php @@ -0,0 +1,568 @@ + 'string', + 'actionForEmailCampaigns' => 'string', + 'actionForSmsCampaigns' => 'string', + 'listId' => 'int', + 'emailCampaignId' => 'int', + 'smsCampaignId' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'actionForContacts' => null, + 'actionForEmailCampaigns' => null, + 'actionForSmsCampaigns' => null, + 'listId' => 'int64', + 'emailCampaignId' => 'int64', + 'smsCampaignId' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'actionForContacts' => 'actionForContacts', + 'actionForEmailCampaigns' => 'actionForEmailCampaigns', + 'actionForSmsCampaigns' => 'actionForSmsCampaigns', + 'listId' => 'listId', + 'emailCampaignId' => 'emailCampaignId', + 'smsCampaignId' => 'smsCampaignId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'actionForContacts' => 'setActionForContacts', + 'actionForEmailCampaigns' => 'setActionForEmailCampaigns', + 'actionForSmsCampaigns' => 'setActionForSmsCampaigns', + 'listId' => 'setListId', + 'emailCampaignId' => 'setEmailCampaignId', + 'smsCampaignId' => 'setSmsCampaignId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'actionForContacts' => 'getActionForContacts', + 'actionForEmailCampaigns' => 'getActionForEmailCampaigns', + 'actionForSmsCampaigns' => 'getActionForSmsCampaigns', + 'listId' => 'getListId', + 'emailCampaignId' => 'getEmailCampaignId', + 'smsCampaignId' => 'getSmsCampaignId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const ACTION_FOR_CONTACTS_ALL_CONTACTS = 'allContacts'; + const ACTION_FOR_CONTACTS_SUBSCRIBED = 'subscribed'; + const ACTION_FOR_CONTACTS_UNSUBSCRIBED = 'unsubscribed'; + const ACTION_FOR_CONTACTS_UNSUBSCRIBED_PER_LIST = 'unsubscribedPerList'; + const ACTION_FOR_EMAIL_CAMPAIGNS_OPENERS = 'openers'; + const ACTION_FOR_EMAIL_CAMPAIGNS_NON_OPENERS = 'nonOpeners'; + const ACTION_FOR_EMAIL_CAMPAIGNS_CLICKERS = 'clickers'; + const ACTION_FOR_EMAIL_CAMPAIGNS_NON_CLICKERS = 'nonClickers'; + const ACTION_FOR_EMAIL_CAMPAIGNS_UNSUBSCRIBED = 'unsubscribed'; + const ACTION_FOR_EMAIL_CAMPAIGNS_HARD_BOUNCES = 'hardBounces'; + const ACTION_FOR_EMAIL_CAMPAIGNS_SOFT_BOUNCES = 'softBounces'; + const ACTION_FOR_SMS_CAMPAIGNS_HARD_BOUNCES = 'hardBounces'; + const ACTION_FOR_SMS_CAMPAIGNS_SOFT_BOUNCES = 'softBounces'; + const ACTION_FOR_SMS_CAMPAIGNS_UNSUBSCRIBED = 'unsubscribed'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getActionForContactsAllowableValues() + { + return [ + self::ACTION_FOR_CONTACTS_ALL_CONTACTS, + self::ACTION_FOR_CONTACTS_SUBSCRIBED, + self::ACTION_FOR_CONTACTS_UNSUBSCRIBED, + self::ACTION_FOR_CONTACTS_UNSUBSCRIBED_PER_LIST, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getActionForEmailCampaignsAllowableValues() + { + return [ + self::ACTION_FOR_EMAIL_CAMPAIGNS_OPENERS, + self::ACTION_FOR_EMAIL_CAMPAIGNS_NON_OPENERS, + self::ACTION_FOR_EMAIL_CAMPAIGNS_CLICKERS, + self::ACTION_FOR_EMAIL_CAMPAIGNS_NON_CLICKERS, + self::ACTION_FOR_EMAIL_CAMPAIGNS_UNSUBSCRIBED, + self::ACTION_FOR_EMAIL_CAMPAIGNS_HARD_BOUNCES, + self::ACTION_FOR_EMAIL_CAMPAIGNS_SOFT_BOUNCES, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getActionForSmsCampaignsAllowableValues() + { + return [ + self::ACTION_FOR_SMS_CAMPAIGNS_HARD_BOUNCES, + self::ACTION_FOR_SMS_CAMPAIGNS_SOFT_BOUNCES, + self::ACTION_FOR_SMS_CAMPAIGNS_UNSUBSCRIBED, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['actionForContacts'] = isset($data['actionForContacts']) ? $data['actionForContacts'] : null; + $this->container['actionForEmailCampaigns'] = isset($data['actionForEmailCampaigns']) ? $data['actionForEmailCampaigns'] : null; + $this->container['actionForSmsCampaigns'] = isset($data['actionForSmsCampaigns']) ? $data['actionForSmsCampaigns'] : null; + $this->container['listId'] = isset($data['listId']) ? $data['listId'] : null; + $this->container['emailCampaignId'] = isset($data['emailCampaignId']) ? $data['emailCampaignId'] : null; + $this->container['smsCampaignId'] = isset($data['smsCampaignId']) ? $data['smsCampaignId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getActionForContactsAllowableValues(); + if (!is_null($this->container['actionForContacts']) && !in_array($this->container['actionForContacts'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'actionForContacts', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getActionForEmailCampaignsAllowableValues(); + if (!is_null($this->container['actionForEmailCampaigns']) && !in_array($this->container['actionForEmailCampaigns'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'actionForEmailCampaigns', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getActionForSmsCampaignsAllowableValues(); + if (!is_null($this->container['actionForSmsCampaigns']) && !in_array($this->container['actionForSmsCampaigns'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'actionForSmsCampaigns', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets actionForContacts + * + * @return string + */ + public function getActionForContacts() + { + return $this->container['actionForContacts']; + } + + /** + * Sets actionForContacts + * + * @param string $actionForContacts Mandatory if neither actionForEmailCampaigns nor actionForSmsCampaigns is passed. This will export the contacts on the basis of provided action applied on contacts as per the list id. * allContacts - Fetch the list of all contacts for a particular list. * subscribed & unsubscribed - Fetch the list of subscribed / unsubscribed (blacklisted via any means) contacts for a particular list. * unsubscribedPerList - Fetch the list of contacts that are unsubscribed from a particular list only. + * + * @return $this + */ + public function setActionForContacts($actionForContacts) + { + $allowedValues = $this->getActionForContactsAllowableValues(); + if (!is_null($actionForContacts) && !in_array($actionForContacts, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'actionForContacts', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['actionForContacts'] = $actionForContacts; + + return $this; + } + + /** + * Gets actionForEmailCampaigns + * + * @return string + */ + public function getActionForEmailCampaigns() + { + return $this->container['actionForEmailCampaigns']; + } + + /** + * Sets actionForEmailCampaigns + * + * @param string $actionForEmailCampaigns Mandatory if neither actionForContacts nor actionForSmsCampaigns is passed. This will export the contacts on the basis of provided action applied on email campaigns. * openers & nonOpeners - emailCampaignId is mandatory. Fetch the list of readers / non-readers for a particular email campaign. * clickers & nonClickers - emailCampaignId is mandatory. Fetch the list of clickers / non-clickers for a particular email campaign. * unsubscribed - emailCampaignId is mandatory. Fetch the list of all unsubscribed (blacklisted via any means) contacts for a particular email campaign. * hardBounces & softBounces - emailCampaignId is optional. Fetch the list of hard bounces / soft bounces for a particular / all email campaign(s). + * + * @return $this + */ + public function setActionForEmailCampaigns($actionForEmailCampaigns) + { + $allowedValues = $this->getActionForEmailCampaignsAllowableValues(); + if (!is_null($actionForEmailCampaigns) && !in_array($actionForEmailCampaigns, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'actionForEmailCampaigns', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['actionForEmailCampaigns'] = $actionForEmailCampaigns; + + return $this; + } + + /** + * Gets actionForSmsCampaigns + * + * @return string + */ + public function getActionForSmsCampaigns() + { + return $this->container['actionForSmsCampaigns']; + } + + /** + * Sets actionForSmsCampaigns + * + * @param string $actionForSmsCampaigns Mandatory if neither actionForContacts nor actionForEmailCampaigns is passed. This will export the contacts on the basis of provided action applied on sms campaigns. * unsubscribed - Fetch the list of all unsubscribed (blacklisted via any means) contacts for all / particular sms campaigns. * hardBounces & softBounces - Fetch the list of hard bounces / soft bounces for all / particular sms campaigns. + * + * @return $this + */ + public function setActionForSmsCampaigns($actionForSmsCampaigns) + { + $allowedValues = $this->getActionForSmsCampaignsAllowableValues(); + if (!is_null($actionForSmsCampaigns) && !in_array($actionForSmsCampaigns, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'actionForSmsCampaigns', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['actionForSmsCampaigns'] = $actionForSmsCampaigns; + + return $this; + } + + /** + * Gets listId + * + * @return int + */ + public function getListId() + { + return $this->container['listId']; + } + + /** + * Sets listId + * + * @param int $listId Mandatory if actionForContacts is passed, ignored otherwise. Id of the list for which the corresponding action shall be applied in the filter. + * + * @return $this + */ + public function setListId($listId) + { + $this->container['listId'] = $listId; + + return $this; + } + + /** + * Gets emailCampaignId + * + * @return int + */ + public function getEmailCampaignId() + { + return $this->container['emailCampaignId']; + } + + /** + * Sets emailCampaignId + * + * @param int $emailCampaignId Considered only if actionForEmailCampaigns is passed, ignored otherwise. Mandatory if action is one of the following - openers, nonOpeners, clickers, nonClickers, unsubscribed. The id of the email campaign for which the corresponding action shall be applied in the filter. + * + * @return $this + */ + public function setEmailCampaignId($emailCampaignId) + { + $this->container['emailCampaignId'] = $emailCampaignId; + + return $this; + } + + /** + * Gets smsCampaignId + * + * @return int + */ + public function getSmsCampaignId() + { + return $this->container['smsCampaignId']; + } + + /** + * Sets smsCampaignId + * + * @param int $smsCampaignId Considered only if actionForSmsCampaigns is passed, ignored otherwise. The id of sms campaign for which the corresponding action shall be applied in the filter. + * + * @return $this + */ + public function setSmsCampaignId($smsCampaignId) + { + $this->container['smsCampaignId'] = $smsCampaignId; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/RequestContactImport.php b/vendor/getbrevo/brevo-php/lib/Model/RequestContactImport.php new file mode 100644 index 0000000..5e89021 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/RequestContactImport.php @@ -0,0 +1,605 @@ + 'string', + 'fileBody' => 'string', + 'jsonBody' => '\Brevo\Client\Model\RequestContactImportJsonBody[]', + 'listIds' => 'int[]', + 'notifyUrl' => 'string', + 'newList' => '\Brevo\Client\Model\RequestContactImportNewList', + 'emailBlacklist' => 'bool', + 'disableNotification' => 'bool', + 'smsBlacklist' => 'bool', + 'updateExistingContacts' => 'bool', + 'emptyContactsAttributes' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'fileUrl' => 'url', + 'fileBody' => null, + 'jsonBody' => null, + 'listIds' => 'int64', + 'notifyUrl' => 'url', + 'newList' => null, + 'emailBlacklist' => null, + 'disableNotification' => null, + 'smsBlacklist' => null, + 'updateExistingContacts' => null, + 'emptyContactsAttributes' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'fileUrl' => 'fileUrl', + 'fileBody' => 'fileBody', + 'jsonBody' => 'jsonBody', + 'listIds' => 'listIds', + 'notifyUrl' => 'notifyUrl', + 'newList' => 'newList', + 'emailBlacklist' => 'emailBlacklist', + 'disableNotification' => 'disableNotification', + 'smsBlacklist' => 'smsBlacklist', + 'updateExistingContacts' => 'updateExistingContacts', + 'emptyContactsAttributes' => 'emptyContactsAttributes' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'fileUrl' => 'setFileUrl', + 'fileBody' => 'setFileBody', + 'jsonBody' => 'setJsonBody', + 'listIds' => 'setListIds', + 'notifyUrl' => 'setNotifyUrl', + 'newList' => 'setNewList', + 'emailBlacklist' => 'setEmailBlacklist', + 'disableNotification' => 'setDisableNotification', + 'smsBlacklist' => 'setSmsBlacklist', + 'updateExistingContacts' => 'setUpdateExistingContacts', + 'emptyContactsAttributes' => 'setEmptyContactsAttributes' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'fileUrl' => 'getFileUrl', + 'fileBody' => 'getFileBody', + 'jsonBody' => 'getJsonBody', + 'listIds' => 'getListIds', + 'notifyUrl' => 'getNotifyUrl', + 'newList' => 'getNewList', + 'emailBlacklist' => 'getEmailBlacklist', + 'disableNotification' => 'getDisableNotification', + 'smsBlacklist' => 'getSmsBlacklist', + 'updateExistingContacts' => 'getUpdateExistingContacts', + 'emptyContactsAttributes' => 'getEmptyContactsAttributes' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['fileUrl'] = isset($data['fileUrl']) ? $data['fileUrl'] : null; + $this->container['fileBody'] = isset($data['fileBody']) ? $data['fileBody'] : null; + $this->container['jsonBody'] = isset($data['jsonBody']) ? $data['jsonBody'] : null; + $this->container['listIds'] = isset($data['listIds']) ? $data['listIds'] : null; + $this->container['notifyUrl'] = isset($data['notifyUrl']) ? $data['notifyUrl'] : null; + $this->container['newList'] = isset($data['newList']) ? $data['newList'] : null; + $this->container['emailBlacklist'] = isset($data['emailBlacklist']) ? $data['emailBlacklist'] : false; + $this->container['disableNotification'] = isset($data['disableNotification']) ? $data['disableNotification'] : false; + $this->container['smsBlacklist'] = isset($data['smsBlacklist']) ? $data['smsBlacklist'] : false; + $this->container['updateExistingContacts'] = isset($data['updateExistingContacts']) ? $data['updateExistingContacts'] : true; + $this->container['emptyContactsAttributes'] = isset($data['emptyContactsAttributes']) ? $data['emptyContactsAttributes'] : false; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets fileUrl + * + * @return string + */ + public function getFileUrl() + { + return $this->container['fileUrl']; + } + + /** + * Sets fileUrl + * + * @param string $fileUrl Mandatory if fileBody or jsonBody is not defined. URL of the file to be imported (no local file). Possible file formats: .txt, .csv, .json + * + * @return $this + */ + public function setFileUrl($fileUrl) + { + $this->container['fileUrl'] = $fileUrl; + + return $this; + } + + /** + * Gets fileBody + * + * @return string + */ + public function getFileBody() + { + return $this->container['fileBody']; + } + + /** + * Sets fileBody + * + * @param string $fileBody Mandatory if fileUrl and jsonBody is not defined. CSV content to be imported. Use semicolon to separate multiple attributes. Maximum allowed file body size is 10MB . However we recommend a safe limit of around 8 MB to avoid the issues caused due to increase of file body size while parsing. Please use fileUrl instead to import bigger files. + * + * @return $this + */ + public function setFileBody($fileBody) + { + $this->container['fileBody'] = $fileBody; + + return $this; + } + + /** + * Gets jsonBody + * + * @return \Brevo\Client\Model\RequestContactImportJsonBody[] + */ + public function getJsonBody() + { + return $this->container['jsonBody']; + } + + /** + * Sets jsonBody + * + * @param \Brevo\Client\Model\RequestContactImportJsonBody[] $jsonBody **Mandatory if fileUrl and fileBody is not defined.** JSON content to be imported. **Maximum allowed json body size is 10MB** . However we recommend a safe limit of around 8 MB to avoid the issues caused due to increase of json body size while parsing. Please use fileUrl instead to import bigger files. + * + * @return $this + */ + public function setJsonBody($jsonBody) + { + $this->container['jsonBody'] = $jsonBody; + + return $this; + } + + /** + * Gets listIds + * + * @return int[] + */ + public function getListIds() + { + return $this->container['listIds']; + } + + /** + * Sets listIds + * + * @param int[] $listIds Mandatory if newList is not defined. Ids of the lists in which the contacts shall be imported. For example, [2, 4, 7]. + * + * @return $this + */ + public function setListIds($listIds) + { + $this->container['listIds'] = $listIds; + + return $this; + } + + /** + * Gets notifyUrl + * + * @return string + */ + public function getNotifyUrl() + { + return $this->container['notifyUrl']; + } + + /** + * Sets notifyUrl + * + * @param string $notifyUrl URL that will be called once the import process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479 + * + * @return $this + */ + public function setNotifyUrl($notifyUrl) + { + $this->container['notifyUrl'] = $notifyUrl; + + return $this; + } + + /** + * Gets newList + * + * @return \Brevo\Client\Model\RequestContactImportNewList + */ + public function getNewList() + { + return $this->container['newList']; + } + + /** + * Sets newList + * + * @param \Brevo\Client\Model\RequestContactImportNewList $newList newList + * + * @return $this + */ + public function setNewList($newList) + { + $this->container['newList'] = $newList; + + return $this; + } + + /** + * Gets emailBlacklist + * + * @return bool + */ + public function getEmailBlacklist() + { + return $this->container['emailBlacklist']; + } + + /** + * Sets emailBlacklist + * + * @param bool $emailBlacklist To blacklist all the contacts for email + * + * @return $this + */ + public function setEmailBlacklist($emailBlacklist) + { + $this->container['emailBlacklist'] = $emailBlacklist; + + return $this; + } + + /** + * Gets disableNotification + * + * @return bool + */ + public function getDisableNotification() + { + return $this->container['disableNotification']; + } + + /** + * Sets disableNotification + * + * @param bool $disableNotification To disable email notification + * + * @return $this + */ + public function setDisableNotification($disableNotification) + { + $this->container['disableNotification'] = $disableNotification; + + return $this; + } + + /** + * Gets smsBlacklist + * + * @return bool + */ + public function getSmsBlacklist() + { + return $this->container['smsBlacklist']; + } + + /** + * Sets smsBlacklist + * + * @param bool $smsBlacklist To blacklist all the contacts for sms + * + * @return $this + */ + public function setSmsBlacklist($smsBlacklist) + { + $this->container['smsBlacklist'] = $smsBlacklist; + + return $this; + } + + /** + * Gets updateExistingContacts + * + * @return bool + */ + public function getUpdateExistingContacts() + { + return $this->container['updateExistingContacts']; + } + + /** + * Sets updateExistingContacts + * + * @param bool $updateExistingContacts To facilitate the choice to update the existing contacts + * + * @return $this + */ + public function setUpdateExistingContacts($updateExistingContacts) + { + $this->container['updateExistingContacts'] = $updateExistingContacts; + + return $this; + } + + /** + * Gets emptyContactsAttributes + * + * @return bool + */ + public function getEmptyContactsAttributes() + { + return $this->container['emptyContactsAttributes']; + } + + /** + * Sets emptyContactsAttributes + * + * @param bool $emptyContactsAttributes To facilitate the choice to erase any attribute of the existing contacts with empty value. emptyContactsAttributes = true means the empty fields in your import will erase any attribute that currently contain data in Brevo, & emptyContactsAttributes = false means the empty fields will not affect your existing data ( only available if `updateExistingContacts` set to true ) + * + * @return $this + */ + public function setEmptyContactsAttributes($emptyContactsAttributes) + { + $this->container['emptyContactsAttributes'] = $emptyContactsAttributes; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/RequestContactImportJsonBody.php b/vendor/getbrevo/brevo-php/lib/Model/RequestContactImportJsonBody.php new file mode 100644 index 0000000..dca681a --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/RequestContactImportJsonBody.php @@ -0,0 +1,335 @@ + 'string', + 'attributes' => 'object' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'email' => null, + 'attributes' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'email' => 'email', + 'attributes' => 'attributes' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'email' => 'setEmail', + 'attributes' => 'setAttributes' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'email' => 'getEmail', + 'attributes' => 'getAttributes' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email email + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets attributes + * + * @return object + */ + public function getAttributes() + { + return $this->container['attributes']; + } + + /** + * Sets attributes + * + * @param object $attributes List of attributes to be imported + * + * @return $this + */ + public function setAttributes($attributes) + { + $this->container['attributes'] = $attributes; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/RequestContactImportNewList.php b/vendor/getbrevo/brevo-php/lib/Model/RequestContactImportNewList.php new file mode 100644 index 0000000..9b1ffe7 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/RequestContactImportNewList.php @@ -0,0 +1,336 @@ + 'string', + 'folderId' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'listName' => null, + 'folderId' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'listName' => 'listName', + 'folderId' => 'folderId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'listName' => 'setListName', + 'folderId' => 'setFolderId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'listName' => 'getListName', + 'folderId' => 'getFolderId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['listName'] = isset($data['listName']) ? $data['listName'] : null; + $this->container['folderId'] = isset($data['folderId']) ? $data['folderId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets listName + * + * @return string + */ + public function getListName() + { + return $this->container['listName']; + } + + /** + * Sets listName + * + * @param string $listName List with listName will be created first and users will be imported in it (Mandatory if listIds is empty). + * + * @return $this + */ + public function setListName($listName) + { + $this->container['listName'] = $listName; + + return $this; + } + + /** + * Gets folderId + * + * @return int + */ + public function getFolderId() + { + return $this->container['folderId']; + } + + /** + * Sets folderId + * + * @param int $folderId Id of the folder where this new list shall be created (Mandatory if listName is not empty). + * + * @return $this + */ + public function setFolderId($folderId) + { + $this->container['folderId'] = $folderId; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/RequestSmsRecipientExport.php b/vendor/getbrevo/brevo-php/lib/Model/RequestSmsRecipientExport.php new file mode 100644 index 0000000..c9a592c --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/RequestSmsRecipientExport.php @@ -0,0 +1,378 @@ + 'string', + 'recipientsType' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'notifyURL' => 'url', + 'recipientsType' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'notifyURL' => 'notifyURL', + 'recipientsType' => 'recipientsType' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'notifyURL' => 'setNotifyURL', + 'recipientsType' => 'setRecipientsType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'notifyURL' => 'getNotifyURL', + 'recipientsType' => 'getRecipientsType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const RECIPIENTS_TYPE_ALL = 'all'; + const RECIPIENTS_TYPE_DELIVERED = 'delivered'; + const RECIPIENTS_TYPE_ANSWERED = 'answered'; + const RECIPIENTS_TYPE_SOFT_BOUNCES = 'softBounces'; + const RECIPIENTS_TYPE_HARD_BOUNCES = 'hardBounces'; + const RECIPIENTS_TYPE_UNSUBSCRIBED = 'unsubscribed'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getRecipientsTypeAllowableValues() + { + return [ + self::RECIPIENTS_TYPE_ALL, + self::RECIPIENTS_TYPE_DELIVERED, + self::RECIPIENTS_TYPE_ANSWERED, + self::RECIPIENTS_TYPE_SOFT_BOUNCES, + self::RECIPIENTS_TYPE_HARD_BOUNCES, + self::RECIPIENTS_TYPE_UNSUBSCRIBED, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['notifyURL'] = isset($data['notifyURL']) ? $data['notifyURL'] : null; + $this->container['recipientsType'] = isset($data['recipientsType']) ? $data['recipientsType'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['recipientsType'] === null) { + $invalidProperties[] = "'recipientsType' can't be null"; + } + $allowedValues = $this->getRecipientsTypeAllowableValues(); + if (!is_null($this->container['recipientsType']) && !in_array($this->container['recipientsType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'recipientsType', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets notifyURL + * + * @return string + */ + public function getNotifyURL() + { + return $this->container['notifyURL']; + } + + /** + * Sets notifyURL + * + * @param string $notifyURL URL that will be called once the export process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479 + * + * @return $this + */ + public function setNotifyURL($notifyURL) + { + $this->container['notifyURL'] = $notifyURL; + + return $this; + } + + /** + * Gets recipientsType + * + * @return string + */ + public function getRecipientsType() + { + return $this->container['recipientsType']; + } + + /** + * Sets recipientsType + * + * @param string $recipientsType Filter the recipients based on how they interacted with the campaign + * + * @return $this + */ + public function setRecipientsType($recipientsType) + { + $allowedValues = $this->getRecipientsTypeAllowableValues(); + if (!in_array($recipientsType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'recipientsType', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['recipientsType'] = $recipientsType; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/ScheduleSmtpEmail.php b/vendor/getbrevo/brevo-php/lib/Model/ScheduleSmtpEmail.php new file mode 100644 index 0000000..e0f077c --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/ScheduleSmtpEmail.php @@ -0,0 +1,365 @@ + 'string', + 'messageIds' => 'string[]', + 'batchId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'messageId' => null, + 'messageIds' => null, + 'batchId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'messageId' => 'messageId', + 'messageIds' => 'messageIds', + 'batchId' => 'batchId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'messageId' => 'setMessageId', + 'messageIds' => 'setMessageIds', + 'batchId' => 'setBatchId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'messageId' => 'getMessageId', + 'messageIds' => 'getMessageIds', + 'batchId' => 'getBatchId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['messageId'] = isset($data['messageId']) ? $data['messageId'] : null; + $this->container['messageIds'] = isset($data['messageIds']) ? $data['messageIds'] : null; + $this->container['batchId'] = isset($data['batchId']) ? $data['batchId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets messageId + * + * @return string + */ + public function getMessageId() + { + return $this->container['messageId']; + } + + /** + * Sets messageId + * + * @param string $messageId Message ID of the transactional email scheduled + * + * @return $this + */ + public function setMessageId($messageId) + { + $this->container['messageId'] = $messageId; + + return $this; + } + + /** + * Gets messageIds + * + * @return string[] + */ + public function getMessageIds() + { + return $this->container['messageIds']; + } + + /** + * Sets messageIds + * + * @param string[] $messageIds messageIds + * + * @return $this + */ + public function setMessageIds($messageIds) + { + $this->container['messageIds'] = $messageIds; + + return $this; + } + + /** + * Gets batchId + * + * @return string + */ + public function getBatchId() + { + return $this->container['batchId']; + } + + /** + * Sets batchId + * + * @param string $batchId Batch ID of the batch transactional email scheduled + * + * @return $this + */ + public function setBatchId($batchId) + { + $this->container['batchId'] = $batchId; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/SendReport.php b/vendor/getbrevo/brevo-php/lib/Model/SendReport.php new file mode 100644 index 0000000..84b0c60 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/SendReport.php @@ -0,0 +1,378 @@ + 'string', + 'email' => '\Brevo\Client\Model\SendReportEmail' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'language' => null, + 'email' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'language' => 'language', + 'email' => 'email' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'language' => 'setLanguage', + 'email' => 'setEmail' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'language' => 'getLanguage', + 'email' => 'getEmail' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const LANGUAGE_FR = 'fr'; + const LANGUAGE_ES = 'es'; + const LANGUAGE_PT = 'pt'; + const LANGUAGE_IT = 'it'; + const LANGUAGE_DE = 'de'; + const LANGUAGE_EN = 'en'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getLanguageAllowableValues() + { + return [ + self::LANGUAGE_FR, + self::LANGUAGE_ES, + self::LANGUAGE_PT, + self::LANGUAGE_IT, + self::LANGUAGE_DE, + self::LANGUAGE_EN, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['language'] = isset($data['language']) ? $data['language'] : 'fr'; + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getLanguageAllowableValues(); + if (!is_null($this->container['language']) && !in_array($this->container['language'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'language', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets language + * + * @return string + */ + public function getLanguage() + { + return $this->container['language']; + } + + /** + * Sets language + * + * @param string $language Language of email content for campaign report sending. + * + * @return $this + */ + public function setLanguage($language) + { + $allowedValues = $this->getLanguageAllowableValues(); + if (!is_null($language) && !in_array($language, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'language', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['language'] = $language; + + return $this; + } + + /** + * Gets email + * + * @return \Brevo\Client\Model\SendReportEmail + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param \Brevo\Client\Model\SendReportEmail $email email + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/SendReportEmail.php b/vendor/getbrevo/brevo-php/lib/Model/SendReportEmail.php new file mode 100644 index 0000000..a5aa068 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/SendReportEmail.php @@ -0,0 +1,342 @@ + 'string[]', + 'body' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'to' => 'email', + 'body' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'to' => 'to', + 'body' => 'body' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'to' => 'setTo', + 'body' => 'setBody' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'to' => 'getTo', + 'body' => 'getBody' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['to'] = isset($data['to']) ? $data['to'] : null; + $this->container['body'] = isset($data['body']) ? $data['body'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['to'] === null) { + $invalidProperties[] = "'to' can't be null"; + } + if ($this->container['body'] === null) { + $invalidProperties[] = "'body' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets to + * + * @return string[] + */ + public function getTo() + { + return $this->container['to']; + } + + /** + * Sets to + * + * @param string[] $to Email addresses of the recipients + * + * @return $this + */ + public function setTo($to) + { + $this->container['to'] = $to; + + return $this; + } + + /** + * Gets body + * + * @return string + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param string $body Custom text message to be presented in the report email. + * + * @return $this + */ + public function setBody($body) + { + $this->container['body'] = $body; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/SendSms.php b/vendor/getbrevo/brevo-php/lib/Model/SendSms.php new file mode 100644 index 0000000..b7d1dae --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/SendSms.php @@ -0,0 +1,431 @@ + 'string', + 'messageId' => 'int', + 'smsCount' => 'int', + 'usedCredits' => 'float', + 'remainingCredits' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'reference' => null, + 'messageId' => 'int64', + 'smsCount' => 'int64', + 'usedCredits' => 'float', + 'remainingCredits' => 'float' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'reference' => 'reference', + 'messageId' => 'messageId', + 'smsCount' => 'smsCount', + 'usedCredits' => 'usedCredits', + 'remainingCredits' => 'remainingCredits' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'reference' => 'setReference', + 'messageId' => 'setMessageId', + 'smsCount' => 'setSmsCount', + 'usedCredits' => 'setUsedCredits', + 'remainingCredits' => 'setRemainingCredits' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'reference' => 'getReference', + 'messageId' => 'getMessageId', + 'smsCount' => 'getSmsCount', + 'usedCredits' => 'getUsedCredits', + 'remainingCredits' => 'getRemainingCredits' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['reference'] = isset($data['reference']) ? $data['reference'] : null; + $this->container['messageId'] = isset($data['messageId']) ? $data['messageId'] : null; + $this->container['smsCount'] = isset($data['smsCount']) ? $data['smsCount'] : null; + $this->container['usedCredits'] = isset($data['usedCredits']) ? $data['usedCredits'] : null; + $this->container['remainingCredits'] = isset($data['remainingCredits']) ? $data['remainingCredits'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['reference'] === null) { + $invalidProperties[] = "'reference' can't be null"; + } + if ($this->container['messageId'] === null) { + $invalidProperties[] = "'messageId' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets reference + * + * @return string + */ + public function getReference() + { + return $this->container['reference']; + } + + /** + * Sets reference + * + * @param string $reference reference + * + * @return $this + */ + public function setReference($reference) + { + $this->container['reference'] = $reference; + + return $this; + } + + /** + * Gets messageId + * + * @return int + */ + public function getMessageId() + { + return $this->container['messageId']; + } + + /** + * Sets messageId + * + * @param int $messageId messageId + * + * @return $this + */ + public function setMessageId($messageId) + { + $this->container['messageId'] = $messageId; + + return $this; + } + + /** + * Gets smsCount + * + * @return int + */ + public function getSmsCount() + { + return $this->container['smsCount']; + } + + /** + * Sets smsCount + * + * @param int $smsCount Count of SMS's to send multiple text messages + * + * @return $this + */ + public function setSmsCount($smsCount) + { + $this->container['smsCount'] = $smsCount; + + return $this; + } + + /** + * Gets usedCredits + * + * @return float + */ + public function getUsedCredits() + { + return $this->container['usedCredits']; + } + + /** + * Sets usedCredits + * + * @param float $usedCredits SMS credits used per text message + * + * @return $this + */ + public function setUsedCredits($usedCredits) + { + $this->container['usedCredits'] = $usedCredits; + + return $this; + } + + /** + * Gets remainingCredits + * + * @return float + */ + public function getRemainingCredits() + { + return $this->container['remainingCredits']; + } + + /** + * Sets remainingCredits + * + * @param float $remainingCredits Remaining SMS credits of the user + * + * @return $this + */ + public function setRemainingCredits($remainingCredits) + { + $this->container['remainingCredits'] = $remainingCredits; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/SendSmtpEmail.php b/vendor/getbrevo/brevo-php/lib/Model/SendSmtpEmail.php new file mode 100644 index 0000000..58386de --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/SendSmtpEmail.php @@ -0,0 +1,755 @@ + '\Brevo\Client\Model\SendSmtpEmailSender', + 'to' => '\Brevo\Client\Model\SendSmtpEmailTo[]', + 'bcc' => '\Brevo\Client\Model\SendSmtpEmailBcc[]', + 'cc' => '\Brevo\Client\Model\SendSmtpEmailCc[]', + 'htmlContent' => 'string', + 'textContent' => 'string', + 'subject' => 'string', + 'replyTo' => '\Brevo\Client\Model\SendSmtpEmailReplyTo', + 'attachment' => '\Brevo\Client\Model\SendSmtpEmailAttachment[]', + 'headers' => 'object', + 'templateId' => 'int', + 'params' => 'object', + 'messageVersions' => '\Brevo\Client\Model\SendSmtpEmailMessageVersions[]', + 'tags' => 'string[]', + 'scheduledAt' => '\DateTime', + 'batchId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'sender' => null, + 'to' => null, + 'bcc' => null, + 'cc' => null, + 'htmlContent' => null, + 'textContent' => null, + 'subject' => null, + 'replyTo' => null, + 'attachment' => null, + 'headers' => null, + 'templateId' => 'int64', + 'params' => null, + 'messageVersions' => null, + 'tags' => null, + 'scheduledAt' => 'date-time', + 'batchId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'sender' => 'sender', + 'to' => 'to', + 'bcc' => 'bcc', + 'cc' => 'cc', + 'htmlContent' => 'htmlContent', + 'textContent' => 'textContent', + 'subject' => 'subject', + 'replyTo' => 'replyTo', + 'attachment' => 'attachment', + 'headers' => 'headers', + 'templateId' => 'templateId', + 'params' => 'params', + 'messageVersions' => 'messageVersions', + 'tags' => 'tags', + 'scheduledAt' => 'scheduledAt', + 'batchId' => 'batchId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'sender' => 'setSender', + 'to' => 'setTo', + 'bcc' => 'setBcc', + 'cc' => 'setCc', + 'htmlContent' => 'setHtmlContent', + 'textContent' => 'setTextContent', + 'subject' => 'setSubject', + 'replyTo' => 'setReplyTo', + 'attachment' => 'setAttachment', + 'headers' => 'setHeaders', + 'templateId' => 'setTemplateId', + 'params' => 'setParams', + 'messageVersions' => 'setMessageVersions', + 'tags' => 'setTags', + 'scheduledAt' => 'setScheduledAt', + 'batchId' => 'setBatchId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'sender' => 'getSender', + 'to' => 'getTo', + 'bcc' => 'getBcc', + 'cc' => 'getCc', + 'htmlContent' => 'getHtmlContent', + 'textContent' => 'getTextContent', + 'subject' => 'getSubject', + 'replyTo' => 'getReplyTo', + 'attachment' => 'getAttachment', + 'headers' => 'getHeaders', + 'templateId' => 'getTemplateId', + 'params' => 'getParams', + 'messageVersions' => 'getMessageVersions', + 'tags' => 'getTags', + 'scheduledAt' => 'getScheduledAt', + 'batchId' => 'getBatchId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['sender'] = isset($data['sender']) ? $data['sender'] : null; + $this->container['to'] = isset($data['to']) ? $data['to'] : null; + $this->container['bcc'] = isset($data['bcc']) ? $data['bcc'] : null; + $this->container['cc'] = isset($data['cc']) ? $data['cc'] : null; + $this->container['htmlContent'] = isset($data['htmlContent']) ? $data['htmlContent'] : null; + $this->container['textContent'] = isset($data['textContent']) ? $data['textContent'] : null; + $this->container['subject'] = isset($data['subject']) ? $data['subject'] : null; + $this->container['replyTo'] = isset($data['replyTo']) ? $data['replyTo'] : null; + $this->container['attachment'] = isset($data['attachment']) ? $data['attachment'] : null; + $this->container['headers'] = isset($data['headers']) ? $data['headers'] : null; + $this->container['templateId'] = isset($data['templateId']) ? $data['templateId'] : null; + $this->container['params'] = isset($data['params']) ? $data['params'] : null; + $this->container['messageVersions'] = isset($data['messageVersions']) ? $data['messageVersions'] : null; + $this->container['tags'] = isset($data['tags']) ? $data['tags'] : null; + $this->container['scheduledAt'] = isset($data['scheduledAt']) ? $data['scheduledAt'] : null; + $this->container['batchId'] = isset($data['batchId']) ? $data['batchId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets sender + * + * @return \Brevo\Client\Model\SendSmtpEmailSender + */ + public function getSender() + { + return $this->container['sender']; + } + + /** + * Sets sender + * + * @param \Brevo\Client\Model\SendSmtpEmailSender $sender sender + * + * @return $this + */ + public function setSender($sender) + { + $this->container['sender'] = $sender; + + return $this; + } + + /** + * Gets to + * + * @return \Brevo\Client\Model\SendSmtpEmailTo[] + */ + public function getTo() + { + return $this->container['to']; + } + + /** + * Sets to + * + * @param \Brevo\Client\Model\SendSmtpEmailTo[] $to Mandatory if messageVersions are not passed, ignored if messageVersions are passed. List of email addresses and names (optional) of the recipients. For example, [{\"name\":\"Jimmy\", \"email\":\"jimmy98@example.com\"}, {\"name\":\"Joe\", \"email\":\"joe@example.com\"}] + * + * @return $this + */ + public function setTo($to) + { + $this->container['to'] = $to; + + return $this; + } + + /** + * Gets bcc + * + * @return \Brevo\Client\Model\SendSmtpEmailBcc[] + */ + public function getBcc() + { + return $this->container['bcc']; + } + + /** + * Sets bcc + * + * @param \Brevo\Client\Model\SendSmtpEmailBcc[] $bcc List of email addresses and names (optional) of the recipients in bcc + * + * @return $this + */ + public function setBcc($bcc) + { + $this->container['bcc'] = $bcc; + + return $this; + } + + /** + * Gets cc + * + * @return \Brevo\Client\Model\SendSmtpEmailCc[] + */ + public function getCc() + { + return $this->container['cc']; + } + + /** + * Sets cc + * + * @param \Brevo\Client\Model\SendSmtpEmailCc[] $cc List of email addresses and names (optional) of the recipients in cc + * + * @return $this + */ + public function setCc($cc) + { + $this->container['cc'] = $cc; + + return $this; + } + + /** + * Gets htmlContent + * + * @return string + */ + public function getHtmlContent() + { + return $this->container['htmlContent']; + } + + /** + * Sets htmlContent + * + * @param string $htmlContent HTML body of the message ( Mandatory if 'templateId' is not passed, ignored if 'templateId' is passed ) + * + * @return $this + */ + public function setHtmlContent($htmlContent) + { + $this->container['htmlContent'] = $htmlContent; + + return $this; + } + + /** + * Gets textContent + * + * @return string + */ + public function getTextContent() + { + return $this->container['textContent']; + } + + /** + * Sets textContent + * + * @param string $textContent Plain Text body of the message ( Ignored if 'templateId' is passed ) + * + * @return $this + */ + public function setTextContent($textContent) + { + $this->container['textContent'] = $textContent; + + return $this; + } + + /** + * Gets subject + * + * @return string + */ + public function getSubject() + { + return $this->container['subject']; + } + + /** + * Sets subject + * + * @param string $subject Subject of the message. Mandatory if 'templateId' is not passed + * + * @return $this + */ + public function setSubject($subject) + { + $this->container['subject'] = $subject; + + return $this; + } + + /** + * Gets replyTo + * + * @return \Brevo\Client\Model\SendSmtpEmailReplyTo + */ + public function getReplyTo() + { + return $this->container['replyTo']; + } + + /** + * Sets replyTo + * + * @param \Brevo\Client\Model\SendSmtpEmailReplyTo $replyTo replyTo + * + * @return $this + */ + public function setReplyTo($replyTo) + { + $this->container['replyTo'] = $replyTo; + + return $this; + } + + /** + * Gets attachment + * + * @return \Brevo\Client\Model\SendSmtpEmailAttachment[] + */ + public function getAttachment() + { + return $this->container['attachment']; + } + + /** + * Sets attachment + * + * @param \Brevo\Client\Model\SendSmtpEmailAttachment[] $attachment Pass the absolute URL (no local file) or the base64 content of the attachment along with the attachment name (Mandatory if attachment content is passed). For example, `[{\"url\":\"https://attachment.domain.com/myAttachmentFromUrl.jpg\", \"name\":\"myAttachmentFromUrl.jpg\"}, {\"content\":\"base64 example content\", \"name\":\"myAttachmentFromBase64.jpg\"}]`. Allowed extensions for attachment file: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub, eps, odt, mp3, m4a, m4v, wma, ogg, flac, wav, aif, aifc, aiff, mp4, mov, avi, mkv, mpeg, mpg, wmv, pkpass and xlsm ( If 'templateId' is passed and is in New Template Language format then both attachment url and content are accepted. If template is in Old template Language format, then 'attachment' is ignored ) + * + * @return $this + */ + public function setAttachment($attachment) + { + $this->container['attachment'] = $attachment; + + return $this; + } + + /** + * Gets headers + * + * @return object + */ + public function getHeaders() + { + return $this->container['headers']; + } + + /** + * Sets headers + * + * @param object $headers Pass the set of custom headers (not the standard headers) that shall be sent along the mail headers in the original email. 'sender.ip' header can be set (only for dedicated ip users) to mention the IP to be used for sending transactional emails. Headers are allowed in `This-Case-Only` (i.e. words separated by hyphen with first letter of each word in capital letter), they will be converted to such case styling if not in this format in the request payload. For example, `{\"sender.ip\":\"1.2.3.4\", \"X-Mailin-custom\":\"some_custom_header\", \"idempotencyKey\":\"abc-123\"}`. + * + * @return $this + */ + public function setHeaders($headers) + { + $this->container['headers'] = $headers; + + return $this; + } + + /** + * Gets templateId + * + * @return int + */ + public function getTemplateId() + { + return $this->container['templateId']; + } + + /** + * Sets templateId + * + * @param int $templateId Id of the template. + * + * @return $this + */ + public function setTemplateId($templateId) + { + $this->container['templateId'] = $templateId; + + return $this; + } + + /** + * Gets params + * + * @return object + */ + public function getParams() + { + return $this->container['params']; + } + + /** + * Sets params + * + * @param object $params Pass the set of attributes to customize the template. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. It's considered only if template is in New Template Language format. + * + * @return $this + */ + public function setParams($params) + { + $this->container['params'] = $params; + + return $this; + } + + /** + * Gets messageVersions + * + * @return \Brevo\Client\Model\SendSmtpEmailMessageVersions[] + */ + public function getMessageVersions() + { + return $this->container['messageVersions']; + } + + /** + * Sets messageVersions + * + * @param \Brevo\Client\Model\SendSmtpEmailMessageVersions[] $messageVersions You can customize and send out multiple versions of a mail. templateId can be customized only if global parameter contains templateId. htmlContent and textContent can be customized only if any of the two, htmlContent or textContent, is present in global parameters. Some global parameters such as **to(mandatory), bcc, cc, replyTo, subject** can also be customized specific to each version. Total number of recipients in one API request must not exceed 2000. However, you can still pass upto 99 recipients maximum in one message version. The size of individual params in all the messageVersions shall not exceed 100 KB limit and that of cumulative params shall not exceed 1000 KB. You can follow this **step-by-step guide** on how to use **messageVersions** to batch send emails - https://developers.brevo.com/docs/batch-send-transactional-emails + * + * @return $this + */ + public function setMessageVersions($messageVersions) + { + $this->container['messageVersions'] = $messageVersions; + + return $this; + } + + /** + * Gets tags + * + * @return string[] + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param string[] $tags Tag your emails to find them more easily + * + * @return $this + */ + public function setTags($tags) + { + $this->container['tags'] = $tags; + + return $this; + } + + /** + * Gets scheduledAt + * + * @return \DateTime + */ + public function getScheduledAt() + { + return $this->container['scheduledAt']; + } + + /** + * Sets scheduledAt + * + * @param \DateTime $scheduledAt UTC date-time on which the email has to schedule (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for scheduling. There can be an expected delay of +5 minutes in scheduled email delivery. **Please note this feature is currently a public beta**. + * + * @return $this + */ + public function setScheduledAt($scheduledAt) + { + $this->container['scheduledAt'] = $scheduledAt; + + return $this; + } + + /** + * Gets batchId + * + * @return string + */ + public function getBatchId() + { + return $this->container['batchId']; + } + + /** + * Sets batchId + * + * @param string $batchId Valid UUIDv4 batch id to identify the scheduled batches transactional email. If not passed we will create a valid UUIDv4 batch id at our end. + * + * @return $this + */ + public function setBatchId($batchId) + { + $this->container['batchId'] = $batchId; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/SendSmtpEmailAttachment.php b/vendor/getbrevo/brevo-php/lib/Model/SendSmtpEmailAttachment.php new file mode 100644 index 0000000..4775f9c --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/SendSmtpEmailAttachment.php @@ -0,0 +1,374 @@ + 'string', + 'content' => 'string', + 'name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'url' => 'url', + 'content' => 'byte', + 'name' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'url' => 'url', + 'content' => 'content', + 'name' => 'name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'url' => 'setUrl', + 'content' => 'setContent', + 'name' => 'setName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'url' => 'getUrl', + 'content' => 'getContent', + 'name' => 'getName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['url'] = isset($data['url']) ? $data['url'] : null; + $this->container['content'] = isset($data['content']) ? $data['content'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if (!is_null($this->container['content']) && !preg_match("/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/", $this->container['content'])) { + $invalidProperties[] = "invalid value for 'content', must be conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets url + * + * @return string + */ + public function getUrl() + { + return $this->container['url']; + } + + /** + * Sets url + * + * @param string $url Absolute url of the attachment (no local file). + * + * @return $this + */ + public function setUrl($url) + { + $this->container['url'] = $url; + + return $this; + } + + /** + * Gets content + * + * @return string + */ + public function getContent() + { + return $this->container['content']; + } + + /** + * Sets content + * + * @param string $content Base64 encoded chunk data of the attachment generated on the fly + * + * @return $this + */ + public function setContent($content) + { + + if (!is_null($content) && (!preg_match("/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/", $content))) { + throw new \InvalidArgumentException("invalid value for $content when calling SendSmtpEmailAttachment., must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/."); + } + + $this->container['content'] = $content; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Required if content is passed. Name of the attachment + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/SendSmtpEmailBcc.php b/vendor/getbrevo/brevo-php/lib/Model/SendSmtpEmailBcc.php new file mode 100644 index 0000000..507c7f5 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/SendSmtpEmailBcc.php @@ -0,0 +1,338 @@ + 'string', + 'name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'email' => 'email', + 'name' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'email' => 'email', + 'name' => 'name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'email' => 'setEmail', + 'name' => 'setName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'email' => 'getEmail', + 'name' => 'getName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email Email address of the recipient in bcc + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the recipient in bcc. Maximum allowed characters are 70. + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/SendSmtpEmailCc.php b/vendor/getbrevo/brevo-php/lib/Model/SendSmtpEmailCc.php new file mode 100644 index 0000000..e332a05 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/SendSmtpEmailCc.php @@ -0,0 +1,338 @@ + 'string', + 'name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'email' => 'email', + 'name' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'email' => 'email', + 'name' => 'name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'email' => 'setEmail', + 'name' => 'setName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'email' => 'getEmail', + 'name' => 'getName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email Email address of the recipient in cc + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the recipient in cc. Maximum allowed characters are 70. + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/SendSmtpEmailMessageVersions.php b/vendor/getbrevo/brevo-php/lib/Model/SendSmtpEmailMessageVersions.php new file mode 100644 index 0000000..4f9d0f6 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/SendSmtpEmailMessageVersions.php @@ -0,0 +1,458 @@ + '\Brevo\Client\Model\SendSmtpEmailTo1[]', + 'params' => 'map[string,object]', + 'bcc' => '\Brevo\Client\Model\SendSmtpEmailBcc[]', + 'cc' => '\Brevo\Client\Model\SendSmtpEmailCc[]', + 'replyTo' => '\Brevo\Client\Model\SendSmtpEmailReplyTo1', + 'subject' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'to' => null, + 'params' => null, + 'bcc' => null, + 'cc' => null, + 'replyTo' => null, + 'subject' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'to' => 'to', + 'params' => 'params', + 'bcc' => 'bcc', + 'cc' => 'cc', + 'replyTo' => 'replyTo', + 'subject' => 'subject' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'to' => 'setTo', + 'params' => 'setParams', + 'bcc' => 'setBcc', + 'cc' => 'setCc', + 'replyTo' => 'setReplyTo', + 'subject' => 'setSubject' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'to' => 'getTo', + 'params' => 'getParams', + 'bcc' => 'getBcc', + 'cc' => 'getCc', + 'replyTo' => 'getReplyTo', + 'subject' => 'getSubject' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['to'] = isset($data['to']) ? $data['to'] : null; + $this->container['params'] = isset($data['params']) ? $data['params'] : null; + $this->container['bcc'] = isset($data['bcc']) ? $data['bcc'] : null; + $this->container['cc'] = isset($data['cc']) ? $data['cc'] : null; + $this->container['replyTo'] = isset($data['replyTo']) ? $data['replyTo'] : null; + $this->container['subject'] = isset($data['subject']) ? $data['subject'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['to'] === null) { + $invalidProperties[] = "'to' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets to + * + * @return \Brevo\Client\Model\SendSmtpEmailTo1[] + */ + public function getTo() + { + return $this->container['to']; + } + + /** + * Sets to + * + * @param \Brevo\Client\Model\SendSmtpEmailTo1[] $to List of email addresses and names (_optional_) of the recipients. For example, [{\"name\":\"Jimmy\", \"email\":\"jimmy98@example.com\"}, {\"name\":\"Joe\", \"email\":\"joe@example.com\"}] + * + * @return $this + */ + public function setTo($to) + { + $this->container['to'] = $to; + + return $this; + } + + /** + * Gets params + * + * @return map[string,object] + */ + public function getParams() + { + return $this->container['params']; + } + + /** + * Sets params + * + * @param map[string,object] $params Pass the set of attributes to customize the template. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. It's considered only if template is in New Template Language format. + * + * @return $this + */ + public function setParams($params) + { + $this->container['params'] = $params; + + return $this; + } + + /** + * Gets bcc + * + * @return \Brevo\Client\Model\SendSmtpEmailBcc[] + */ + public function getBcc() + { + return $this->container['bcc']; + } + + /** + * Sets bcc + * + * @param \Brevo\Client\Model\SendSmtpEmailBcc[] $bcc List of email addresses and names (optional) of the recipients in bcc + * + * @return $this + */ + public function setBcc($bcc) + { + $this->container['bcc'] = $bcc; + + return $this; + } + + /** + * Gets cc + * + * @return \Brevo\Client\Model\SendSmtpEmailCc[] + */ + public function getCc() + { + return $this->container['cc']; + } + + /** + * Sets cc + * + * @param \Brevo\Client\Model\SendSmtpEmailCc[] $cc List of email addresses and names (optional) of the recipients in cc + * + * @return $this + */ + public function setCc($cc) + { + $this->container['cc'] = $cc; + + return $this; + } + + /** + * Gets replyTo + * + * @return \Brevo\Client\Model\SendSmtpEmailReplyTo1 + */ + public function getReplyTo() + { + return $this->container['replyTo']; + } + + /** + * Sets replyTo + * + * @param \Brevo\Client\Model\SendSmtpEmailReplyTo1 $replyTo replyTo + * + * @return $this + */ + public function setReplyTo($replyTo) + { + $this->container['replyTo'] = $replyTo; + + return $this; + } + + /** + * Gets subject + * + * @return string + */ + public function getSubject() + { + return $this->container['subject']; + } + + /** + * Sets subject + * + * @param string $subject Custom subject specific to message version + * + * @return $this + */ + public function setSubject($subject) + { + $this->container['subject'] = $subject; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/SendSmtpEmailReplyTo.php b/vendor/getbrevo/brevo-php/lib/Model/SendSmtpEmailReplyTo.php new file mode 100644 index 0000000..e5231f7 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/SendSmtpEmailReplyTo.php @@ -0,0 +1,339 @@ + 'string', + 'name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'email' => 'email', + 'name' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'email' => 'email', + 'name' => 'name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'email' => 'setEmail', + 'name' => 'setName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'email' => 'getEmail', + 'name' => 'getName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email Email address in reply to + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name in reply to. Maximum allowed characters are 70. + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/SendSmtpEmailReplyTo1.php b/vendor/getbrevo/brevo-php/lib/Model/SendSmtpEmailReplyTo1.php new file mode 100644 index 0000000..56280ed --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/SendSmtpEmailReplyTo1.php @@ -0,0 +1,339 @@ + 'string', + 'name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'email' => 'email', + 'name' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'email' => 'email', + 'name' => 'name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'email' => 'setEmail', + 'name' => 'setName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'email' => 'getEmail', + 'name' => 'getName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email Email address in reply to + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name in reply to. Maximum allowed characters are 70. + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/SendSmtpEmailSender.php b/vendor/getbrevo/brevo-php/lib/Model/SendSmtpEmailSender.php new file mode 100644 index 0000000..b27b168 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/SendSmtpEmailSender.php @@ -0,0 +1,366 @@ + 'string', + 'email' => 'string', + 'id' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null, + 'email' => 'email', + 'id' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'email' => 'email', + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'email' => 'setEmail', + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'email' => 'getEmail', + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the sender from which the emails will be sent. Maximum allowed characters are 70. Applicable only when email is passed. + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email Email of the sender from which the emails will be sent. Mandatory if sender id is not passed. + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id Id of the sender from which the emails will be sent. In order to select a sender with specific pool of IP’s, dedicated ip users shall pass id (instead of email). Mandatory if email is not passed. + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/SendSmtpEmailTo.php b/vendor/getbrevo/brevo-php/lib/Model/SendSmtpEmailTo.php new file mode 100644 index 0000000..e7c164b --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/SendSmtpEmailTo.php @@ -0,0 +1,338 @@ + 'string', + 'name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'email' => 'email', + 'name' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'email' => 'email', + 'name' => 'name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'email' => 'setEmail', + 'name' => 'setName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'email' => 'getEmail', + 'name' => 'getName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email Email address of the recipient + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the recipient. Maximum allowed characters are 70. + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/SendSmtpEmailTo1.php b/vendor/getbrevo/brevo-php/lib/Model/SendSmtpEmailTo1.php new file mode 100644 index 0000000..58dafdf --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/SendSmtpEmailTo1.php @@ -0,0 +1,338 @@ + 'string', + 'name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'email' => 'email', + 'name' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'email' => 'email', + 'name' => 'name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'email' => 'setEmail', + 'name' => 'setName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'email' => 'getEmail', + 'name' => 'getName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email Email address of the recipient + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the recipient. **Maximum allowed characters are 70**. + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/SendTestEmail.php b/vendor/getbrevo/brevo-php/lib/Model/SendTestEmail.php new file mode 100644 index 0000000..ba33577 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/SendTestEmail.php @@ -0,0 +1,305 @@ + 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'emailTo' => 'email' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'emailTo' => 'emailTo' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'emailTo' => 'setEmailTo' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'emailTo' => 'getEmailTo' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['emailTo'] = isset($data['emailTo']) ? $data['emailTo'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets emailTo + * + * @return string[] + */ + public function getEmailTo() + { + return $this->container['emailTo']; + } + + /** + * Sets emailTo + * + * @param string[] $emailTo List of the email addresses of the recipients whom you wish to send the test mail. If left empty, the test mail will be sent to your entire test list. You can not send more than 50 test emails per day. + * + * @return $this + */ + public function setEmailTo($emailTo) + { + $this->container['emailTo'] = $emailTo; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/SendTestSms.php b/vendor/getbrevo/brevo-php/lib/Model/SendTestSms.php new file mode 100644 index 0000000..3eaeead --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/SendTestSms.php @@ -0,0 +1,305 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'phoneNumber' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'phoneNumber' => 'phoneNumber' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'phoneNumber' => 'setPhoneNumber' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'phoneNumber' => 'getPhoneNumber' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['phoneNumber'] = isset($data['phoneNumber']) ? $data['phoneNumber'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets phoneNumber + * + * @return string + */ + public function getPhoneNumber() + { + return $this->container['phoneNumber']; + } + + /** + * Sets phoneNumber + * + * @param string $phoneNumber Mobile number of the recipient with the country code. This number must belong to one of your contacts in Brevo account and must not be blacklisted + * + * @return $this + */ + public function setPhoneNumber($phoneNumber) + { + $this->container['phoneNumber'] = $phoneNumber; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/SendTransacSms.php b/vendor/getbrevo/brevo-php/lib/Model/SendTransacSms.php new file mode 100644 index 0000000..4ab8659 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/SendTransacSms.php @@ -0,0 +1,564 @@ + 'string', + 'recipient' => 'string', + 'content' => 'string', + 'type' => 'string', + 'tag' => 'string', + 'webUrl' => 'string', + 'unicodeEnabled' => 'bool', + 'organisationPrefix' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'sender' => null, + 'recipient' => null, + 'content' => null, + 'type' => null, + 'tag' => null, + 'webUrl' => 'url', + 'unicodeEnabled' => null, + 'organisationPrefix' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'sender' => 'sender', + 'recipient' => 'recipient', + 'content' => 'content', + 'type' => 'type', + 'tag' => 'tag', + 'webUrl' => 'webUrl', + 'unicodeEnabled' => 'unicodeEnabled', + 'organisationPrefix' => 'organisationPrefix' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'sender' => 'setSender', + 'recipient' => 'setRecipient', + 'content' => 'setContent', + 'type' => 'setType', + 'tag' => 'setTag', + 'webUrl' => 'setWebUrl', + 'unicodeEnabled' => 'setUnicodeEnabled', + 'organisationPrefix' => 'setOrganisationPrefix' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'sender' => 'getSender', + 'recipient' => 'getRecipient', + 'content' => 'getContent', + 'type' => 'getType', + 'tag' => 'getTag', + 'webUrl' => 'getWebUrl', + 'unicodeEnabled' => 'getUnicodeEnabled', + 'organisationPrefix' => 'getOrganisationPrefix' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const TYPE_TRANSACTIONAL = 'transactional'; + const TYPE_MARKETING = 'marketing'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_TRANSACTIONAL, + self::TYPE_MARKETING, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['sender'] = isset($data['sender']) ? $data['sender'] : null; + $this->container['recipient'] = isset($data['recipient']) ? $data['recipient'] : null; + $this->container['content'] = isset($data['content']) ? $data['content'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : 'transactional'; + $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; + $this->container['webUrl'] = isset($data['webUrl']) ? $data['webUrl'] : null; + $this->container['unicodeEnabled'] = isset($data['unicodeEnabled']) ? $data['unicodeEnabled'] : false; + $this->container['organisationPrefix'] = isset($data['organisationPrefix']) ? $data['organisationPrefix'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['sender'] === null) { + $invalidProperties[] = "'sender' can't be null"; + } + if ((mb_strlen($this->container['sender']) > 15)) { + $invalidProperties[] = "invalid value for 'sender', the character length must be smaller than or equal to 15."; + } + + if ($this->container['recipient'] === null) { + $invalidProperties[] = "'recipient' can't be null"; + } + if ($this->container['content'] === null) { + $invalidProperties[] = "'content' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets sender + * + * @return string + */ + public function getSender() + { + return $this->container['sender']; + } + + /** + * Sets sender + * + * @param string $sender Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters** + * + * @return $this + */ + public function setSender($sender) + { + if ((mb_strlen($sender) > 15)) { + throw new \InvalidArgumentException('invalid length for $sender when calling SendTransacSms., must be smaller than or equal to 15.'); + } + + $this->container['sender'] = $sender; + + return $this; + } + + /** + * Gets recipient + * + * @return string + */ + public function getRecipient() + { + return $this->container['recipient']; + } + + /** + * Sets recipient + * + * @param string $recipient Mobile number to send SMS with the country code + * + * @return $this + */ + public function setRecipient($recipient) + { + $this->container['recipient'] = $recipient; + + return $this; + } + + /** + * Gets content + * + * @return string + */ + public function getContent() + { + return $this->container['content']; + } + + /** + * Sets content + * + * @param string $content Content of the message. If more than 160 characters long, will be sent as multiple text messages + * + * @return $this + */ + public function setContent($content) + { + $this->container['content'] = $content; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Type of the SMS. Marketing SMS messages are those sent typically with marketing content. Transactional SMS messages are sent to individuals and are triggered in response to some action, such as a sign-up, purchase, etc. + * + * @return $this + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($type) && !in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets tag + * + * @return string + */ + public function getTag() + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string $tag Tag of the message + * + * @return $this + */ + public function setTag($tag) + { + $this->container['tag'] = $tag; + + return $this; + } + + /** + * Gets webUrl + * + * @return string + */ + public function getWebUrl() + { + return $this->container['webUrl']; + } + + /** + * Sets webUrl + * + * @param string $webUrl Webhook to call for each event triggered by the message (delivered etc.) + * + * @return $this + */ + public function setWebUrl($webUrl) + { + $this->container['webUrl'] = $webUrl; + + return $this; + } + + /** + * Gets unicodeEnabled + * + * @return bool + */ + public function getUnicodeEnabled() + { + return $this->container['unicodeEnabled']; + } + + /** + * Sets unicodeEnabled + * + * @param bool $unicodeEnabled Format of the message. It indicates whether the content should be treated as unicode or not. + * + * @return $this + */ + public function setUnicodeEnabled($unicodeEnabled) + { + $this->container['unicodeEnabled'] = $unicodeEnabled; + + return $this; + } + + /** + * Gets organisationPrefix + * + * @return string + */ + public function getOrganisationPrefix() + { + return $this->container['organisationPrefix']; + } + + /** + * Sets organisationPrefix + * + * @param string $organisationPrefix A recognizable prefix will ensure your audience knows who you are. Recommended by U.S. carriers. This will be added as your Brand Name before the message content. **Prefer verifying maximum length of 160 characters including this prefix in message content to avoid multiple sending of same sms.** + * + * @return $this + */ + public function setOrganisationPrefix($organisationPrefix) + { + $this->container['organisationPrefix'] = $organisationPrefix; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/SendWhatsappMessage.php b/vendor/getbrevo/brevo-php/lib/Model/SendWhatsappMessage.php new file mode 100644 index 0000000..ecb3ce4 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/SendWhatsappMessage.php @@ -0,0 +1,431 @@ + 'int', + 'text' => 'string', + 'senderNumber' => 'string', + 'params' => 'object', + 'contactNumbers' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'templateId' => null, + 'text' => null, + 'senderNumber' => 'mobile', + 'params' => null, + 'contactNumbers' => 'mobile' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'templateId' => 'templateId', + 'text' => 'text', + 'senderNumber' => 'senderNumber', + 'params' => 'params', + 'contactNumbers' => 'contactNumbers' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'templateId' => 'setTemplateId', + 'text' => 'setText', + 'senderNumber' => 'setSenderNumber', + 'params' => 'setParams', + 'contactNumbers' => 'setContactNumbers' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'templateId' => 'getTemplateId', + 'text' => 'getText', + 'senderNumber' => 'getSenderNumber', + 'params' => 'getParams', + 'contactNumbers' => 'getContactNumbers' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['templateId'] = isset($data['templateId']) ? $data['templateId'] : null; + $this->container['text'] = isset($data['text']) ? $data['text'] : null; + $this->container['senderNumber'] = isset($data['senderNumber']) ? $data['senderNumber'] : null; + $this->container['params'] = isset($data['params']) ? $data['params'] : null; + $this->container['contactNumbers'] = isset($data['contactNumbers']) ? $data['contactNumbers'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['senderNumber'] === null) { + $invalidProperties[] = "'senderNumber' can't be null"; + } + if ($this->container['contactNumbers'] === null) { + $invalidProperties[] = "'contactNumbers' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets templateId + * + * @return int + */ + public function getTemplateId() + { + return $this->container['templateId']; + } + + /** + * Sets templateId + * + * @param int $templateId ID of the template to send + * + * @return $this + */ + public function setTemplateId($templateId) + { + $this->container['templateId'] = $templateId; + + return $this; + } + + /** + * Gets text + * + * @return string + */ + public function getText() + { + return $this->container['text']; + } + + /** + * Sets text + * + * @param string $text Text to be sent as message body (will be overridden if templateId is passed in the same request) + * + * @return $this + */ + public function setText($text) + { + $this->container['text'] = $text; + + return $this; + } + + /** + * Gets senderNumber + * + * @return string + */ + public function getSenderNumber() + { + return $this->container['senderNumber']; + } + + /** + * Sets senderNumber + * + * @param string $senderNumber WhatsApp Number with country code. Example, 85264318721 + * + * @return $this + */ + public function setSenderNumber($senderNumber) + { + $this->container['senderNumber'] = $senderNumber; + + return $this; + } + + /** + * Gets params + * + * @return object + */ + public function getParams() + { + return $this->container['params']; + } + + /** + * Sets params + * + * @param object $params Pass the set of attributes to customize the template. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. + * + * @return $this + */ + public function setParams($params) + { + $this->container['params'] = $params; + + return $this; + } + + /** + * Gets contactNumbers + * + * @return string[] + */ + public function getContactNumbers() + { + return $this->container['contactNumbers']; + } + + /** + * Sets contactNumbers + * + * @param string[] $contactNumbers List of phone numbers of the contacts + * + * @return $this + */ + public function setContactNumbers($contactNumbers) + { + $this->container['contactNumbers'] = $contactNumbers; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/SsoTokenRequest.php b/vendor/getbrevo/brevo-php/lib/Model/SsoTokenRequest.php new file mode 100644 index 0000000..b29cedc --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/SsoTokenRequest.php @@ -0,0 +1,442 @@ + 'int', + 'email' => 'string', + 'target' => 'string', + 'url' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'int64', + 'email' => null, + 'target' => null, + 'url' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'email' => 'email', + 'target' => 'target', + 'url' => 'url' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'email' => 'setEmail', + 'target' => 'setTarget', + 'url' => 'setUrl' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'email' => 'getEmail', + 'target' => 'getTarget', + 'url' => 'getUrl' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const TARGET_AUTOMATION = 'automation'; + const TARGET_EMAIL_CAMPAIGN = 'email_campaign'; + const TARGET_CONTACTS = 'contacts'; + const TARGET_LANDING_PAGES = 'landing_pages'; + const TARGET_EMAIL_TRANSACTIONAL = 'email_transactional'; + const TARGET_SENDERS = 'senders'; + const TARGET_SMS_CAMPAIGN = 'sms_campaign'; + const TARGET_SMS_TRANSACTIONAL = 'sms_transactional'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTargetAllowableValues() + { + return [ + self::TARGET_AUTOMATION, + self::TARGET_EMAIL_CAMPAIGN, + self::TARGET_CONTACTS, + self::TARGET_LANDING_PAGES, + self::TARGET_EMAIL_TRANSACTIONAL, + self::TARGET_SENDERS, + self::TARGET_SMS_CAMPAIGN, + self::TARGET_SMS_TRANSACTIONAL, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['target'] = isset($data['target']) ? $data['target'] : null; + $this->container['url'] = isset($data['url']) ? $data['url'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + $allowedValues = $this->getTargetAllowableValues(); + if (!is_null($this->container['target']) && !in_array($this->container['target'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'target', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id Id of the sub-account organization + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email User email of sub-account organization + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets target + * + * @return string + */ + public function getTarget() + { + return $this->container['target']; + } + + /** + * Sets target + * + * @param string $target Set target after login success * automation - Redirect to Automation after login * email_campaign - Redirect to Email Campaign after login * contacts - Redirect to Contacts after login * landing_pages - Redirect to Landing Pages after login * email_transactional - Redirect to Email Transactional after login * senders - Redirect to Contacts after login * sms_campaign - Redirect to Sms Campaign after login * sms_transactional - Redirect to Sms Transactional after login + * + * @return $this + */ + public function setTarget($target) + { + $allowedValues = $this->getTargetAllowableValues(); + if (!is_null($target) && !in_array($target, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'target', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['target'] = $target; + + return $this; + } + + /** + * Gets url + * + * @return string + */ + public function getUrl() + { + return $this->container['url']; + } + + /** + * Sets url + * + * @param string $url Set the full target URL after login success. The user will land directly on this target URL after login + * + * @return $this + */ + public function setUrl($url) + { + $this->container['url'] = $url; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/SubAccountAppsToggleRequest.php b/vendor/getbrevo/brevo-php/lib/Model/SubAccountAppsToggleRequest.php new file mode 100644 index 0000000..f7b9392 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/SubAccountAppsToggleRequest.php @@ -0,0 +1,666 @@ + 'bool', + 'whatsapp' => 'bool', + 'automation' => 'bool', + 'emailCampaigns' => 'bool', + 'smsCampaigns' => 'bool', + 'landingPages' => 'bool', + 'transactionalEmails' => 'bool', + 'transactionalSms' => 'bool', + 'facebookAds' => 'bool', + 'webPush' => 'bool', + 'meetings' => 'bool', + 'conversations' => 'bool', + 'crm' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'inbox' => null, + 'whatsapp' => null, + 'automation' => null, + 'emailCampaigns' => null, + 'smsCampaigns' => null, + 'landingPages' => null, + 'transactionalEmails' => null, + 'transactionalSms' => null, + 'facebookAds' => null, + 'webPush' => null, + 'meetings' => null, + 'conversations' => null, + 'crm' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'inbox' => 'inbox', + 'whatsapp' => 'whatsapp', + 'automation' => 'automation', + 'emailCampaigns' => 'email-campaigns', + 'smsCampaigns' => 'sms-campaigns', + 'landingPages' => 'landing-pages', + 'transactionalEmails' => 'transactional-emails', + 'transactionalSms' => 'transactional-sms', + 'facebookAds' => 'facebook-ads', + 'webPush' => 'web-push', + 'meetings' => 'meetings', + 'conversations' => 'conversations', + 'crm' => 'crm' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'inbox' => 'setInbox', + 'whatsapp' => 'setWhatsapp', + 'automation' => 'setAutomation', + 'emailCampaigns' => 'setEmailCampaigns', + 'smsCampaigns' => 'setSmsCampaigns', + 'landingPages' => 'setLandingPages', + 'transactionalEmails' => 'setTransactionalEmails', + 'transactionalSms' => 'setTransactionalSms', + 'facebookAds' => 'setFacebookAds', + 'webPush' => 'setWebPush', + 'meetings' => 'setMeetings', + 'conversations' => 'setConversations', + 'crm' => 'setCrm' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'inbox' => 'getInbox', + 'whatsapp' => 'getWhatsapp', + 'automation' => 'getAutomation', + 'emailCampaigns' => 'getEmailCampaigns', + 'smsCampaigns' => 'getSmsCampaigns', + 'landingPages' => 'getLandingPages', + 'transactionalEmails' => 'getTransactionalEmails', + 'transactionalSms' => 'getTransactionalSms', + 'facebookAds' => 'getFacebookAds', + 'webPush' => 'getWebPush', + 'meetings' => 'getMeetings', + 'conversations' => 'getConversations', + 'crm' => 'getCrm' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['inbox'] = isset($data['inbox']) ? $data['inbox'] : null; + $this->container['whatsapp'] = isset($data['whatsapp']) ? $data['whatsapp'] : null; + $this->container['automation'] = isset($data['automation']) ? $data['automation'] : null; + $this->container['emailCampaigns'] = isset($data['emailCampaigns']) ? $data['emailCampaigns'] : null; + $this->container['smsCampaigns'] = isset($data['smsCampaigns']) ? $data['smsCampaigns'] : null; + $this->container['landingPages'] = isset($data['landingPages']) ? $data['landingPages'] : null; + $this->container['transactionalEmails'] = isset($data['transactionalEmails']) ? $data['transactionalEmails'] : null; + $this->container['transactionalSms'] = isset($data['transactionalSms']) ? $data['transactionalSms'] : null; + $this->container['facebookAds'] = isset($data['facebookAds']) ? $data['facebookAds'] : null; + $this->container['webPush'] = isset($data['webPush']) ? $data['webPush'] : null; + $this->container['meetings'] = isset($data['meetings']) ? $data['meetings'] : null; + $this->container['conversations'] = isset($data['conversations']) ? $data['conversations'] : null; + $this->container['crm'] = isset($data['crm']) ? $data['crm'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets inbox + * + * @return bool + */ + public function getInbox() + { + return $this->container['inbox']; + } + + /** + * Sets inbox + * + * @param bool $inbox Set this field to enable or disable Inbox on the sub-account / Not applicable on ENTv2 + * + * @return $this + */ + public function setInbox($inbox) + { + $this->container['inbox'] = $inbox; + + return $this; + } + + /** + * Gets whatsapp + * + * @return bool + */ + public function getWhatsapp() + { + return $this->container['whatsapp']; + } + + /** + * Sets whatsapp + * + * @param bool $whatsapp Set this field to enable or disable Whatsapp campaigns on the sub-account + * + * @return $this + */ + public function setWhatsapp($whatsapp) + { + $this->container['whatsapp'] = $whatsapp; + + return $this; + } + + /** + * Gets automation + * + * @return bool + */ + public function getAutomation() + { + return $this->container['automation']; + } + + /** + * Sets automation + * + * @param bool $automation Set this field to enable or disable Automation on the sub-account + * + * @return $this + */ + public function setAutomation($automation) + { + $this->container['automation'] = $automation; + + return $this; + } + + /** + * Gets emailCampaigns + * + * @return bool + */ + public function getEmailCampaigns() + { + return $this->container['emailCampaigns']; + } + + /** + * Sets emailCampaigns + * + * @param bool $emailCampaigns Set this field to enable or disable Email Campaigns on the sub-account + * + * @return $this + */ + public function setEmailCampaigns($emailCampaigns) + { + $this->container['emailCampaigns'] = $emailCampaigns; + + return $this; + } + + /** + * Gets smsCampaigns + * + * @return bool + */ + public function getSmsCampaigns() + { + return $this->container['smsCampaigns']; + } + + /** + * Sets smsCampaigns + * + * @param bool $smsCampaigns Set this field to enable or disable SMS Marketing on the sub-account + * + * @return $this + */ + public function setSmsCampaigns($smsCampaigns) + { + $this->container['smsCampaigns'] = $smsCampaigns; + + return $this; + } + + /** + * Gets landingPages + * + * @return bool + */ + public function getLandingPages() + { + return $this->container['landingPages']; + } + + /** + * Sets landingPages + * + * @param bool $landingPages Set this field to enable or disable Landing pages on the sub-account + * + * @return $this + */ + public function setLandingPages($landingPages) + { + $this->container['landingPages'] = $landingPages; + + return $this; + } + + /** + * Gets transactionalEmails + * + * @return bool + */ + public function getTransactionalEmails() + { + return $this->container['transactionalEmails']; + } + + /** + * Sets transactionalEmails + * + * @param bool $transactionalEmails Set this field to enable or disable Transactional Email on the sub-account + * + * @return $this + */ + public function setTransactionalEmails($transactionalEmails) + { + $this->container['transactionalEmails'] = $transactionalEmails; + + return $this; + } + + /** + * Gets transactionalSms + * + * @return bool + */ + public function getTransactionalSms() + { + return $this->container['transactionalSms']; + } + + /** + * Sets transactionalSms + * + * @param bool $transactionalSms Set this field to enable or disable Transactional SMS on the sub-account + * + * @return $this + */ + public function setTransactionalSms($transactionalSms) + { + $this->container['transactionalSms'] = $transactionalSms; + + return $this; + } + + /** + * Gets facebookAds + * + * @return bool + */ + public function getFacebookAds() + { + return $this->container['facebookAds']; + } + + /** + * Sets facebookAds + * + * @param bool $facebookAds Set this field to enable or disable Facebook ads on the sub-account + * + * @return $this + */ + public function setFacebookAds($facebookAds) + { + $this->container['facebookAds'] = $facebookAds; + + return $this; + } + + /** + * Gets webPush + * + * @return bool + */ + public function getWebPush() + { + return $this->container['webPush']; + } + + /** + * Sets webPush + * + * @param bool $webPush Set this field to enable or disable Web Push on the sub-account + * + * @return $this + */ + public function setWebPush($webPush) + { + $this->container['webPush'] = $webPush; + + return $this; + } + + /** + * Gets meetings + * + * @return bool + */ + public function getMeetings() + { + return $this->container['meetings']; + } + + /** + * Sets meetings + * + * @param bool $meetings Set this field to enable or disable Meetings on the sub-account + * + * @return $this + */ + public function setMeetings($meetings) + { + $this->container['meetings'] = $meetings; + + return $this; + } + + /** + * Gets conversations + * + * @return bool + */ + public function getConversations() + { + return $this->container['conversations']; + } + + /** + * Sets conversations + * + * @param bool $conversations Set this field to enable or disable Conversations on the sub-account + * + * @return $this + */ + public function setConversations($conversations) + { + $this->container['conversations'] = $conversations; + + return $this; + } + + /** + * Gets crm + * + * @return bool + */ + public function getCrm() + { + return $this->container['crm']; + } + + /** + * Sets crm + * + * @param bool $crm Set this field to enable or disable Sales CRM on the sub-account + * + * @return $this + */ + public function setCrm($crm) + { + $this->container['crm'] = $crm; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponse.php b/vendor/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponse.php new file mode 100644 index 0000000..0c1deca --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponse.php @@ -0,0 +1,395 @@ + 'string', + 'email' => 'string', + 'companyName' => 'string', + 'planInfo' => '\Brevo\Client\Model\SubAccountDetailsResponsePlanInfo' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null, + 'email' => null, + 'companyName' => null, + 'planInfo' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'email' => 'email', + 'companyName' => 'companyName', + 'planInfo' => 'planInfo' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'email' => 'setEmail', + 'companyName' => 'setCompanyName', + 'planInfo' => 'setPlanInfo' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'email' => 'getEmail', + 'companyName' => 'getCompanyName', + 'planInfo' => 'getPlanInfo' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['companyName'] = isset($data['companyName']) ? $data['companyName'] : null; + $this->container['planInfo'] = isset($data['planInfo']) ? $data['planInfo'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the sub-account user + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email Email id of the sub-account organization + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets companyName + * + * @return string + */ + public function getCompanyName() + { + return $this->container['companyName']; + } + + /** + * Sets companyName + * + * @param string $companyName Sub-account company name + * + * @return $this + */ + public function setCompanyName($companyName) + { + $this->container['companyName'] = $companyName; + + return $this; + } + + /** + * Gets planInfo + * + * @return \Brevo\Client\Model\SubAccountDetailsResponsePlanInfo + */ + public function getPlanInfo() + { + return $this->container['planInfo']; + } + + /** + * Sets planInfo + * + * @param \Brevo\Client\Model\SubAccountDetailsResponsePlanInfo $planInfo planInfo + * + * @return $this + */ + public function setPlanInfo($planInfo) + { + $this->container['planInfo'] = $planInfo; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponsePlanInfo.php b/vendor/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponsePlanInfo.php new file mode 100644 index 0000000..5283b78 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponsePlanInfo.php @@ -0,0 +1,366 @@ + '\Brevo\Client\Model\SubAccountDetailsResponsePlanInfoCredits', + 'features' => '\Brevo\Client\Model\SubAccountDetailsResponsePlanInfoFeatures', + 'planType' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'credits' => null, + 'features' => null, + 'planType' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'credits' => 'credits', + 'features' => 'features', + 'planType' => 'planType' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'credits' => 'setCredits', + 'features' => 'setFeatures', + 'planType' => 'setPlanType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'credits' => 'getCredits', + 'features' => 'getFeatures', + 'planType' => 'getPlanType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['credits'] = isset($data['credits']) ? $data['credits'] : null; + $this->container['features'] = isset($data['features']) ? $data['features'] : null; + $this->container['planType'] = isset($data['planType']) ? $data['planType'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets credits + * + * @return \Brevo\Client\Model\SubAccountDetailsResponsePlanInfoCredits + */ + public function getCredits() + { + return $this->container['credits']; + } + + /** + * Sets credits + * + * @param \Brevo\Client\Model\SubAccountDetailsResponsePlanInfoCredits $credits credits + * + * @return $this + */ + public function setCredits($credits) + { + $this->container['credits'] = $credits; + + return $this; + } + + /** + * Gets features + * + * @return \Brevo\Client\Model\SubAccountDetailsResponsePlanInfoFeatures + */ + public function getFeatures() + { + return $this->container['features']; + } + + /** + * Sets features + * + * @param \Brevo\Client\Model\SubAccountDetailsResponsePlanInfoFeatures $features features + * + * @return $this + */ + public function setFeatures($features) + { + $this->container['features'] = $features; + + return $this; + } + + /** + * Gets planType + * + * @return string + */ + public function getPlanType() + { + return $this->container['planType']; + } + + /** + * Sets planType + * + * @param string $planType type of the plan + * + * @return $this + */ + public function setPlanType($planType) + { + $this->container['planType'] = $planType; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponsePlanInfoCredits.php b/vendor/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponsePlanInfoCredits.php new file mode 100644 index 0000000..425dace --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponsePlanInfoCredits.php @@ -0,0 +1,336 @@ + 'int', + 'emails' => '\Brevo\Client\Model\SubAccountDetailsResponsePlanInfoCreditsEmails' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'sms' => 'int64', + 'emails' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'sms' => 'sms', + 'emails' => 'emails' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'sms' => 'setSms', + 'emails' => 'setEmails' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'sms' => 'getSms', + 'emails' => 'getEmails' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['sms'] = isset($data['sms']) ? $data['sms'] : null; + $this->container['emails'] = isset($data['emails']) ? $data['emails'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets sms + * + * @return int + */ + public function getSms() + { + return $this->container['sms']; + } + + /** + * Sets sms + * + * @param int $sms SMS credits remaining on the sub-account + * + * @return $this + */ + public function setSms($sms) + { + $this->container['sms'] = $sms; + + return $this; + } + + /** + * Gets emails + * + * @return \Brevo\Client\Model\SubAccountDetailsResponsePlanInfoCreditsEmails + */ + public function getEmails() + { + return $this->container['emails']; + } + + /** + * Sets emails + * + * @param \Brevo\Client\Model\SubAccountDetailsResponsePlanInfoCreditsEmails $emails emails + * + * @return $this + */ + public function setEmails($emails) + { + $this->container['emails'] = $emails; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponsePlanInfoCreditsEmails.php b/vendor/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponsePlanInfoCreditsEmails.php new file mode 100644 index 0000000..dd1b582 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponsePlanInfoCreditsEmails.php @@ -0,0 +1,336 @@ + 'int', + 'remaining' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'quantity' => 'int64', + 'remaining' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'quantity' => 'quantity', + 'remaining' => 'remaining' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'quantity' => 'setQuantity', + 'remaining' => 'setRemaining' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'quantity' => 'getQuantity', + 'remaining' => 'getRemaining' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['quantity'] = isset($data['quantity']) ? $data['quantity'] : null; + $this->container['remaining'] = isset($data['remaining']) ? $data['remaining'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets quantity + * + * @return int + */ + public function getQuantity() + { + return $this->container['quantity']; + } + + /** + * Sets quantity + * + * @param int $quantity Quantity of email messaging limits provided + * + * @return $this + */ + public function setQuantity($quantity) + { + $this->container['quantity'] = $quantity; + + return $this; + } + + /** + * Gets remaining + * + * @return int + */ + public function getRemaining() + { + return $this->container['remaining']; + } + + /** + * Sets remaining + * + * @param int $remaining Available email messaging limits for use + * + * @return $this + */ + public function setRemaining($remaining) + { + $this->container['remaining'] = $remaining; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponsePlanInfoFeatures.php b/vendor/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponsePlanInfoFeatures.php new file mode 100644 index 0000000..b79a45f --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponsePlanInfoFeatures.php @@ -0,0 +1,366 @@ + '\Brevo\Client\Model\SubAccountDetailsResponsePlanInfoFeaturesInbox', + 'landingPage' => '\Brevo\Client\Model\SubAccountDetailsResponsePlanInfoFeaturesLandingPage', + 'users' => '\Brevo\Client\Model\SubAccountDetailsResponsePlanInfoFeaturesUsers' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'inbox' => null, + 'landingPage' => null, + 'users' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'inbox' => 'inbox', + 'landingPage' => 'landingPage', + 'users' => 'users' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'inbox' => 'setInbox', + 'landingPage' => 'setLandingPage', + 'users' => 'setUsers' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'inbox' => 'getInbox', + 'landingPage' => 'getLandingPage', + 'users' => 'getUsers' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['inbox'] = isset($data['inbox']) ? $data['inbox'] : null; + $this->container['landingPage'] = isset($data['landingPage']) ? $data['landingPage'] : null; + $this->container['users'] = isset($data['users']) ? $data['users'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets inbox + * + * @return \Brevo\Client\Model\SubAccountDetailsResponsePlanInfoFeaturesInbox + */ + public function getInbox() + { + return $this->container['inbox']; + } + + /** + * Sets inbox + * + * @param \Brevo\Client\Model\SubAccountDetailsResponsePlanInfoFeaturesInbox $inbox inbox + * + * @return $this + */ + public function setInbox($inbox) + { + $this->container['inbox'] = $inbox; + + return $this; + } + + /** + * Gets landingPage + * + * @return \Brevo\Client\Model\SubAccountDetailsResponsePlanInfoFeaturesLandingPage + */ + public function getLandingPage() + { + return $this->container['landingPage']; + } + + /** + * Sets landingPage + * + * @param \Brevo\Client\Model\SubAccountDetailsResponsePlanInfoFeaturesLandingPage $landingPage landingPage + * + * @return $this + */ + public function setLandingPage($landingPage) + { + $this->container['landingPage'] = $landingPage; + + return $this; + } + + /** + * Gets users + * + * @return \Brevo\Client\Model\SubAccountDetailsResponsePlanInfoFeaturesUsers + */ + public function getUsers() + { + return $this->container['users']; + } + + /** + * Sets users + * + * @param \Brevo\Client\Model\SubAccountDetailsResponsePlanInfoFeaturesUsers $users users + * + * @return $this + */ + public function setUsers($users) + { + $this->container['users'] = $users; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponsePlanInfoFeaturesInbox.php b/vendor/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponsePlanInfoFeaturesInbox.php new file mode 100644 index 0000000..76e2f65 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponsePlanInfoFeaturesInbox.php @@ -0,0 +1,336 @@ + 'int', + 'remaining' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'quantity' => 'int64', + 'remaining' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'quantity' => 'quantity', + 'remaining' => 'remaining' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'quantity' => 'setQuantity', + 'remaining' => 'setRemaining' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'quantity' => 'getQuantity', + 'remaining' => 'getRemaining' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['quantity'] = isset($data['quantity']) ? $data['quantity'] : null; + $this->container['remaining'] = isset($data['remaining']) ? $data['remaining'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets quantity + * + * @return int + */ + public function getQuantity() + { + return $this->container['quantity']; + } + + /** + * Sets quantity + * + * @param int $quantity Quantity of inbox provided + * + * @return $this + */ + public function setQuantity($quantity) + { + $this->container['quantity'] = $quantity; + + return $this; + } + + /** + * Gets remaining + * + * @return int + */ + public function getRemaining() + { + return $this->container['remaining']; + } + + /** + * Sets remaining + * + * @param int $remaining Available inboxes for use + * + * @return $this + */ + public function setRemaining($remaining) + { + $this->container['remaining'] = $remaining; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponsePlanInfoFeaturesLandingPage.php b/vendor/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponsePlanInfoFeaturesLandingPage.php new file mode 100644 index 0000000..3bce42d --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponsePlanInfoFeaturesLandingPage.php @@ -0,0 +1,336 @@ + 'int', + 'remaining' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'quantity' => 'int64', + 'remaining' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'quantity' => 'quantity', + 'remaining' => 'remaining' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'quantity' => 'setQuantity', + 'remaining' => 'setRemaining' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'quantity' => 'getQuantity', + 'remaining' => 'getRemaining' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['quantity'] = isset($data['quantity']) ? $data['quantity'] : null; + $this->container['remaining'] = isset($data['remaining']) ? $data['remaining'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets quantity + * + * @return int + */ + public function getQuantity() + { + return $this->container['quantity']; + } + + /** + * Sets quantity + * + * @param int $quantity Quantity of landing pages provided + * + * @return $this + */ + public function setQuantity($quantity) + { + $this->container['quantity'] = $quantity; + + return $this; + } + + /** + * Gets remaining + * + * @return int + */ + public function getRemaining() + { + return $this->container['remaining']; + } + + /** + * Sets remaining + * + * @param int $remaining Available landing pages for use + * + * @return $this + */ + public function setRemaining($remaining) + { + $this->container['remaining'] = $remaining; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponsePlanInfoFeaturesUsers.php b/vendor/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponsePlanInfoFeaturesUsers.php new file mode 100644 index 0000000..3700796 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/SubAccountDetailsResponsePlanInfoFeaturesUsers.php @@ -0,0 +1,336 @@ + 'int', + 'remaining' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'quantity' => 'int64', + 'remaining' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'quantity' => 'quantity', + 'remaining' => 'remaining' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'quantity' => 'setQuantity', + 'remaining' => 'setRemaining' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'quantity' => 'getQuantity', + 'remaining' => 'getRemaining' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['quantity'] = isset($data['quantity']) ? $data['quantity'] : null; + $this->container['remaining'] = isset($data['remaining']) ? $data['remaining'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets quantity + * + * @return int + */ + public function getQuantity() + { + return $this->container['quantity']; + } + + /** + * Sets quantity + * + * @param int $quantity Quantity of multi-account's provided + * + * @return $this + */ + public function setQuantity($quantity) + { + $this->container['quantity'] = $quantity; + + return $this; + } + + /** + * Gets remaining + * + * @return int + */ + public function getRemaining() + { + return $this->container['remaining']; + } + + /** + * Sets remaining + * + * @param int $remaining Available multi-accounts for use + * + * @return $this + */ + public function setRemaining($remaining) + { + $this->container['remaining'] = $remaining; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/SubAccountUpdatePlanRequest.php b/vendor/getbrevo/brevo-php/lib/Model/SubAccountUpdatePlanRequest.php new file mode 100644 index 0000000..385a1f0 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/SubAccountUpdatePlanRequest.php @@ -0,0 +1,336 @@ + '\Brevo\Client\Model\SubAccountUpdatePlanRequestCredits', + 'features' => '\Brevo\Client\Model\SubAccountUpdatePlanRequestFeatures' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'credits' => null, + 'features' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'credits' => 'credits', + 'features' => 'features' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'credits' => 'setCredits', + 'features' => 'setFeatures' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'credits' => 'getCredits', + 'features' => 'getFeatures' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['credits'] = isset($data['credits']) ? $data['credits'] : null; + $this->container['features'] = isset($data['features']) ? $data['features'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets credits + * + * @return \Brevo\Client\Model\SubAccountUpdatePlanRequestCredits + */ + public function getCredits() + { + return $this->container['credits']; + } + + /** + * Sets credits + * + * @param \Brevo\Client\Model\SubAccountUpdatePlanRequestCredits $credits credits + * + * @return $this + */ + public function setCredits($credits) + { + $this->container['credits'] = $credits; + + return $this; + } + + /** + * Gets features + * + * @return \Brevo\Client\Model\SubAccountUpdatePlanRequestFeatures + */ + public function getFeatures() + { + return $this->container['features']; + } + + /** + * Sets features + * + * @param \Brevo\Client\Model\SubAccountUpdatePlanRequestFeatures $features features + * + * @return $this + */ + public function setFeatures($features) + { + $this->container['features'] = $features; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/SubAccountUpdatePlanRequestCredits.php b/vendor/getbrevo/brevo-php/lib/Model/SubAccountUpdatePlanRequestCredits.php new file mode 100644 index 0000000..c116f68 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/SubAccountUpdatePlanRequestCredits.php @@ -0,0 +1,306 @@ + 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'email' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'email' => 'email' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'email' => 'setEmail' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'email' => 'getEmail' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets email + * + * @return int + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param int $email Number of email credits + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/SubAccountUpdatePlanRequestFeatures.php b/vendor/getbrevo/brevo-php/lib/Model/SubAccountUpdatePlanRequestFeatures.php new file mode 100644 index 0000000..d0d20fb --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/SubAccountUpdatePlanRequestFeatures.php @@ -0,0 +1,366 @@ + 'int', + 'landingPage' => 'int', + 'inbox' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'users' => 'int64', + 'landingPage' => 'int64', + 'inbox' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'users' => 'users', + 'landingPage' => 'landingPage', + 'inbox' => 'inbox' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'users' => 'setUsers', + 'landingPage' => 'setLandingPage', + 'inbox' => 'setInbox' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'users' => 'getUsers', + 'landingPage' => 'getLandingPage', + 'inbox' => 'getInbox' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['users'] = isset($data['users']) ? $data['users'] : null; + $this->container['landingPage'] = isset($data['landingPage']) ? $data['landingPage'] : null; + $this->container['inbox'] = isset($data['inbox']) ? $data['inbox'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets users + * + * @return int + */ + public function getUsers() + { + return $this->container['users']; + } + + /** + * Sets users + * + * @param int $users Number of multi-users + * + * @return $this + */ + public function setUsers($users) + { + $this->container['users'] = $users; + + return $this; + } + + /** + * Gets landingPage + * + * @return int + */ + public function getLandingPage() + { + return $this->container['landingPage']; + } + + /** + * Sets landingPage + * + * @param int $landingPage Number of landing pages / Not required on ENTv2 + * + * @return $this + */ + public function setLandingPage($landingPage) + { + $this->container['landingPage'] = $landingPage; + + return $this; + } + + /** + * Gets inbox + * + * @return int + */ + public function getInbox() + { + return $this->container['inbox']; + } + + /** + * Sets inbox + * + * @param int $inbox Number of inboxes / Not required on ENTv2 + * + * @return $this + */ + public function setInbox($inbox) + { + $this->container['inbox'] = $inbox; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/SubAccountsResponse.php b/vendor/getbrevo/brevo-php/lib/Model/SubAccountsResponse.php new file mode 100644 index 0000000..6f6e088 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/SubAccountsResponse.php @@ -0,0 +1,335 @@ + 'int', + 'subAccounts' => '\Brevo\Client\Model\SubAccountsResponseSubAccounts[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'count' => null, + 'subAccounts' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'count' => 'count', + 'subAccounts' => 'subAccounts' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'count' => 'setCount', + 'subAccounts' => 'setSubAccounts' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'count' => 'getCount', + 'subAccounts' => 'getSubAccounts' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['count'] = isset($data['count']) ? $data['count'] : null; + $this->container['subAccounts'] = isset($data['subAccounts']) ? $data['subAccounts'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets count + * + * @return int + */ + public function getCount() + { + return $this->container['count']; + } + + /** + * Sets count + * + * @param int $count Total number of subaccounts + * + * @return $this + */ + public function setCount($count) + { + $this->container['count'] = $count; + + return $this; + } + + /** + * Gets subAccounts + * + * @return \Brevo\Client\Model\SubAccountsResponseSubAccounts[] + */ + public function getSubAccounts() + { + return $this->container['subAccounts']; + } + + /** + * Sets subAccounts + * + * @param \Brevo\Client\Model\SubAccountsResponseSubAccounts[] $subAccounts subAccounts + * + * @return $this + */ + public function setSubAccounts($subAccounts) + { + $this->container['subAccounts'] = $subAccounts; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/SubAccountsResponseSubAccounts.php b/vendor/getbrevo/brevo-php/lib/Model/SubAccountsResponseSubAccounts.php new file mode 100644 index 0000000..1641dfa --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/SubAccountsResponseSubAccounts.php @@ -0,0 +1,407 @@ + 'int', + 'companyName' => 'string', + 'active' => 'bool', + 'createdAt' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'int64', + 'companyName' => null, + 'active' => null, + 'createdAt' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'companyName' => 'companyName', + 'active' => 'active', + 'createdAt' => 'createdAt' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'companyName' => 'setCompanyName', + 'active' => 'setActive', + 'createdAt' => 'setCreatedAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'companyName' => 'getCompanyName', + 'active' => 'getActive', + 'createdAt' => 'getCreatedAt' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['companyName'] = isset($data['companyName']) ? $data['companyName'] : null; + $this->container['active'] = isset($data['active']) ? $data['active'] : null; + $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['companyName'] === null) { + $invalidProperties[] = "'companyName' can't be null"; + } + if ($this->container['active'] === null) { + $invalidProperties[] = "'active' can't be null"; + } + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id id of the sub-account + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets companyName + * + * @return string + */ + public function getCompanyName() + { + return $this->container['companyName']; + } + + /** + * Sets companyName + * + * @param string $companyName Name of the sub-account company + * + * @return $this + */ + public function setCompanyName($companyName) + { + $this->container['companyName'] = $companyName; + + return $this; + } + + /** + * Gets active + * + * @return bool + */ + public function getActive() + { + return $this->container['active']; + } + + /** + * Sets active + * + * @param bool $active Whether the sub-account is active or not + * + * @return $this + */ + public function setActive($active) + { + $this->container['active'] = $active; + + return $this; + } + + /** + * Gets createdAt + * + * @return int + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param int $createdAt Timestamp when the sub-account was created + * + * @return $this + */ + public function setCreatedAt($createdAt) + { + $this->container['createdAt'] = $createdAt; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/Task.php b/vendor/getbrevo/brevo-php/lib/Model/Task.php new file mode 100644 index 0000000..08d27b3 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/Task.php @@ -0,0 +1,462 @@ + 'string', + 'taskTypeId' => 'string', + 'name' => 'string', + 'contactsIds' => 'int[]', + 'dealsIds' => 'string[]', + 'companiesIds' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => null, + 'taskTypeId' => null, + 'name' => null, + 'contactsIds' => null, + 'dealsIds' => null, + 'companiesIds' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'taskTypeId' => 'taskTypeId', + 'name' => 'name', + 'contactsIds' => 'contactsIds', + 'dealsIds' => 'dealsIds', + 'companiesIds' => 'companiesIds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'taskTypeId' => 'setTaskTypeId', + 'name' => 'setName', + 'contactsIds' => 'setContactsIds', + 'dealsIds' => 'setDealsIds', + 'companiesIds' => 'setCompaniesIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'taskTypeId' => 'getTaskTypeId', + 'name' => 'getName', + 'contactsIds' => 'getContactsIds', + 'dealsIds' => 'getDealsIds', + 'companiesIds' => 'getCompaniesIds' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['taskTypeId'] = isset($data['taskTypeId']) ? $data['taskTypeId'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['contactsIds'] = isset($data['contactsIds']) ? $data['contactsIds'] : null; + $this->container['dealsIds'] = isset($data['dealsIds']) ? $data['dealsIds'] : null; + $this->container['companiesIds'] = isset($data['companiesIds']) ? $data['companiesIds'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['taskTypeId'] === null) { + $invalidProperties[] = "'taskTypeId' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Unique task id + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets taskTypeId + * + * @return string + */ + public function getTaskTypeId() + { + return $this->container['taskTypeId']; + } + + /** + * Sets taskTypeId + * + * @param string $taskTypeId Id for type of task e.g Call / Email / Meeting etc. + * + * @return $this + */ + public function setTaskTypeId($taskTypeId) + { + $this->container['taskTypeId'] = $taskTypeId; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of task + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets contactsIds + * + * @return int[] + */ + public function getContactsIds() + { + return $this->container['contactsIds']; + } + + /** + * Sets contactsIds + * + * @param int[] $contactsIds Contact ids for contacts linked to this task + * + * @return $this + */ + public function setContactsIds($contactsIds) + { + $this->container['contactsIds'] = $contactsIds; + + return $this; + } + + /** + * Gets dealsIds + * + * @return string[] + */ + public function getDealsIds() + { + return $this->container['dealsIds']; + } + + /** + * Sets dealsIds + * + * @param string[] $dealsIds Deal ids for deals a task is linked to + * + * @return $this + */ + public function setDealsIds($dealsIds) + { + $this->container['dealsIds'] = $dealsIds; + + return $this; + } + + /** + * Gets companiesIds + * + * @return string[] + */ + public function getCompaniesIds() + { + return $this->container['companiesIds']; + } + + /** + * Sets companiesIds + * + * @param string[] $companiesIds Companies ids for companies a task is linked to + * + * @return $this + */ + public function setCompaniesIds($companiesIds) + { + $this->container['companiesIds'] = $companiesIds; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/TaskList.php b/vendor/getbrevo/brevo-php/lib/Model/TaskList.php new file mode 100644 index 0000000..51115b6 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/TaskList.php @@ -0,0 +1,306 @@ + '\Brevo\Client\Model\Task[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'items' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'items' => 'items' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'items' => 'setItems' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'items' => 'getItems' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['items'] = isset($data['items']) ? $data['items'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets items + * + * @return \Brevo\Client\Model\Task[] + */ + public function getItems() + { + return $this->container['items']; + } + + /** + * Sets items + * + * @param \Brevo\Client\Model\Task[] $items List of tasks + * + * @return $this + */ + public function setItems($items) + { + $this->container['items'] = $items; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/TaskReminder.php b/vendor/getbrevo/brevo-php/lib/Model/TaskReminder.php new file mode 100644 index 0000000..fb84ad0 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/TaskReminder.php @@ -0,0 +1,411 @@ + 'int', + 'unit' => 'string', + 'types' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'value' => null, + 'unit' => null, + 'types' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'value' => 'value', + 'unit' => 'unit', + 'types' => 'types' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'value' => 'setValue', + 'unit' => 'setUnit', + 'types' => 'setTypes' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'value' => 'getValue', + 'unit' => 'getUnit', + 'types' => 'getTypes' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const UNIT_MINUTES = 'minutes'; + const UNIT_HOURS = 'hours'; + const UNIT_WEEKS = 'weeks'; + const UNIT_DAYS = 'days'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getUnitAllowableValues() + { + return [ + self::UNIT_MINUTES, + self::UNIT_HOURS, + self::UNIT_WEEKS, + self::UNIT_DAYS, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['value'] = isset($data['value']) ? $data['value'] : null; + $this->container['unit'] = isset($data['unit']) ? $data['unit'] : null; + $this->container['types'] = isset($data['types']) ? $data['types'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['value'] === null) { + $invalidProperties[] = "'value' can't be null"; + } + if ($this->container['unit'] === null) { + $invalidProperties[] = "'unit' can't be null"; + } + $allowedValues = $this->getUnitAllowableValues(); + if (!is_null($this->container['unit']) && !in_array($this->container['unit'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'unit', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['types'] === null) { + $invalidProperties[] = "'types' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets value + * + * @return int + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param int $value Value of time unit before reminder is to be sent + * + * @return $this + */ + public function setValue($value) + { + $this->container['value'] = $value; + + return $this; + } + + /** + * Gets unit + * + * @return string + */ + public function getUnit() + { + return $this->container['unit']; + } + + /** + * Sets unit + * + * @param string $unit Unit of time before reminder is to be sent + * + * @return $this + */ + public function setUnit($unit) + { + $allowedValues = $this->getUnitAllowableValues(); + if (!in_array($unit, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'unit', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['unit'] = $unit; + + return $this; + } + + /** + * Gets types + * + * @return string[] + */ + public function getTypes() + { + return $this->container['types']; + } + + /** + * Sets types + * + * @param string[] $types Type of task reminder e.g email, push + * + * @return $this + */ + public function setTypes($types) + { + $this->container['types'] = $types; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/TaskTypes.php b/vendor/getbrevo/brevo-php/lib/Model/TaskTypes.php new file mode 100644 index 0000000..305351e --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/TaskTypes.php @@ -0,0 +1,336 @@ + 'string', + 'title' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => null, + 'title' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'title' => 'title' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'title' => 'setTitle' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'title' => 'getTitle' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['title'] = isset($data['title']) ? $data['title'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Id of task type + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets title + * + * @return string + */ + public function getTitle() + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string $title Title of task type + * + * @return $this + */ + public function setTitle($title) + { + $this->container['title'] = $title; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/UpdateAttribute.php b/vendor/getbrevo/brevo-php/lib/Model/UpdateAttribute.php new file mode 100644 index 0000000..d286e99 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/UpdateAttribute.php @@ -0,0 +1,335 @@ + 'string', + 'enumeration' => '\Brevo\Client\Model\UpdateAttributeEnumeration[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'value' => null, + 'enumeration' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'value' => 'value', + 'enumeration' => 'enumeration' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'value' => 'setValue', + 'enumeration' => 'setEnumeration' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'value' => 'getValue', + 'enumeration' => 'getEnumeration' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['value'] = isset($data['value']) ? $data['value'] : null; + $this->container['enumeration'] = isset($data['enumeration']) ? $data['enumeration'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets value + * + * @return string + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param string $value Value of the attribute to update. Use only if the attribute's category is 'calculated' or 'global' + * + * @return $this + */ + public function setValue($value) + { + $this->container['value'] = $value; + + return $this; + } + + /** + * Gets enumeration + * + * @return \Brevo\Client\Model\UpdateAttributeEnumeration[] + */ + public function getEnumeration() + { + return $this->container['enumeration']; + } + + /** + * Sets enumeration + * + * @param \Brevo\Client\Model\UpdateAttributeEnumeration[] $enumeration List of the values and labels that the attribute can take. Use only if the attribute's category is \"category\". For example, [{\"value\":1, \"label\":\"male\"}, {\"value\":2, \"label\":\"female\"}] + * + * @return $this + */ + public function setEnumeration($enumeration) + { + $this->container['enumeration'] = $enumeration; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/UpdateAttributeEnumeration.php b/vendor/getbrevo/brevo-php/lib/Model/UpdateAttributeEnumeration.php new file mode 100644 index 0000000..81d9b66 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/UpdateAttributeEnumeration.php @@ -0,0 +1,341 @@ + 'int', + 'label' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'value' => null, + 'label' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'value' => 'value', + 'label' => 'label' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'value' => 'setValue', + 'label' => 'setLabel' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'value' => 'getValue', + 'label' => 'getLabel' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['value'] = isset($data['value']) ? $data['value'] : null; + $this->container['label'] = isset($data['label']) ? $data['label'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['value'] === null) { + $invalidProperties[] = "'value' can't be null"; + } + if ($this->container['label'] === null) { + $invalidProperties[] = "'label' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets value + * + * @return int + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param int $value Id of the value + * + * @return $this + */ + public function setValue($value) + { + $this->container['value'] = $value; + + return $this; + } + + /** + * Gets label + * + * @return string + */ + public function getLabel() + { + return $this->container['label']; + } + + /** + * Sets label + * + * @param string $label Label of the value + * + * @return $this + */ + public function setLabel($label) + { + $this->container['label'] = $label; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/UpdateBatchContacts.php b/vendor/getbrevo/brevo-php/lib/Model/UpdateBatchContacts.php new file mode 100644 index 0000000..f922dd7 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/UpdateBatchContacts.php @@ -0,0 +1,305 @@ + '\Brevo\Client\Model\UpdateBatchContactsContacts[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'contacts' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'contacts' => 'contacts' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'contacts' => 'setContacts' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'contacts' => 'getContacts' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['contacts'] = isset($data['contacts']) ? $data['contacts'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets contacts + * + * @return \Brevo\Client\Model\UpdateBatchContactsContacts[] + */ + public function getContacts() + { + return $this->container['contacts']; + } + + /** + * Sets contacts + * + * @param \Brevo\Client\Model\UpdateBatchContactsContacts[] $contacts List of contacts to be updated + * + * @return $this + */ + public function setContacts($contacts) + { + $this->container['contacts'] = $contacts; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/UpdateBatchContactsContacts.php b/vendor/getbrevo/brevo-php/lib/Model/UpdateBatchContactsContacts.php new file mode 100644 index 0000000..5de1c5c --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/UpdateBatchContactsContacts.php @@ -0,0 +1,575 @@ + 'string', + 'id' => 'int', + 'sms' => 'string', + 'extId' => 'string', + 'attributes' => 'map[string,object]', + 'emailBlacklisted' => 'bool', + 'smsBlacklisted' => 'bool', + 'listIds' => 'int[]', + 'unlinkListIds' => 'int[]', + 'smtpBlacklistSender' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'email' => 'email', + 'id' => 'int64', + 'sms' => null, + 'extId' => null, + 'attributes' => null, + 'emailBlacklisted' => null, + 'smsBlacklisted' => null, + 'listIds' => 'int64', + 'unlinkListIds' => 'int64', + 'smtpBlacklistSender' => 'email' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'email' => 'email', + 'id' => 'id', + 'sms' => 'sms', + 'extId' => 'ext_id', + 'attributes' => 'attributes', + 'emailBlacklisted' => 'emailBlacklisted', + 'smsBlacklisted' => 'smsBlacklisted', + 'listIds' => 'listIds', + 'unlinkListIds' => 'unlinkListIds', + 'smtpBlacklistSender' => 'smtpBlacklistSender' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'email' => 'setEmail', + 'id' => 'setId', + 'sms' => 'setSms', + 'extId' => 'setExtId', + 'attributes' => 'setAttributes', + 'emailBlacklisted' => 'setEmailBlacklisted', + 'smsBlacklisted' => 'setSmsBlacklisted', + 'listIds' => 'setListIds', + 'unlinkListIds' => 'setUnlinkListIds', + 'smtpBlacklistSender' => 'setSmtpBlacklistSender' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'email' => 'getEmail', + 'id' => 'getId', + 'sms' => 'getSms', + 'extId' => 'getExtId', + 'attributes' => 'getAttributes', + 'emailBlacklisted' => 'getEmailBlacklisted', + 'smsBlacklisted' => 'getSmsBlacklisted', + 'listIds' => 'getListIds', + 'unlinkListIds' => 'getUnlinkListIds', + 'smtpBlacklistSender' => 'getSmtpBlacklistSender' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['sms'] = isset($data['sms']) ? $data['sms'] : null; + $this->container['extId'] = isset($data['extId']) ? $data['extId'] : null; + $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; + $this->container['emailBlacklisted'] = isset($data['emailBlacklisted']) ? $data['emailBlacklisted'] : null; + $this->container['smsBlacklisted'] = isset($data['smsBlacklisted']) ? $data['smsBlacklisted'] : null; + $this->container['listIds'] = isset($data['listIds']) ? $data['listIds'] : null; + $this->container['unlinkListIds'] = isset($data['unlinkListIds']) ? $data['unlinkListIds'] : null; + $this->container['smtpBlacklistSender'] = isset($data['smtpBlacklistSender']) ? $data['smtpBlacklistSender'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email Email address of the user to be updated (For each operation only pass one of the supported contact identifiers. Email, id or sms) + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id id of the user to be updated (For each operation only pass one of the supported contact identifiers. Email, id or sms) + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets sms + * + * @return string + */ + public function getSms() + { + return $this->container['sms']; + } + + /** + * Sets sms + * + * @param string $sms SMS of the user to be updated (For each operation only pass one of the supported contact identifiers. Email, id or sms) + * + * @return $this + */ + public function setSms($sms) + { + $this->container['sms'] = $sms; + + return $this; + } + + /** + * Gets extId + * + * @return string + */ + public function getExtId() + { + return $this->container['extId']; + } + + /** + * Sets extId + * + * @param string $extId Pass your own Id to update ext_id of a contact. + * + * @return $this + */ + public function setExtId($extId) + { + $this->container['extId'] = $extId; + + return $this; + } + + /** + * Gets attributes + * + * @return map[string,object] + */ + public function getAttributes() + { + return $this->container['attributes']; + } + + /** + * Sets attributes + * + * @param map[string,object] $attributes Pass the set of attributes to be updated. **These attributes must be present in your account**. To update existing email address of a contact with the new one please pass EMAIL in attribtes. For example, **{ \"EMAIL\":\"newemail@domain.com\", \"FNAME\":\"Ellie\", \"LNAME\":\"Roger\"}**. Keep in mind transactional attributes can be updated the same way as normal attributes. Mobile Number in **SMS** field should be passed with proper country code. For example: **{\"SMS\":\"+91xxxxxxxxxx\"} or {\"SMS\":\"0091xxxxxxxxxx\"}** + * + * @return $this + */ + public function setAttributes($attributes) + { + $this->container['attributes'] = $attributes; + + return $this; + } + + /** + * Gets emailBlacklisted + * + * @return bool + */ + public function getEmailBlacklisted() + { + return $this->container['emailBlacklisted']; + } + + /** + * Sets emailBlacklisted + * + * @param bool $emailBlacklisted Set/unset this field to blacklist/allow the contact for emails (emailBlacklisted = true) + * + * @return $this + */ + public function setEmailBlacklisted($emailBlacklisted) + { + $this->container['emailBlacklisted'] = $emailBlacklisted; + + return $this; + } + + /** + * Gets smsBlacklisted + * + * @return bool + */ + public function getSmsBlacklisted() + { + return $this->container['smsBlacklisted']; + } + + /** + * Sets smsBlacklisted + * + * @param bool $smsBlacklisted Set/unset this field to blacklist/allow the contact for SMS (smsBlacklisted = true) + * + * @return $this + */ + public function setSmsBlacklisted($smsBlacklisted) + { + $this->container['smsBlacklisted'] = $smsBlacklisted; + + return $this; + } + + /** + * Gets listIds + * + * @return int[] + */ + public function getListIds() + { + return $this->container['listIds']; + } + + /** + * Sets listIds + * + * @param int[] $listIds Ids of the lists to add the contact to + * + * @return $this + */ + public function setListIds($listIds) + { + $this->container['listIds'] = $listIds; + + return $this; + } + + /** + * Gets unlinkListIds + * + * @return int[] + */ + public function getUnlinkListIds() + { + return $this->container['unlinkListIds']; + } + + /** + * Sets unlinkListIds + * + * @param int[] $unlinkListIds Ids of the lists to remove the contact from + * + * @return $this + */ + public function setUnlinkListIds($unlinkListIds) + { + $this->container['unlinkListIds'] = $unlinkListIds; + + return $this; + } + + /** + * Gets smtpBlacklistSender + * + * @return string[] + */ + public function getSmtpBlacklistSender() + { + return $this->container['smtpBlacklistSender']; + } + + /** + * Sets smtpBlacklistSender + * + * @param string[] $smtpBlacklistSender transactional email forbidden sender for contact. Use only for email Contact + * + * @return $this + */ + public function setSmtpBlacklistSender($smtpBlacklistSender) + { + $this->container['smtpBlacklistSender'] = $smtpBlacklistSender; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/UpdateBatchContactsModel.php b/vendor/getbrevo/brevo-php/lib/Model/UpdateBatchContactsModel.php new file mode 100644 index 0000000..afe0a6d --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/UpdateBatchContactsModel.php @@ -0,0 +1,335 @@ + 'int[]', + 'failureIds' => 'int[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'successIds' => 'int64', + 'failureIds' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'successIds' => 'successIds', + 'failureIds' => 'failureIds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'successIds' => 'setSuccessIds', + 'failureIds' => 'setFailureIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'successIds' => 'getSuccessIds', + 'failureIds' => 'getFailureIds' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['successIds'] = isset($data['successIds']) ? $data['successIds'] : null; + $this->container['failureIds'] = isset($data['failureIds']) ? $data['failureIds'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets successIds + * + * @return int[] + */ + public function getSuccessIds() + { + return $this->container['successIds']; + } + + /** + * Sets successIds + * + * @param int[] $successIds successIds + * + * @return $this + */ + public function setSuccessIds($successIds) + { + $this->container['successIds'] = $successIds; + + return $this; + } + + /** + * Gets failureIds + * + * @return int[] + */ + public function getFailureIds() + { + return $this->container['failureIds']; + } + + /** + * Sets failureIds + * + * @param int[] $failureIds failureIds + * + * @return $this + */ + public function setFailureIds($failureIds) + { + $this->container['failureIds'] = $failureIds; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/UpdateCampaignStatus.php b/vendor/getbrevo/brevo-php/lib/Model/UpdateCampaignStatus.php new file mode 100644 index 0000000..98aa902 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/UpdateCampaignStatus.php @@ -0,0 +1,350 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'status' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'status' => 'getStatus' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const STATUS_SUSPENDED = 'suspended'; + const STATUS_ARCHIVE = 'archive'; + const STATUS_DARCHIVE = 'darchive'; + const STATUS_SENT = 'sent'; + const STATUS_QUEUED = 'queued'; + const STATUS_REPLICATE = 'replicate'; + const STATUS_REPLICATE_TEMPLATE = 'replicateTemplate'; + const STATUS_DRAFT = 'draft'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_SUSPENDED, + self::STATUS_ARCHIVE, + self::STATUS_DARCHIVE, + self::STATUS_SENT, + self::STATUS_QUEUED, + self::STATUS_REPLICATE, + self::STATUS_REPLICATE_TEMPLATE, + self::STATUS_DRAFT, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'status', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status Note:- replicateTemplate status will be available only for template type campaigns. + * + * @return $this + */ + public function setStatus($status) + { + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($status) && !in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'status', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/UpdateChild.php b/vendor/getbrevo/brevo-php/lib/Model/UpdateChild.php new file mode 100644 index 0000000..ddcb0d2 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/UpdateChild.php @@ -0,0 +1,425 @@ + 'string', + 'firstName' => 'string', + 'lastName' => 'string', + 'companyName' => 'string', + 'password' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'email' => 'email', + 'firstName' => null, + 'lastName' => null, + 'companyName' => null, + 'password' => 'password' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'email' => 'email', + 'firstName' => 'firstName', + 'lastName' => 'lastName', + 'companyName' => 'companyName', + 'password' => 'password' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'email' => 'setEmail', + 'firstName' => 'setFirstName', + 'lastName' => 'setLastName', + 'companyName' => 'setCompanyName', + 'password' => 'setPassword' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'email' => 'getEmail', + 'firstName' => 'getFirstName', + 'lastName' => 'getLastName', + 'companyName' => 'getCompanyName', + 'password' => 'getPassword' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['firstName'] = isset($data['firstName']) ? $data['firstName'] : null; + $this->container['lastName'] = isset($data['lastName']) ? $data['lastName'] : null; + $this->container['companyName'] = isset($data['companyName']) ? $data['companyName'] : null; + $this->container['password'] = isset($data['password']) ? $data['password'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email New Email address to update the child account + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets firstName + * + * @return string + */ + public function getFirstName() + { + return $this->container['firstName']; + } + + /** + * Sets firstName + * + * @param string $firstName New First name to use to update the child account + * + * @return $this + */ + public function setFirstName($firstName) + { + $this->container['firstName'] = $firstName; + + return $this; + } + + /** + * Gets lastName + * + * @return string + */ + public function getLastName() + { + return $this->container['lastName']; + } + + /** + * Sets lastName + * + * @param string $lastName New Last name to use to update the child account + * + * @return $this + */ + public function setLastName($lastName) + { + $this->container['lastName'] = $lastName; + + return $this; + } + + /** + * Gets companyName + * + * @return string + */ + public function getCompanyName() + { + return $this->container['companyName']; + } + + /** + * Sets companyName + * + * @param string $companyName New Company name to use to update the child account + * + * @return $this + */ + public function setCompanyName($companyName) + { + $this->container['companyName'] = $companyName; + + return $this; + } + + /** + * Gets password + * + * @return string + */ + public function getPassword() + { + return $this->container['password']; + } + + /** + * Sets password + * + * @param string $password New password for the child account to login + * + * @return $this + */ + public function setPassword($password) + { + $this->container['password'] = $password; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/UpdateChildAccountStatus.php b/vendor/getbrevo/brevo-php/lib/Model/UpdateChildAccountStatus.php new file mode 100644 index 0000000..6fc4ce2 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/UpdateChildAccountStatus.php @@ -0,0 +1,395 @@ + 'bool', + 'transactionalSms' => 'bool', + 'marketingAutomation' => 'bool', + 'smsCampaign' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'transactionalEmail' => null, + 'transactionalSms' => null, + 'marketingAutomation' => null, + 'smsCampaign' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'transactionalEmail' => 'transactionalEmail', + 'transactionalSms' => 'transactionalSms', + 'marketingAutomation' => 'marketingAutomation', + 'smsCampaign' => 'smsCampaign' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'transactionalEmail' => 'setTransactionalEmail', + 'transactionalSms' => 'setTransactionalSms', + 'marketingAutomation' => 'setMarketingAutomation', + 'smsCampaign' => 'setSmsCampaign' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'transactionalEmail' => 'getTransactionalEmail', + 'transactionalSms' => 'getTransactionalSms', + 'marketingAutomation' => 'getMarketingAutomation', + 'smsCampaign' => 'getSmsCampaign' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['transactionalEmail'] = isset($data['transactionalEmail']) ? $data['transactionalEmail'] : null; + $this->container['transactionalSms'] = isset($data['transactionalSms']) ? $data['transactionalSms'] : null; + $this->container['marketingAutomation'] = isset($data['marketingAutomation']) ? $data['marketingAutomation'] : null; + $this->container['smsCampaign'] = isset($data['smsCampaign']) ? $data['smsCampaign'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets transactionalEmail + * + * @return bool + */ + public function getTransactionalEmail() + { + return $this->container['transactionalEmail']; + } + + /** + * Sets transactionalEmail + * + * @param bool $transactionalEmail Status of Transactional Email Platform activation for your account (true=enabled, false=disabled) + * + * @return $this + */ + public function setTransactionalEmail($transactionalEmail) + { + $this->container['transactionalEmail'] = $transactionalEmail; + + return $this; + } + + /** + * Gets transactionalSms + * + * @return bool + */ + public function getTransactionalSms() + { + return $this->container['transactionalSms']; + } + + /** + * Sets transactionalSms + * + * @param bool $transactionalSms Status of Transactional SMS Platform activation for your account (true=enabled, false=disabled) + * + * @return $this + */ + public function setTransactionalSms($transactionalSms) + { + $this->container['transactionalSms'] = $transactionalSms; + + return $this; + } + + /** + * Gets marketingAutomation + * + * @return bool + */ + public function getMarketingAutomation() + { + return $this->container['marketingAutomation']; + } + + /** + * Sets marketingAutomation + * + * @param bool $marketingAutomation Status of Marketing Automation Platform activation for your account (true=enabled, false=disabled) + * + * @return $this + */ + public function setMarketingAutomation($marketingAutomation) + { + $this->container['marketingAutomation'] = $marketingAutomation; + + return $this; + } + + /** + * Gets smsCampaign + * + * @return bool + */ + public function getSmsCampaign() + { + return $this->container['smsCampaign']; + } + + /** + * Sets smsCampaign + * + * @param bool $smsCampaign Status of SMS Campaign Platform activation for your account (true=enabled, false=disabled) + * + * @return $this + */ + public function setSmsCampaign($smsCampaign) + { + $this->container['smsCampaign'] = $smsCampaign; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/UpdateChildDomain.php b/vendor/getbrevo/brevo-php/lib/Model/UpdateChildDomain.php new file mode 100644 index 0000000..db4d98b --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/UpdateChildDomain.php @@ -0,0 +1,305 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'domain' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'domain' => 'domain' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'domain' => 'setDomain' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'domain' => 'getDomain' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['domain'] = isset($data['domain']) ? $data['domain'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets domain + * + * @return string + */ + public function getDomain() + { + return $this->container['domain']; + } + + /** + * Sets domain + * + * @param string $domain Value for the sender domain that will replace the existing domain + * + * @return $this + */ + public function setDomain($domain) + { + $this->container['domain'] = $domain; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/UpdateContact.php b/vendor/getbrevo/brevo-php/lib/Model/UpdateContact.php new file mode 100644 index 0000000..ff38522 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/UpdateContact.php @@ -0,0 +1,485 @@ + 'object', + 'extId' => 'string', + 'emailBlacklisted' => 'bool', + 'smsBlacklisted' => 'bool', + 'listIds' => 'int[]', + 'unlinkListIds' => 'int[]', + 'smtpBlacklistSender' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'attributes' => null, + 'extId' => null, + 'emailBlacklisted' => null, + 'smsBlacklisted' => null, + 'listIds' => 'int64', + 'unlinkListIds' => 'int64', + 'smtpBlacklistSender' => 'email' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'attributes' => 'attributes', + 'extId' => 'ext_id', + 'emailBlacklisted' => 'emailBlacklisted', + 'smsBlacklisted' => 'smsBlacklisted', + 'listIds' => 'listIds', + 'unlinkListIds' => 'unlinkListIds', + 'smtpBlacklistSender' => 'smtpBlacklistSender' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'attributes' => 'setAttributes', + 'extId' => 'setExtId', + 'emailBlacklisted' => 'setEmailBlacklisted', + 'smsBlacklisted' => 'setSmsBlacklisted', + 'listIds' => 'setListIds', + 'unlinkListIds' => 'setUnlinkListIds', + 'smtpBlacklistSender' => 'setSmtpBlacklistSender' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'attributes' => 'getAttributes', + 'extId' => 'getExtId', + 'emailBlacklisted' => 'getEmailBlacklisted', + 'smsBlacklisted' => 'getSmsBlacklisted', + 'listIds' => 'getListIds', + 'unlinkListIds' => 'getUnlinkListIds', + 'smtpBlacklistSender' => 'getSmtpBlacklistSender' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; + $this->container['extId'] = isset($data['extId']) ? $data['extId'] : null; + $this->container['emailBlacklisted'] = isset($data['emailBlacklisted']) ? $data['emailBlacklisted'] : null; + $this->container['smsBlacklisted'] = isset($data['smsBlacklisted']) ? $data['smsBlacklisted'] : null; + $this->container['listIds'] = isset($data['listIds']) ? $data['listIds'] : null; + $this->container['unlinkListIds'] = isset($data['unlinkListIds']) ? $data['unlinkListIds'] : null; + $this->container['smtpBlacklistSender'] = isset($data['smtpBlacklistSender']) ? $data['smtpBlacklistSender'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets attributes + * + * @return object + */ + public function getAttributes() + { + return $this->container['attributes']; + } + + /** + * Sets attributes + * + * @param object $attributes Pass the set of attributes to be updated. These attributes must be present in your account. Values that don't match the attribute type (e.g. text or string in a date attribute) will be ignored.To update existing email address of a contact with the new one please pass EMAIL in attributes. For example, `{ \"EMAIL\":\"newemail@domain.com\", \"FNAME\":\"Ellie\", \"LNAME\":\"Roger\"}`. The attribute's parameter should be passed in capital letter while updating a contact. Keep in mind transactional attributes can be updated the same way as normal attributes. Mobile Number in \"SMS\" field should be passed with proper country code. For example {\"SMS\":\"+91xxxxxxxxxx\"} or {\"SMS\":\"0091xxxxxxxxxx\"} + * + * @return $this + */ + public function setAttributes($attributes) + { + $this->container['attributes'] = $attributes; + + return $this; + } + + /** + * Gets extId + * + * @return string + */ + public function getExtId() + { + return $this->container['extId']; + } + + /** + * Sets extId + * + * @param string $extId Pass your own Id to update ext_id of a contact. + * + * @return $this + */ + public function setExtId($extId) + { + $this->container['extId'] = $extId; + + return $this; + } + + /** + * Gets emailBlacklisted + * + * @return bool + */ + public function getEmailBlacklisted() + { + return $this->container['emailBlacklisted']; + } + + /** + * Sets emailBlacklisted + * + * @param bool $emailBlacklisted Set/unset this field to blacklist/allow the contact for emails (emailBlacklisted = true) + * + * @return $this + */ + public function setEmailBlacklisted($emailBlacklisted) + { + $this->container['emailBlacklisted'] = $emailBlacklisted; + + return $this; + } + + /** + * Gets smsBlacklisted + * + * @return bool + */ + public function getSmsBlacklisted() + { + return $this->container['smsBlacklisted']; + } + + /** + * Sets smsBlacklisted + * + * @param bool $smsBlacklisted Set/unset this field to blacklist/allow the contact for SMS (smsBlacklisted = true) + * + * @return $this + */ + public function setSmsBlacklisted($smsBlacklisted) + { + $this->container['smsBlacklisted'] = $smsBlacklisted; + + return $this; + } + + /** + * Gets listIds + * + * @return int[] + */ + public function getListIds() + { + return $this->container['listIds']; + } + + /** + * Sets listIds + * + * @param int[] $listIds Ids of the lists to add the contact to + * + * @return $this + */ + public function setListIds($listIds) + { + $this->container['listIds'] = $listIds; + + return $this; + } + + /** + * Gets unlinkListIds + * + * @return int[] + */ + public function getUnlinkListIds() + { + return $this->container['unlinkListIds']; + } + + /** + * Sets unlinkListIds + * + * @param int[] $unlinkListIds Ids of the lists to remove the contact from + * + * @return $this + */ + public function setUnlinkListIds($unlinkListIds) + { + $this->container['unlinkListIds'] = $unlinkListIds; + + return $this; + } + + /** + * Gets smtpBlacklistSender + * + * @return string[] + */ + public function getSmtpBlacklistSender() + { + return $this->container['smtpBlacklistSender']; + } + + /** + * Sets smtpBlacklistSender + * + * @param string[] $smtpBlacklistSender transactional email forbidden sender for contact. Use only for email Contact + * + * @return $this + */ + public function setSmtpBlacklistSender($smtpBlacklistSender) + { + $this->container['smtpBlacklistSender'] = $smtpBlacklistSender; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/UpdateCouponCollection.php b/vendor/getbrevo/brevo-php/lib/Model/UpdateCouponCollection.php new file mode 100644 index 0000000..fe6b87c --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/UpdateCouponCollection.php @@ -0,0 +1,308 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'defaultCoupon' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'defaultCoupon' => 'defaultCoupon' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'defaultCoupon' => 'setDefaultCoupon' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'defaultCoupon' => 'getDefaultCoupon' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['defaultCoupon'] = isset($data['defaultCoupon']) ? $data['defaultCoupon'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['defaultCoupon'] === null) { + $invalidProperties[] = "'defaultCoupon' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets defaultCoupon + * + * @return string + */ + public function getDefaultCoupon() + { + return $this->container['defaultCoupon']; + } + + /** + * Sets defaultCoupon + * + * @param string $defaultCoupon A default coupon to be used in case there are no coupons left + * + * @return $this + */ + public function setDefaultCoupon($defaultCoupon) + { + $this->container['defaultCoupon'] = $defaultCoupon; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/UpdateEmailCampaign.php b/vendor/getbrevo/brevo-php/lib/Model/UpdateEmailCampaign.php new file mode 100644 index 0000000..0fc74b8 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/UpdateEmailCampaign.php @@ -0,0 +1,1285 @@ + 'string', + 'sender' => '\Brevo\Client\Model\UpdateEmailCampaignSender', + 'name' => 'string', + 'htmlContent' => 'string', + 'htmlUrl' => 'string', + 'scheduledAt' => 'string', + 'subject' => 'string', + 'previewText' => 'string', + 'replyTo' => 'string', + 'toField' => 'string', + 'recipients' => '\Brevo\Client\Model\UpdateEmailCampaignRecipients', + 'attachmentUrl' => 'string', + 'inlineImageActivation' => 'bool', + 'mirrorActive' => 'bool', + 'recurring' => 'bool', + 'footer' => 'string', + 'header' => 'string', + 'utmCampaign' => 'string', + 'params' => 'object', + 'sendAtBestTime' => 'bool', + 'abTesting' => 'bool', + 'subjectA' => 'string', + 'subjectB' => 'string', + 'splitRule' => 'int', + 'winnerCriteria' => 'string', + 'winnerDelay' => 'int', + 'ipWarmupEnable' => 'bool', + 'initialQuota' => 'int', + 'increaseRate' => 'int', + 'unsubscriptionPageId' => 'string', + 'updateFormId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'tag' => null, + 'sender' => null, + 'name' => null, + 'htmlContent' => null, + 'htmlUrl' => 'url', + 'scheduledAt' => null, + 'subject' => null, + 'previewText' => null, + 'replyTo' => 'email', + 'toField' => null, + 'recipients' => null, + 'attachmentUrl' => 'url', + 'inlineImageActivation' => null, + 'mirrorActive' => null, + 'recurring' => null, + 'footer' => null, + 'header' => null, + 'utmCampaign' => null, + 'params' => null, + 'sendAtBestTime' => null, + 'abTesting' => null, + 'subjectA' => null, + 'subjectB' => null, + 'splitRule' => 'int64', + 'winnerCriteria' => null, + 'winnerDelay' => 'int64', + 'ipWarmupEnable' => null, + 'initialQuota' => 'int64', + 'increaseRate' => 'int64', + 'unsubscriptionPageId' => null, + 'updateFormId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'tag' => 'tag', + 'sender' => 'sender', + 'name' => 'name', + 'htmlContent' => 'htmlContent', + 'htmlUrl' => 'htmlUrl', + 'scheduledAt' => 'scheduledAt', + 'subject' => 'subject', + 'previewText' => 'previewText', + 'replyTo' => 'replyTo', + 'toField' => 'toField', + 'recipients' => 'recipients', + 'attachmentUrl' => 'attachmentUrl', + 'inlineImageActivation' => 'inlineImageActivation', + 'mirrorActive' => 'mirrorActive', + 'recurring' => 'recurring', + 'footer' => 'footer', + 'header' => 'header', + 'utmCampaign' => 'utmCampaign', + 'params' => 'params', + 'sendAtBestTime' => 'sendAtBestTime', + 'abTesting' => 'abTesting', + 'subjectA' => 'subjectA', + 'subjectB' => 'subjectB', + 'splitRule' => 'splitRule', + 'winnerCriteria' => 'winnerCriteria', + 'winnerDelay' => 'winnerDelay', + 'ipWarmupEnable' => 'ipWarmupEnable', + 'initialQuota' => 'initialQuota', + 'increaseRate' => 'increaseRate', + 'unsubscriptionPageId' => 'unsubscriptionPageId', + 'updateFormId' => 'updateFormId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'tag' => 'setTag', + 'sender' => 'setSender', + 'name' => 'setName', + 'htmlContent' => 'setHtmlContent', + 'htmlUrl' => 'setHtmlUrl', + 'scheduledAt' => 'setScheduledAt', + 'subject' => 'setSubject', + 'previewText' => 'setPreviewText', + 'replyTo' => 'setReplyTo', + 'toField' => 'setToField', + 'recipients' => 'setRecipients', + 'attachmentUrl' => 'setAttachmentUrl', + 'inlineImageActivation' => 'setInlineImageActivation', + 'mirrorActive' => 'setMirrorActive', + 'recurring' => 'setRecurring', + 'footer' => 'setFooter', + 'header' => 'setHeader', + 'utmCampaign' => 'setUtmCampaign', + 'params' => 'setParams', + 'sendAtBestTime' => 'setSendAtBestTime', + 'abTesting' => 'setAbTesting', + 'subjectA' => 'setSubjectA', + 'subjectB' => 'setSubjectB', + 'splitRule' => 'setSplitRule', + 'winnerCriteria' => 'setWinnerCriteria', + 'winnerDelay' => 'setWinnerDelay', + 'ipWarmupEnable' => 'setIpWarmupEnable', + 'initialQuota' => 'setInitialQuota', + 'increaseRate' => 'setIncreaseRate', + 'unsubscriptionPageId' => 'setUnsubscriptionPageId', + 'updateFormId' => 'setUpdateFormId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'tag' => 'getTag', + 'sender' => 'getSender', + 'name' => 'getName', + 'htmlContent' => 'getHtmlContent', + 'htmlUrl' => 'getHtmlUrl', + 'scheduledAt' => 'getScheduledAt', + 'subject' => 'getSubject', + 'previewText' => 'getPreviewText', + 'replyTo' => 'getReplyTo', + 'toField' => 'getToField', + 'recipients' => 'getRecipients', + 'attachmentUrl' => 'getAttachmentUrl', + 'inlineImageActivation' => 'getInlineImageActivation', + 'mirrorActive' => 'getMirrorActive', + 'recurring' => 'getRecurring', + 'footer' => 'getFooter', + 'header' => 'getHeader', + 'utmCampaign' => 'getUtmCampaign', + 'params' => 'getParams', + 'sendAtBestTime' => 'getSendAtBestTime', + 'abTesting' => 'getAbTesting', + 'subjectA' => 'getSubjectA', + 'subjectB' => 'getSubjectB', + 'splitRule' => 'getSplitRule', + 'winnerCriteria' => 'getWinnerCriteria', + 'winnerDelay' => 'getWinnerDelay', + 'ipWarmupEnable' => 'getIpWarmupEnable', + 'initialQuota' => 'getInitialQuota', + 'increaseRate' => 'getIncreaseRate', + 'unsubscriptionPageId' => 'getUnsubscriptionPageId', + 'updateFormId' => 'getUpdateFormId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const WINNER_CRITERIA_OPEN = 'open'; + const WINNER_CRITERIA_CLICK = 'click'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getWinnerCriteriaAllowableValues() + { + return [ + self::WINNER_CRITERIA_OPEN, + self::WINNER_CRITERIA_CLICK, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; + $this->container['sender'] = isset($data['sender']) ? $data['sender'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['htmlContent'] = isset($data['htmlContent']) ? $data['htmlContent'] : null; + $this->container['htmlUrl'] = isset($data['htmlUrl']) ? $data['htmlUrl'] : null; + $this->container['scheduledAt'] = isset($data['scheduledAt']) ? $data['scheduledAt'] : null; + $this->container['subject'] = isset($data['subject']) ? $data['subject'] : null; + $this->container['previewText'] = isset($data['previewText']) ? $data['previewText'] : null; + $this->container['replyTo'] = isset($data['replyTo']) ? $data['replyTo'] : null; + $this->container['toField'] = isset($data['toField']) ? $data['toField'] : null; + $this->container['recipients'] = isset($data['recipients']) ? $data['recipients'] : null; + $this->container['attachmentUrl'] = isset($data['attachmentUrl']) ? $data['attachmentUrl'] : null; + $this->container['inlineImageActivation'] = isset($data['inlineImageActivation']) ? $data['inlineImageActivation'] : false; + $this->container['mirrorActive'] = isset($data['mirrorActive']) ? $data['mirrorActive'] : null; + $this->container['recurring'] = isset($data['recurring']) ? $data['recurring'] : false; + $this->container['footer'] = isset($data['footer']) ? $data['footer'] : null; + $this->container['header'] = isset($data['header']) ? $data['header'] : null; + $this->container['utmCampaign'] = isset($data['utmCampaign']) ? $data['utmCampaign'] : null; + $this->container['params'] = isset($data['params']) ? $data['params'] : null; + $this->container['sendAtBestTime'] = isset($data['sendAtBestTime']) ? $data['sendAtBestTime'] : null; + $this->container['abTesting'] = isset($data['abTesting']) ? $data['abTesting'] : false; + $this->container['subjectA'] = isset($data['subjectA']) ? $data['subjectA'] : null; + $this->container['subjectB'] = isset($data['subjectB']) ? $data['subjectB'] : null; + $this->container['splitRule'] = isset($data['splitRule']) ? $data['splitRule'] : null; + $this->container['winnerCriteria'] = isset($data['winnerCriteria']) ? $data['winnerCriteria'] : null; + $this->container['winnerDelay'] = isset($data['winnerDelay']) ? $data['winnerDelay'] : null; + $this->container['ipWarmupEnable'] = isset($data['ipWarmupEnable']) ? $data['ipWarmupEnable'] : false; + $this->container['initialQuota'] = isset($data['initialQuota']) ? $data['initialQuota'] : null; + $this->container['increaseRate'] = isset($data['increaseRate']) ? $data['increaseRate'] : null; + $this->container['unsubscriptionPageId'] = isset($data['unsubscriptionPageId']) ? $data['unsubscriptionPageId'] : null; + $this->container['updateFormId'] = isset($data['updateFormId']) ? $data['updateFormId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if (!is_null($this->container['splitRule']) && ($this->container['splitRule'] > 50)) { + $invalidProperties[] = "invalid value for 'splitRule', must be smaller than or equal to 50."; + } + + if (!is_null($this->container['splitRule']) && ($this->container['splitRule'] < 1)) { + $invalidProperties[] = "invalid value for 'splitRule', must be bigger than or equal to 1."; + } + + $allowedValues = $this->getWinnerCriteriaAllowableValues(); + if (!is_null($this->container['winnerCriteria']) && !in_array($this->container['winnerCriteria'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'winnerCriteria', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if (!is_null($this->container['winnerDelay']) && ($this->container['winnerDelay'] > 168)) { + $invalidProperties[] = "invalid value for 'winnerDelay', must be smaller than or equal to 168."; + } + + if (!is_null($this->container['winnerDelay']) && ($this->container['winnerDelay'] < 1)) { + $invalidProperties[] = "invalid value for 'winnerDelay', must be bigger than or equal to 1."; + } + + if (!is_null($this->container['increaseRate']) && ($this->container['increaseRate'] > 100)) { + $invalidProperties[] = "invalid value for 'increaseRate', must be smaller than or equal to 100."; + } + + if (!is_null($this->container['increaseRate']) && ($this->container['increaseRate'] < 0)) { + $invalidProperties[] = "invalid value for 'increaseRate', must be bigger than or equal to 0."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets tag + * + * @return string + */ + public function getTag() + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string $tag Tag of the campaign + * + * @return $this + */ + public function setTag($tag) + { + $this->container['tag'] = $tag; + + return $this; + } + + /** + * Gets sender + * + * @return \Brevo\Client\Model\UpdateEmailCampaignSender + */ + public function getSender() + { + return $this->container['sender']; + } + + /** + * Sets sender + * + * @param \Brevo\Client\Model\UpdateEmailCampaignSender $sender sender + * + * @return $this + */ + public function setSender($sender) + { + $this->container['sender'] = $sender; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the campaign + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets htmlContent + * + * @return string + */ + public function getHtmlContent() + { + return $this->container['htmlContent']; + } + + /** + * Sets htmlContent + * + * @param string $htmlContent Body of the message (HTML version). If the campaign is designed using Drag & Drop editor via HTML content, then the design page will not have Drag & Drop editor access for that campaign. REQUIRED if htmlUrl is empty + * + * @return $this + */ + public function setHtmlContent($htmlContent) + { + $this->container['htmlContent'] = $htmlContent; + + return $this; + } + + /** + * Gets htmlUrl + * + * @return string + */ + public function getHtmlUrl() + { + return $this->container['htmlUrl']; + } + + /** + * Sets htmlUrl + * + * @param string $htmlUrl Url which contents the body of the email message. REQUIRED if htmlContent is empty + * + * @return $this + */ + public function setHtmlUrl($htmlUrl) + { + $this->container['htmlUrl'] = $htmlUrl; + + return $this; + } + + /** + * Gets scheduledAt + * + * @return string + */ + public function getScheduledAt() + { + return $this->container['scheduledAt']; + } + + /** + * Sets scheduledAt + * + * @param string $scheduledAt UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. If sendAtBestTime is set to true, your campaign will be sent according to the date passed (ignoring the time part). + * + * @return $this + */ + public function setScheduledAt($scheduledAt) + { + $this->container['scheduledAt'] = $scheduledAt; + + return $this; + } + + /** + * Gets subject + * + * @return string + */ + public function getSubject() + { + return $this->container['subject']; + } + + /** + * Sets subject + * + * @param string $subject Subject of the campaign + * + * @return $this + */ + public function setSubject($subject) + { + $this->container['subject'] = $subject; + + return $this; + } + + /** + * Gets previewText + * + * @return string + */ + public function getPreviewText() + { + return $this->container['previewText']; + } + + /** + * Sets previewText + * + * @param string $previewText Preview text or preheader of the email campaign + * + * @return $this + */ + public function setPreviewText($previewText) + { + $this->container['previewText'] = $previewText; + + return $this; + } + + /** + * Gets replyTo + * + * @return string + */ + public function getReplyTo() + { + return $this->container['replyTo']; + } + + /** + * Sets replyTo + * + * @param string $replyTo Email on which campaign recipients will be able to reply to + * + * @return $this + */ + public function setReplyTo($replyTo) + { + $this->container['replyTo'] = $replyTo; + + return $this; + } + + /** + * Gets toField + * + * @return string + */ + public function getToField() + { + return $this->container['toField']; + } + + /** + * Sets toField + * + * @param string $toField To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your Brevo account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization + * + * @return $this + */ + public function setToField($toField) + { + $this->container['toField'] = $toField; + + return $this; + } + + /** + * Gets recipients + * + * @return \Brevo\Client\Model\UpdateEmailCampaignRecipients + */ + public function getRecipients() + { + return $this->container['recipients']; + } + + /** + * Sets recipients + * + * @param \Brevo\Client\Model\UpdateEmailCampaignRecipients $recipients recipients + * + * @return $this + */ + public function setRecipients($recipients) + { + $this->container['recipients'] = $recipients; + + return $this; + } + + /** + * Gets attachmentUrl + * + * @return string + */ + public function getAttachmentUrl() + { + return $this->container['attachmentUrl']; + } + + /** + * Sets attachmentUrl + * + * @param string $attachmentUrl Absolute url of the attachment (no local file). 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 + * + * @return $this + */ + public function setAttachmentUrl($attachmentUrl) + { + $this->container['attachmentUrl'] = $attachmentUrl; + + return $this; + } + + /** + * Gets inlineImageActivation + * + * @return bool + */ + public function getInlineImageActivation() + { + return $this->container['inlineImageActivation']; + } + + /** + * Sets inlineImageActivation + * + * @param bool $inlineImageActivation Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. You cannot send a campaign of more than 4MB with images embedded in the email. Campaigns with the images embedded in the email must be sent to less than 5000 contacts. + * + * @return $this + */ + public function setInlineImageActivation($inlineImageActivation) + { + $this->container['inlineImageActivation'] = $inlineImageActivation; + + return $this; + } + + /** + * Gets mirrorActive + * + * @return bool + */ + public function getMirrorActive() + { + return $this->container['mirrorActive']; + } + + /** + * Sets mirrorActive + * + * @param bool $mirrorActive Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign + * + * @return $this + */ + public function setMirrorActive($mirrorActive) + { + $this->container['mirrorActive'] = $mirrorActive; + + return $this; + } + + /** + * Gets recurring + * + * @return bool + */ + public function getRecurring() + { + return $this->container['recurring']; + } + + /** + * Sets recurring + * + * @param bool $recurring 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 + * + * @return $this + */ + public function setRecurring($recurring) + { + $this->container['recurring'] = $recurring; + + return $this; + } + + /** + * Gets footer + * + * @return string + */ + public function getFooter() + { + return $this->container['footer']; + } + + /** + * Sets footer + * + * @param string $footer Footer of the email campaign + * + * @return $this + */ + public function setFooter($footer) + { + $this->container['footer'] = $footer; + + return $this; + } + + /** + * Gets header + * + * @return string + */ + public function getHeader() + { + return $this->container['header']; + } + + /** + * Sets header + * + * @param string $header Header of the email campaign + * + * @return $this + */ + public function setHeader($header) + { + $this->container['header'] = $header; + + return $this; + } + + /** + * Gets utmCampaign + * + * @return string + */ + public function getUtmCampaign() + { + return $this->container['utmCampaign']; + } + + /** + * Sets utmCampaign + * + * @param string $utmCampaign Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed + * + * @return $this + */ + public function setUtmCampaign($utmCampaign) + { + $this->container['utmCampaign'] = $utmCampaign; + + return $this; + } + + /** + * Gets params + * + * @return object + */ + public function getParams() + { + return $this->container['params']; + } + + /** + * Sets params + * + * @param object $params Pass the set of attributes to customize the type 'classic' campaign. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. The 'params' field will get updated, only if the campaign is in New Template Language, else ignored. The New Template Language is dependent on the values of 'subject', 'htmlContent/htmlUrl', 'sender.name' & 'toField' + * + * @return $this + */ + public function setParams($params) + { + $this->container['params'] = $params; + + return $this; + } + + /** + * Gets sendAtBestTime + * + * @return bool + */ + public function getSendAtBestTime() + { + return $this->container['sendAtBestTime']; + } + + /** + * Sets sendAtBestTime + * + * @param bool $sendAtBestTime Set this to true if you want to send your campaign at best time. Note:- if true, warmup ip will be disabled. + * + * @return $this + */ + public function setSendAtBestTime($sendAtBestTime) + { + $this->container['sendAtBestTime'] = $sendAtBestTime; + + return $this; + } + + /** + * Gets abTesting + * + * @return bool + */ + public function getAbTesting() + { + return $this->container['abTesting']; + } + + /** + * Sets abTesting + * + * @param bool $abTesting Status of A/B Test. abTesting = false means it is disabled, & abTesting = true means it is enabled. 'subjectA', 'subjectB', 'splitRule', 'winnerCriteria' & 'winnerDelay' will be considered if abTesting is set to true. 'subject' if passed is ignored. Can be set to true only if 'sendAtBestTime' is 'false'. You will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B + * + * @return $this + */ + public function setAbTesting($abTesting) + { + $this->container['abTesting'] = $abTesting; + + return $this; + } + + /** + * Gets subjectA + * + * @return string + */ + public function getSubjectA() + { + return $this->container['subjectA']; + } + + /** + * Sets subjectA + * + * @param string $subjectA Subject A of the campaign. Considered if abTesting = true. subjectA & subjectB should have unique value + * + * @return $this + */ + public function setSubjectA($subjectA) + { + $this->container['subjectA'] = $subjectA; + + return $this; + } + + /** + * Gets subjectB + * + * @return string + */ + public function getSubjectB() + { + return $this->container['subjectB']; + } + + /** + * Sets subjectB + * + * @param string $subjectB Subject B of the campaign. Considered if abTesting = true. subjectA & subjectB should have unique value + * + * @return $this + */ + public function setSubjectB($subjectB) + { + $this->container['subjectB'] = $subjectB; + + return $this; + } + + /** + * Gets splitRule + * + * @return int + */ + public function getSplitRule() + { + return $this->container['splitRule']; + } + + /** + * Sets splitRule + * + * @param int $splitRule Add the size of your test groups. Considered if abTesting = true. We'll send version A and B to a random sample of recipients, and then the winning version to everyone else + * + * @return $this + */ + public function setSplitRule($splitRule) + { + + if (!is_null($splitRule) && ($splitRule > 50)) { + throw new \InvalidArgumentException('invalid value for $splitRule when calling UpdateEmailCampaign., must be smaller than or equal to 50.'); + } + if (!is_null($splitRule) && ($splitRule < 1)) { + throw new \InvalidArgumentException('invalid value for $splitRule when calling UpdateEmailCampaign., must be bigger than or equal to 1.'); + } + + $this->container['splitRule'] = $splitRule; + + return $this; + } + + /** + * Gets winnerCriteria + * + * @return string + */ + public function getWinnerCriteria() + { + return $this->container['winnerCriteria']; + } + + /** + * Sets winnerCriteria + * + * @param string $winnerCriteria Choose the metrics that will determinate the winning version. Considered if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerCriteria' is ignored if passed or alreday exist in record + * + * @return $this + */ + public function setWinnerCriteria($winnerCriteria) + { + $allowedValues = $this->getWinnerCriteriaAllowableValues(); + if (!is_null($winnerCriteria) && !in_array($winnerCriteria, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'winnerCriteria', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['winnerCriteria'] = $winnerCriteria; + + return $this; + } + + /** + * Gets winnerDelay + * + * @return int + */ + public function getWinnerDelay() + { + return $this->container['winnerDelay']; + } + + /** + * Sets winnerDelay + * + * @param int $winnerDelay Choose the duration of the test in hours. Maximum is 7 days, pass 24*7 = 168 hours. The winning version will be sent at the end of the test. Considered if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerDelay' is ignored if passed or alreday exist in record + * + * @return $this + */ + public function setWinnerDelay($winnerDelay) + { + + if (!is_null($winnerDelay) && ($winnerDelay > 168)) { + throw new \InvalidArgumentException('invalid value for $winnerDelay when calling UpdateEmailCampaign., must be smaller than or equal to 168.'); + } + if (!is_null($winnerDelay) && ($winnerDelay < 1)) { + throw new \InvalidArgumentException('invalid value for $winnerDelay when calling UpdateEmailCampaign., must be bigger than or equal to 1.'); + } + + $this->container['winnerDelay'] = $winnerDelay; + + return $this; + } + + /** + * Gets ipWarmupEnable + * + * @return bool + */ + public function getIpWarmupEnable() + { + return $this->container['ipWarmupEnable']; + } + + /** + * Sets ipWarmupEnable + * + * @param bool $ipWarmupEnable Available for dedicated ip clients. Set this to true if you wish to warm up your ip. + * + * @return $this + */ + public function setIpWarmupEnable($ipWarmupEnable) + { + $this->container['ipWarmupEnable'] = $ipWarmupEnable; + + return $this; + } + + /** + * Gets initialQuota + * + * @return int + */ + public function getInitialQuota() + { + return $this->container['initialQuota']; + } + + /** + * Sets initialQuota + * + * @param int $initialQuota Set an initial quota greater than 1 for warming up your ip. We recommend you set a value of 3000. + * + * @return $this + */ + public function setInitialQuota($initialQuota) + { + $this->container['initialQuota'] = $initialQuota; + + return $this; + } + + /** + * Gets increaseRate + * + * @return int + */ + public function getIncreaseRate() + { + return $this->container['increaseRate']; + } + + /** + * Sets increaseRate + * + * @param int $increaseRate Set a percentage increase rate for warming up your ip. We recommend you set the increase rate to 30% per day. If you want to send the same number of emails every day, set the daily increase value to 0%. + * + * @return $this + */ + public function setIncreaseRate($increaseRate) + { + + if (!is_null($increaseRate) && ($increaseRate > 100)) { + throw new \InvalidArgumentException('invalid value for $increaseRate when calling UpdateEmailCampaign., must be smaller than or equal to 100.'); + } + if (!is_null($increaseRate) && ($increaseRate < 0)) { + throw new \InvalidArgumentException('invalid value for $increaseRate when calling UpdateEmailCampaign., must be bigger than or equal to 0.'); + } + + $this->container['increaseRate'] = $increaseRate; + + return $this; + } + + /** + * Gets unsubscriptionPageId + * + * @return string + */ + public function getUnsubscriptionPageId() + { + return $this->container['unsubscriptionPageId']; + } + + /** + * Sets unsubscriptionPageId + * + * @param string $unsubscriptionPageId Enter an unsubscription page id. The page id is a 24 digit alphanumeric id that can be found in the URL when editing the page. + * + * @return $this + */ + public function setUnsubscriptionPageId($unsubscriptionPageId) + { + $this->container['unsubscriptionPageId'] = $unsubscriptionPageId; + + return $this; + } + + /** + * Gets updateFormId + * + * @return string + */ + public function getUpdateFormId() + { + return $this->container['updateFormId']; + } + + /** + * Sets updateFormId + * + * @param string $updateFormId Mandatory if templateId is used containing the {{ update_profile }} tag. Enter an update profile form id. The form id is a 24 digit alphanumeric id that can be found in the URL when editing the form. + * + * @return $this + */ + public function setUpdateFormId($updateFormId) + { + $this->container['updateFormId'] = $updateFormId; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/UpdateEmailCampaignRecipients.php b/vendor/getbrevo/brevo-php/lib/Model/UpdateEmailCampaignRecipients.php new file mode 100644 index 0000000..11e1e8a --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/UpdateEmailCampaignRecipients.php @@ -0,0 +1,366 @@ + 'int[]', + 'listIds' => 'int[]', + 'segmentIds' => 'int[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'exclusionListIds' => 'int64', + 'listIds' => 'int64', + 'segmentIds' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'exclusionListIds' => 'exclusionListIds', + 'listIds' => 'listIds', + 'segmentIds' => 'segmentIds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'exclusionListIds' => 'setExclusionListIds', + 'listIds' => 'setListIds', + 'segmentIds' => 'setSegmentIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'exclusionListIds' => 'getExclusionListIds', + 'listIds' => 'getListIds', + 'segmentIds' => 'getSegmentIds' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['exclusionListIds'] = isset($data['exclusionListIds']) ? $data['exclusionListIds'] : null; + $this->container['listIds'] = isset($data['listIds']) ? $data['listIds'] : null; + $this->container['segmentIds'] = isset($data['segmentIds']) ? $data['segmentIds'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets exclusionListIds + * + * @return int[] + */ + public function getExclusionListIds() + { + return $this->container['exclusionListIds']; + } + + /** + * Sets exclusionListIds + * + * @param int[] $exclusionListIds List ids which have to be excluded from a campaign + * + * @return $this + */ + public function setExclusionListIds($exclusionListIds) + { + $this->container['exclusionListIds'] = $exclusionListIds; + + return $this; + } + + /** + * Gets listIds + * + * @return int[] + */ + public function getListIds() + { + return $this->container['listIds']; + } + + /** + * Sets listIds + * + * @param int[] $listIds Lists Ids to send the campaign to. Campaign should only be updated with listIds if listIds were used to create it. REQUIRED if already not present in campaign and scheduledAt is not empty + * + * @return $this + */ + public function setListIds($listIds) + { + $this->container['listIds'] = $listIds; + + return $this; + } + + /** + * Gets segmentIds + * + * @return int[] + */ + public function getSegmentIds() + { + return $this->container['segmentIds']; + } + + /** + * Sets segmentIds + * + * @param int[] $segmentIds Mandatory if listIds are not used. Campaign should only be updated with segmentIds if segmentIds were used to create it. Segment ids to send the campaign to. + * + * @return $this + */ + public function setSegmentIds($segmentIds) + { + $this->container['segmentIds'] = $segmentIds; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/UpdateEmailCampaignSender.php b/vendor/getbrevo/brevo-php/lib/Model/UpdateEmailCampaignSender.php new file mode 100644 index 0000000..a0e3f2d --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/UpdateEmailCampaignSender.php @@ -0,0 +1,366 @@ + 'string', + 'email' => 'string', + 'id' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null, + 'email' => 'email', + 'id' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'email' => 'email', + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'email' => 'setEmail', + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'email' => 'getEmail', + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Sender Name from which the campaign emails are sent + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email Sender email from which the campaign emails are sent + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id Select the sender for the campaign on the basis of sender id. In order to select a sender with specific pool of IP’s, dedicated ip users shall pass id (instead of email). + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/UpdateExternalFeed.php b/vendor/getbrevo/brevo-php/lib/Model/UpdateExternalFeed.php new file mode 100644 index 0000000..f6034cc --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/UpdateExternalFeed.php @@ -0,0 +1,595 @@ + 'string', + 'url' => 'string', + 'authType' => 'string', + 'username' => 'string', + 'password' => 'string', + 'token' => 'string', + 'headers' => '\Brevo\Client\Model\GetExternalFeedByUUIDHeaders[]', + 'maxRetries' => 'int', + 'cache' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null, + 'url' => 'url', + 'authType' => null, + 'username' => null, + 'password' => null, + 'token' => null, + 'headers' => null, + 'maxRetries' => null, + 'cache' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'url' => 'url', + 'authType' => 'authType', + 'username' => 'username', + 'password' => 'password', + 'token' => 'token', + 'headers' => 'headers', + 'maxRetries' => 'maxRetries', + 'cache' => 'cache' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'url' => 'setUrl', + 'authType' => 'setAuthType', + 'username' => 'setUsername', + 'password' => 'setPassword', + 'token' => 'setToken', + 'headers' => 'setHeaders', + 'maxRetries' => 'setMaxRetries', + 'cache' => 'setCache' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'url' => 'getUrl', + 'authType' => 'getAuthType', + 'username' => 'getUsername', + 'password' => 'getPassword', + 'token' => 'getToken', + 'headers' => 'getHeaders', + 'maxRetries' => 'getMaxRetries', + 'cache' => 'getCache' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const AUTH_TYPE_BASIC = 'basic'; + const AUTH_TYPE_TOKEN = 'token'; + const AUTH_TYPE_NO_AUTH = 'noAuth'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAuthTypeAllowableValues() + { + return [ + self::AUTH_TYPE_BASIC, + self::AUTH_TYPE_TOKEN, + self::AUTH_TYPE_NO_AUTH, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['url'] = isset($data['url']) ? $data['url'] : null; + $this->container['authType'] = isset($data['authType']) ? $data['authType'] : null; + $this->container['username'] = isset($data['username']) ? $data['username'] : null; + $this->container['password'] = isset($data['password']) ? $data['password'] : null; + $this->container['token'] = isset($data['token']) ? $data['token'] : null; + $this->container['headers'] = isset($data['headers']) ? $data['headers'] : null; + $this->container['maxRetries'] = isset($data['maxRetries']) ? $data['maxRetries'] : null; + $this->container['cache'] = isset($data['cache']) ? $data['cache'] : false; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getAuthTypeAllowableValues(); + if (!is_null($this->container['authType']) && !in_array($this->container['authType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'authType', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if (!is_null($this->container['maxRetries']) && ($this->container['maxRetries'] > 5)) { + $invalidProperties[] = "invalid value for 'maxRetries', must be smaller than or equal to 5."; + } + + if (!is_null($this->container['maxRetries']) && ($this->container['maxRetries'] < 0)) { + $invalidProperties[] = "invalid value for 'maxRetries', must be bigger than or equal to 0."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the feed + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets url + * + * @return string + */ + public function getUrl() + { + return $this->container['url']; + } + + /** + * Sets url + * + * @param string $url URL of the feed + * + * @return $this + */ + public function setUrl($url) + { + $this->container['url'] = $url; + + return $this; + } + + /** + * Gets authType + * + * @return string + */ + public function getAuthType() + { + return $this->container['authType']; + } + + /** + * Sets authType + * + * @param string $authType Auth type of the feed: * `basic` * `token` * `noAuth` + * + * @return $this + */ + public function setAuthType($authType) + { + $allowedValues = $this->getAuthTypeAllowableValues(); + if (!is_null($authType) && !in_array($authType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'authType', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['authType'] = $authType; + + return $this; + } + + /** + * Gets username + * + * @return string + */ + public function getUsername() + { + return $this->container['username']; + } + + /** + * Sets username + * + * @param string $username Username for authType `basic` + * + * @return $this + */ + public function setUsername($username) + { + $this->container['username'] = $username; + + return $this; + } + + /** + * Gets password + * + * @return string + */ + public function getPassword() + { + return $this->container['password']; + } + + /** + * Sets password + * + * @param string $password Password for authType `basic` + * + * @return $this + */ + public function setPassword($password) + { + $this->container['password'] = $password; + + return $this; + } + + /** + * Gets token + * + * @return string + */ + public function getToken() + { + return $this->container['token']; + } + + /** + * Sets token + * + * @param string $token Token for authType `token` + * + * @return $this + */ + public function setToken($token) + { + $this->container['token'] = $token; + + return $this; + } + + /** + * Gets headers + * + * @return \Brevo\Client\Model\GetExternalFeedByUUIDHeaders[] + */ + public function getHeaders() + { + return $this->container['headers']; + } + + /** + * Sets headers + * + * @param \Brevo\Client\Model\GetExternalFeedByUUIDHeaders[] $headers Custom headers for the feed + * + * @return $this + */ + public function setHeaders($headers) + { + $this->container['headers'] = $headers; + + return $this; + } + + /** + * Gets maxRetries + * + * @return int + */ + public function getMaxRetries() + { + return $this->container['maxRetries']; + } + + /** + * Sets maxRetries + * + * @param int $maxRetries Maximum number of retries on the feed url + * + * @return $this + */ + public function setMaxRetries($maxRetries) + { + + if (!is_null($maxRetries) && ($maxRetries > 5)) { + throw new \InvalidArgumentException('invalid value for $maxRetries when calling UpdateExternalFeed., must be smaller than or equal to 5.'); + } + if (!is_null($maxRetries) && ($maxRetries < 0)) { + throw new \InvalidArgumentException('invalid value for $maxRetries when calling UpdateExternalFeed., must be bigger than or equal to 0.'); + } + + $this->container['maxRetries'] = $maxRetries; + + return $this; + } + + /** + * Gets cache + * + * @return bool + */ + public function getCache() + { + return $this->container['cache']; + } + + /** + * Sets cache + * + * @param bool $cache Toggle caching of feed url response + * + * @return $this + */ + public function setCache($cache) + { + $this->container['cache'] = $cache; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/UpdateList.php b/vendor/getbrevo/brevo-php/lib/Model/UpdateList.php new file mode 100644 index 0000000..076cbe5 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/UpdateList.php @@ -0,0 +1,335 @@ + 'string', + 'folderId' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null, + 'folderId' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'folderId' => 'folderId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'folderId' => 'setFolderId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'folderId' => 'getFolderId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['folderId'] = isset($data['folderId']) ? $data['folderId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the list. Either of the two parameters (name, folderId) can be updated at a time. + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets folderId + * + * @return int + */ + public function getFolderId() + { + return $this->container['folderId']; + } + + /** + * Sets folderId + * + * @param int $folderId Id of the folder in which the list is to be moved. Either of the two parameters (name, folderId) can be updated at a time. + * + * @return $this + */ + public function setFolderId($folderId) + { + $this->container['folderId'] = $folderId; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/UpdateSender.php b/vendor/getbrevo/brevo-php/lib/Model/UpdateSender.php new file mode 100644 index 0000000..7f5548a --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/UpdateSender.php @@ -0,0 +1,365 @@ + 'string', + 'email' => 'string', + 'ips' => '\Brevo\Client\Model\CreateSenderIps[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null, + 'email' => 'email', + 'ips' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'email' => 'email', + 'ips' => 'ips' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'email' => 'setEmail', + 'ips' => 'setIps' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'email' => 'getEmail', + 'ips' => 'getIps' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['ips'] = isset($data['ips']) ? $data['ips'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name From Name to update the sender + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email From Email to update the sender + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets ips + * + * @return \Brevo\Client\Model\CreateSenderIps[] + */ + public function getIps() + { + return $this->container['ips']; + } + + /** + * Sets ips + * + * @param \Brevo\Client\Model\CreateSenderIps[] $ips Only in case of dedicated IP, IPs to associate to the sender. If passed, will replace all the existing IPs. + * + * @return $this + */ + public function setIps($ips) + { + $this->container['ips'] = $ips; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/UpdateSmsCampaign.php b/vendor/getbrevo/brevo-php/lib/Model/UpdateSmsCampaign.php new file mode 100644 index 0000000..b7eea8a --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/UpdateSmsCampaign.php @@ -0,0 +1,523 @@ + 'string', + 'sender' => 'string', + 'content' => 'string', + 'recipients' => '\Brevo\Client\Model\CreateSmsCampaignRecipients', + 'scheduledAt' => 'string', + 'unicodeEnabled' => 'bool', + 'organisationPrefix' => 'string', + 'unsubscribeInstruction' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null, + 'sender' => null, + 'content' => null, + 'recipients' => null, + 'scheduledAt' => null, + 'unicodeEnabled' => null, + 'organisationPrefix' => null, + 'unsubscribeInstruction' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'sender' => 'sender', + 'content' => 'content', + 'recipients' => 'recipients', + 'scheduledAt' => 'scheduledAt', + 'unicodeEnabled' => 'unicodeEnabled', + 'organisationPrefix' => 'organisationPrefix', + 'unsubscribeInstruction' => 'unsubscribeInstruction' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'sender' => 'setSender', + 'content' => 'setContent', + 'recipients' => 'setRecipients', + 'scheduledAt' => 'setScheduledAt', + 'unicodeEnabled' => 'setUnicodeEnabled', + 'organisationPrefix' => 'setOrganisationPrefix', + 'unsubscribeInstruction' => 'setUnsubscribeInstruction' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'sender' => 'getSender', + 'content' => 'getContent', + 'recipients' => 'getRecipients', + 'scheduledAt' => 'getScheduledAt', + 'unicodeEnabled' => 'getUnicodeEnabled', + 'organisationPrefix' => 'getOrganisationPrefix', + 'unsubscribeInstruction' => 'getUnsubscribeInstruction' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['sender'] = isset($data['sender']) ? $data['sender'] : null; + $this->container['content'] = isset($data['content']) ? $data['content'] : null; + $this->container['recipients'] = isset($data['recipients']) ? $data['recipients'] : null; + $this->container['scheduledAt'] = isset($data['scheduledAt']) ? $data['scheduledAt'] : null; + $this->container['unicodeEnabled'] = isset($data['unicodeEnabled']) ? $data['unicodeEnabled'] : false; + $this->container['organisationPrefix'] = isset($data['organisationPrefix']) ? $data['organisationPrefix'] : null; + $this->container['unsubscribeInstruction'] = isset($data['unsubscribeInstruction']) ? $data['unsubscribeInstruction'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if (!is_null($this->container['sender']) && (mb_strlen($this->container['sender']) > 15)) { + $invalidProperties[] = "invalid value for 'sender', the character length must be smaller than or equal to 15."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the campaign + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets sender + * + * @return string + */ + public function getSender() + { + return $this->container['sender']; + } + + /** + * Sets sender + * + * @param string $sender Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters** + * + * @return $this + */ + public function setSender($sender) + { + if (!is_null($sender) && (mb_strlen($sender) > 15)) { + throw new \InvalidArgumentException('invalid length for $sender when calling UpdateSmsCampaign., must be smaller than or equal to 15.'); + } + + $this->container['sender'] = $sender; + + return $this; + } + + /** + * Gets content + * + * @return string + */ + public function getContent() + { + return $this->container['content']; + } + + /** + * Sets content + * + * @param string $content Content of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS + * + * @return $this + */ + public function setContent($content) + { + $this->container['content'] = $content; + + return $this; + } + + /** + * Gets recipients + * + * @return \Brevo\Client\Model\CreateSmsCampaignRecipients + */ + public function getRecipients() + { + return $this->container['recipients']; + } + + /** + * Sets recipients + * + * @param \Brevo\Client\Model\CreateSmsCampaignRecipients $recipients recipients + * + * @return $this + */ + public function setRecipients($recipients) + { + $this->container['recipients'] = $recipients; + + return $this; + } + + /** + * Gets scheduledAt + * + * @return string + */ + public function getScheduledAt() + { + return $this->container['scheduledAt']; + } + + /** + * Sets scheduledAt + * + * @param string $scheduledAt UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. + * + * @return $this + */ + public function setScheduledAt($scheduledAt) + { + $this->container['scheduledAt'] = $scheduledAt; + + return $this; + } + + /** + * Gets unicodeEnabled + * + * @return bool + */ + public function getUnicodeEnabled() + { + return $this->container['unicodeEnabled']; + } + + /** + * Sets unicodeEnabled + * + * @param bool $unicodeEnabled Format of the message. It indicates whether the content should be treated as unicode or not. + * + * @return $this + */ + public function setUnicodeEnabled($unicodeEnabled) + { + $this->container['unicodeEnabled'] = $unicodeEnabled; + + return $this; + } + + /** + * Gets organisationPrefix + * + * @return string + */ + public function getOrganisationPrefix() + { + return $this->container['organisationPrefix']; + } + + /** + * Sets organisationPrefix + * + * @param string $organisationPrefix A recognizable prefix will ensure your audience knows who you are. Recommended by U.S. carriers. This will be added as your Brand Name before the message content. **Prefer verifying maximum length of 160 characters including this prefix in message content to avoid multiple sending of same sms.** + * + * @return $this + */ + public function setOrganisationPrefix($organisationPrefix) + { + $this->container['organisationPrefix'] = $organisationPrefix; + + return $this; + } + + /** + * Gets unsubscribeInstruction + * + * @return string + */ + public function getUnsubscribeInstruction() + { + return $this->container['unsubscribeInstruction']; + } + + /** + * Sets unsubscribeInstruction + * + * @param string $unsubscribeInstruction Instructions to unsubscribe from future communications. Recommended by U.S. carriers. Must include **STOP** keyword. This will be added as instructions after the end of message content. **Prefer verifying maximum length of 160 characters including this instructions in message content to avoid multiple sending of same sms.** + * + * @return $this + */ + public function setUnsubscribeInstruction($unsubscribeInstruction) + { + $this->container['unsubscribeInstruction'] = $unsubscribeInstruction; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/UpdateSmtpTemplate.php b/vendor/getbrevo/brevo-php/lib/Model/UpdateSmtpTemplate.php new file mode 100644 index 0000000..a9d6dba --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/UpdateSmtpTemplate.php @@ -0,0 +1,575 @@ + 'string', + 'sender' => '\Brevo\Client\Model\UpdateSmtpTemplateSender', + 'templateName' => 'string', + 'htmlContent' => 'string', + 'htmlUrl' => 'string', + 'subject' => 'string', + 'replyTo' => 'string', + 'toField' => 'string', + 'attachmentUrl' => 'string', + 'isActive' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'tag' => null, + 'sender' => null, + 'templateName' => null, + 'htmlContent' => null, + 'htmlUrl' => 'url', + 'subject' => null, + 'replyTo' => 'email', + 'toField' => null, + 'attachmentUrl' => 'url', + 'isActive' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'tag' => 'tag', + 'sender' => 'sender', + 'templateName' => 'templateName', + 'htmlContent' => 'htmlContent', + 'htmlUrl' => 'htmlUrl', + 'subject' => 'subject', + 'replyTo' => 'replyTo', + 'toField' => 'toField', + 'attachmentUrl' => 'attachmentUrl', + 'isActive' => 'isActive' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'tag' => 'setTag', + 'sender' => 'setSender', + 'templateName' => 'setTemplateName', + 'htmlContent' => 'setHtmlContent', + 'htmlUrl' => 'setHtmlUrl', + 'subject' => 'setSubject', + 'replyTo' => 'setReplyTo', + 'toField' => 'setToField', + 'attachmentUrl' => 'setAttachmentUrl', + 'isActive' => 'setIsActive' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'tag' => 'getTag', + 'sender' => 'getSender', + 'templateName' => 'getTemplateName', + 'htmlContent' => 'getHtmlContent', + 'htmlUrl' => 'getHtmlUrl', + 'subject' => 'getSubject', + 'replyTo' => 'getReplyTo', + 'toField' => 'getToField', + 'attachmentUrl' => 'getAttachmentUrl', + 'isActive' => 'getIsActive' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; + $this->container['sender'] = isset($data['sender']) ? $data['sender'] : null; + $this->container['templateName'] = isset($data['templateName']) ? $data['templateName'] : null; + $this->container['htmlContent'] = isset($data['htmlContent']) ? $data['htmlContent'] : null; + $this->container['htmlUrl'] = isset($data['htmlUrl']) ? $data['htmlUrl'] : null; + $this->container['subject'] = isset($data['subject']) ? $data['subject'] : null; + $this->container['replyTo'] = isset($data['replyTo']) ? $data['replyTo'] : null; + $this->container['toField'] = isset($data['toField']) ? $data['toField'] : null; + $this->container['attachmentUrl'] = isset($data['attachmentUrl']) ? $data['attachmentUrl'] : null; + $this->container['isActive'] = isset($data['isActive']) ? $data['isActive'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets tag + * + * @return string + */ + public function getTag() + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string $tag Tag of the template + * + * @return $this + */ + public function setTag($tag) + { + $this->container['tag'] = $tag; + + return $this; + } + + /** + * Gets sender + * + * @return \Brevo\Client\Model\UpdateSmtpTemplateSender + */ + public function getSender() + { + return $this->container['sender']; + } + + /** + * Sets sender + * + * @param \Brevo\Client\Model\UpdateSmtpTemplateSender $sender sender + * + * @return $this + */ + public function setSender($sender) + { + $this->container['sender'] = $sender; + + return $this; + } + + /** + * Gets templateName + * + * @return string + */ + public function getTemplateName() + { + return $this->container['templateName']; + } + + /** + * Sets templateName + * + * @param string $templateName Name of the template + * + * @return $this + */ + public function setTemplateName($templateName) + { + $this->container['templateName'] = $templateName; + + return $this; + } + + /** + * Gets htmlContent + * + * @return string + */ + public function getHtmlContent() + { + return $this->container['htmlContent']; + } + + /** + * Sets htmlContent + * + * @param string $htmlContent Required if htmlUrl is empty. If the template is designed using Drag & Drop editor via HTML content, then the design page will not have Drag & Drop editor access for that template. Body of the message (HTML must have more than 10 characters) + * + * @return $this + */ + public function setHtmlContent($htmlContent) + { + $this->container['htmlContent'] = $htmlContent; + + return $this; + } + + /** + * Gets htmlUrl + * + * @return string + */ + public function getHtmlUrl() + { + return $this->container['htmlUrl']; + } + + /** + * Sets htmlUrl + * + * @param string $htmlUrl Required if htmlContent is empty. URL to the body of the email (HTML) + * + * @return $this + */ + public function setHtmlUrl($htmlUrl) + { + $this->container['htmlUrl'] = $htmlUrl; + + return $this; + } + + /** + * Gets subject + * + * @return string + */ + public function getSubject() + { + return $this->container['subject']; + } + + /** + * Sets subject + * + * @param string $subject Subject of the email + * + * @return $this + */ + public function setSubject($subject) + { + $this->container['subject'] = $subject; + + return $this; + } + + /** + * Gets replyTo + * + * @return string + */ + public function getReplyTo() + { + return $this->container['replyTo']; + } + + /** + * Sets replyTo + * + * @param string $replyTo Email on which campaign recipients will be able to reply to + * + * @return $this + */ + public function setReplyTo($replyTo) + { + $this->container['replyTo'] = $replyTo; + + return $this; + } + + /** + * Gets toField + * + * @return string + */ + public function getToField() + { + return $this->container['toField']; + } + + /** + * Sets toField + * + * @param string $toField To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your Brevo account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization + * + * @return $this + */ + public function setToField($toField) + { + $this->container['toField'] = $toField; + + return $this; + } + + /** + * Gets attachmentUrl + * + * @return string + */ + public function getAttachmentUrl() + { + return $this->container['attachmentUrl']; + } + + /** + * Sets attachmentUrl + * + * @param string $attachmentUrl Absolute url of the attachment (no local file). 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 + * + * @return $this + */ + public function setAttachmentUrl($attachmentUrl) + { + $this->container['attachmentUrl'] = $attachmentUrl; + + return $this; + } + + /** + * Gets isActive + * + * @return bool + */ + public function getIsActive() + { + return $this->container['isActive']; + } + + /** + * Sets isActive + * + * @param bool $isActive Status of the template. isActive = false means template is inactive, isActive = true means template is active + * + * @return $this + */ + public function setIsActive($isActive) + { + $this->container['isActive'] = $isActive; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/UpdateSmtpTemplateSender.php b/vendor/getbrevo/brevo-php/lib/Model/UpdateSmtpTemplateSender.php new file mode 100644 index 0000000..6997349 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/UpdateSmtpTemplateSender.php @@ -0,0 +1,366 @@ + 'string', + 'email' => 'string', + 'id' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null, + 'email' => 'email', + 'id' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'email' => 'email', + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'email' => 'setEmail', + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'email' => 'getEmail', + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the sender + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email Email of the sender + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id Select the sender for the template on the basis of sender id. In order to select a sender with specific pool of IP’s, dedicated ip users shall pass id (instead of email). + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/UpdateWebhook.php b/vendor/getbrevo/brevo-php/lib/Model/UpdateWebhook.php new file mode 100644 index 0000000..6b8d016 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/UpdateWebhook.php @@ -0,0 +1,539 @@ + 'string', + 'description' => 'string', + 'events' => 'string[]', + 'domain' => 'string', + 'batched' => 'bool', + 'auth' => '\Brevo\Client\Model\GetWebhookAuth', + 'headers' => '\Brevo\Client\Model\GetWebhookHeaders[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'url' => 'url', + 'description' => null, + 'events' => null, + 'domain' => null, + 'batched' => null, + 'auth' => null, + 'headers' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'url' => 'url', + 'description' => 'description', + 'events' => 'events', + 'domain' => 'domain', + 'batched' => 'batched', + 'auth' => 'auth', + 'headers' => 'headers' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'url' => 'setUrl', + 'description' => 'setDescription', + 'events' => 'setEvents', + 'domain' => 'setDomain', + 'batched' => 'setBatched', + 'auth' => 'setAuth', + 'headers' => 'setHeaders' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'url' => 'getUrl', + 'description' => 'getDescription', + 'events' => 'getEvents', + 'domain' => 'getDomain', + 'batched' => 'getBatched', + 'auth' => 'getAuth', + 'headers' => 'getHeaders' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const EVENTS_SENT = 'sent'; + const EVENTS_HARD_BOUNCE = 'hardBounce'; + const EVENTS_SOFT_BOUNCE = 'softBounce'; + const EVENTS_BLOCKED = 'blocked'; + const EVENTS_SPAM = 'spam'; + const EVENTS_DELIVERED = 'delivered'; + const EVENTS_REQUEST = 'request'; + const EVENTS_CLICK = 'click'; + const EVENTS_INVALID = 'invalid'; + const EVENTS_DEFERRED = 'deferred'; + const EVENTS_OPENED = 'opened'; + const EVENTS_UNIQUE_OPENED = 'uniqueOpened'; + const EVENTS_UNSUBSCRIBED = 'unsubscribed'; + const EVENTS_LIST_ADDITION = 'listAddition'; + const EVENTS_CONTACT_UPDATED = 'contactUpdated'; + const EVENTS_CONTACT_DELETED = 'contactDeleted'; + const EVENTS_INBOUND_EMAIL_PROCESSED = 'inboundEmailProcessed'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getEventsAllowableValues() + { + return [ + self::EVENTS_SENT, + self::EVENTS_HARD_BOUNCE, + self::EVENTS_SOFT_BOUNCE, + self::EVENTS_BLOCKED, + self::EVENTS_SPAM, + self::EVENTS_DELIVERED, + self::EVENTS_REQUEST, + self::EVENTS_CLICK, + self::EVENTS_INVALID, + self::EVENTS_DEFERRED, + self::EVENTS_OPENED, + self::EVENTS_UNIQUE_OPENED, + self::EVENTS_UNSUBSCRIBED, + self::EVENTS_LIST_ADDITION, + self::EVENTS_CONTACT_UPDATED, + self::EVENTS_CONTACT_DELETED, + self::EVENTS_INBOUND_EMAIL_PROCESSED, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['url'] = isset($data['url']) ? $data['url'] : null; + $this->container['description'] = isset($data['description']) ? $data['description'] : null; + $this->container['events'] = isset($data['events']) ? $data['events'] : null; + $this->container['domain'] = isset($data['domain']) ? $data['domain'] : null; + $this->container['batched'] = isset($data['batched']) ? $data['batched'] : null; + $this->container['auth'] = isset($data['auth']) ? $data['auth'] : null; + $this->container['headers'] = isset($data['headers']) ? $data['headers'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets url + * + * @return string + */ + public function getUrl() + { + return $this->container['url']; + } + + /** + * Sets url + * + * @param string $url URL of the webhook + * + * @return $this + */ + public function setUrl($url) + { + $this->container['url'] = $url; + + return $this; + } + + /** + * Gets description + * + * @return string + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string $description Description of the webhook + * + * @return $this + */ + public function setDescription($description) + { + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets events + * + * @return string[] + */ + public function getEvents() + { + return $this->container['events']; + } + + /** + * Sets events + * + * @param string[] $events - Events triggering the webhook. Possible values for **Transactional** type webhook: #### `sent` OR `request`, `delivered`, `hardBounce`, `softBounce`, `blocked`, `spam`, `invalid`, `deferred`, `click`, `opened`, `uniqueOpened` and `unsubscribed` - Possible values for **Marketing** type webhook: #### `spam`, `opened`, `click`, `hardBounce`, `softBounce`, `unsubscribed`, `listAddition` & `delivered` - Possible values for **Inbound** type webhook: #### `inboundEmailProcessed` + * + * @return $this + */ + public function setEvents($events) + { + $allowedValues = $this->getEventsAllowableValues(); + if (!is_null($events) && array_diff($events, $allowedValues)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'events', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['events'] = $events; + + return $this; + } + + /** + * Gets domain + * + * @return string + */ + public function getDomain() + { + return $this->container['domain']; + } + + /** + * Sets domain + * + * @param string $domain Inbound domain of webhook, used in case of event type `inbound` + * + * @return $this + */ + public function setDomain($domain) + { + $this->container['domain'] = $domain; + + return $this; + } + + /** + * Gets batched + * + * @return bool + */ + public function getBatched() + { + return $this->container['batched']; + } + + /** + * Sets batched + * + * @param bool $batched To send batched webhooks + * + * @return $this + */ + public function setBatched($batched) + { + $this->container['batched'] = $batched; + + return $this; + } + + /** + * Gets auth + * + * @return \Brevo\Client\Model\GetWebhookAuth + */ + public function getAuth() + { + return $this->container['auth']; + } + + /** + * Sets auth + * + * @param \Brevo\Client\Model\GetWebhookAuth $auth auth + * + * @return $this + */ + public function setAuth($auth) + { + $this->container['auth'] = $auth; + + return $this; + } + + /** + * Gets headers + * + * @return \Brevo\Client\Model\GetWebhookHeaders[] + */ + public function getHeaders() + { + return $this->container['headers']; + } + + /** + * Sets headers + * + * @param \Brevo\Client\Model\GetWebhookHeaders[] $headers Custom headers to be send with webhooks + * + * @return $this + */ + public function setHeaders($headers) + { + $this->container['headers'] = $headers; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/UpdateWhatsAppCampaign.php b/vendor/getbrevo/brevo-php/lib/Model/UpdateWhatsAppCampaign.php new file mode 100644 index 0000000..20a4879 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/UpdateWhatsAppCampaign.php @@ -0,0 +1,427 @@ + 'string', + 'campaignStatus' => 'string', + 'rescheduleFor' => 'string', + 'recipients' => '\Brevo\Client\Model\CreateWhatsAppCampaignRecipients' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'campaignName' => null, + 'campaignStatus' => null, + 'rescheduleFor' => null, + 'recipients' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'campaignName' => 'campaignName', + 'campaignStatus' => 'campaignStatus', + 'rescheduleFor' => 'rescheduleFor', + 'recipients' => 'recipients' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'campaignName' => 'setCampaignName', + 'campaignStatus' => 'setCampaignStatus', + 'rescheduleFor' => 'setRescheduleFor', + 'recipients' => 'setRecipients' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'campaignName' => 'getCampaignName', + 'campaignStatus' => 'getCampaignStatus', + 'rescheduleFor' => 'getRescheduleFor', + 'recipients' => 'getRecipients' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const CAMPAIGN_STATUS_SCHEDULED = 'scheduled'; + const CAMPAIGN_STATUS_SUSPENDED = 'suspended'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getCampaignStatusAllowableValues() + { + return [ + self::CAMPAIGN_STATUS_SCHEDULED, + self::CAMPAIGN_STATUS_SUSPENDED, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['campaignName'] = isset($data['campaignName']) ? $data['campaignName'] : null; + $this->container['campaignStatus'] = isset($data['campaignStatus']) ? $data['campaignStatus'] : 'scheduled'; + $this->container['rescheduleFor'] = isset($data['rescheduleFor']) ? $data['rescheduleFor'] : null; + $this->container['recipients'] = isset($data['recipients']) ? $data['recipients'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getCampaignStatusAllowableValues(); + if (!is_null($this->container['campaignStatus']) && !in_array($this->container['campaignStatus'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'campaignStatus', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets campaignName + * + * @return string + */ + public function getCampaignName() + { + return $this->container['campaignName']; + } + + /** + * Sets campaignName + * + * @param string $campaignName Name of the campaign + * + * @return $this + */ + public function setCampaignName($campaignName) + { + $this->container['campaignName'] = $campaignName; + + return $this; + } + + /** + * Gets campaignStatus + * + * @return string + */ + public function getCampaignStatus() + { + return $this->container['campaignStatus']; + } + + /** + * Sets campaignStatus + * + * @param string $campaignStatus Status of the campaign + * + * @return $this + */ + public function setCampaignStatus($campaignStatus) + { + $allowedValues = $this->getCampaignStatusAllowableValues(); + if (!is_null($campaignStatus) && !in_array($campaignStatus, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'campaignStatus', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['campaignStatus'] = $campaignStatus; + + return $this; + } + + /** + * Gets rescheduleFor + * + * @return string + */ + public function getRescheduleFor() + { + return $this->container['rescheduleFor']; + } + + /** + * Sets rescheduleFor + * + * @param string $rescheduleFor Reschedule the sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of campaign. **Prefer to pass your timezone in date-time format for accurate result.For example: **2017-06-01T12:30:00+02:00** Use this field to update the scheduledAt of any existing draft or scheduled WhatsApp campaign. + * + * @return $this + */ + public function setRescheduleFor($rescheduleFor) + { + $this->container['rescheduleFor'] = $rescheduleFor; + + return $this; + } + + /** + * Gets recipients + * + * @return \Brevo\Client\Model\CreateWhatsAppCampaignRecipients + */ + public function getRecipients() + { + return $this->container['recipients']; + } + + /** + * Sets recipients + * + * @param \Brevo\Client\Model\CreateWhatsAppCampaignRecipients $recipients recipients + * + * @return $this + */ + public function setRecipients($recipients) + { + $this->container['recipients'] = $recipients; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/UploadImageModel.php b/vendor/getbrevo/brevo-php/lib/Model/UploadImageModel.php new file mode 100644 index 0000000..7285b8f --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/UploadImageModel.php @@ -0,0 +1,308 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'url' => 'string' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'url' => 'url' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'url' => 'setUrl' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'url' => 'getUrl' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['url'] = isset($data['url']) ? $data['url'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['url'] === null) { + $invalidProperties[] = "'url' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets url + * + * @return string + */ + public function getUrl() + { + return $this->container['url']; + } + + /** + * Sets url + * + * @param string $url URL of the image uploaded + * + * @return $this + */ + public function setUrl($url) + { + $this->container['url'] = $url; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/UploadImageToGallery.php b/vendor/getbrevo/brevo-php/lib/Model/UploadImageToGallery.php new file mode 100644 index 0000000..7510add --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/UploadImageToGallery.php @@ -0,0 +1,338 @@ + 'string', + 'name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'imageUrl' => null, + 'name' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'imageUrl' => 'imageUrl', + 'name' => 'name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'imageUrl' => 'setImageUrl', + 'name' => 'setName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'imageUrl' => 'getImageUrl', + 'name' => 'getName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['imageUrl'] = isset($data['imageUrl']) ? $data['imageUrl'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['imageUrl'] === null) { + $invalidProperties[] = "'imageUrl' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets imageUrl + * + * @return string + */ + public function getImageUrl() + { + return $this->container['imageUrl']; + } + + /** + * Sets imageUrl + * + * @param string $imageUrl The absolute url of the image (no local file). Maximum allowed size for image is 2MB. Allowed extensions for images are - jpeg, jpg, png, bmp, gif. + * + * @return $this + */ + public function setImageUrl($imageUrl) + { + $this->container['imageUrl'] = $imageUrl; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the image. + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/VariablesItems.php b/vendor/getbrevo/brevo-php/lib/Model/VariablesItems.php new file mode 100644 index 0000000..e6c6864 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/VariablesItems.php @@ -0,0 +1,365 @@ + 'string', + 'default' => 'string', + 'datatype' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null, + 'default' => null, + 'datatype' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'default' => 'default', + 'datatype' => 'datatype' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'default' => 'setDefault', + 'datatype' => 'setDatatype' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'default' => 'getDefault', + 'datatype' => 'getDatatype' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['default'] = isset($data['default']) ? $data['default'] : null; + $this->container['datatype'] = isset($data['datatype']) ? $data['datatype'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name name + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets default + * + * @return string + */ + public function getDefault() + { + return $this->container['default']; + } + + /** + * Sets default + * + * @param string $default default + * + * @return $this + */ + public function setDefault($default) + { + $this->container['default'] = $default; + + return $this; + } + + /** + * Gets datatype + * + * @return string + */ + public function getDatatype() + { + return $this->container['datatype']; + } + + /** + * Sets datatype + * + * @param string $datatype datatype + * + * @return $this + */ + public function setDatatype($datatype) + { + $this->container['datatype'] = $datatype; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/WhatsappCampStats.php b/vendor/getbrevo/brevo-php/lib/Model/WhatsappCampStats.php new file mode 100644 index 0000000..8aacad6 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/WhatsappCampStats.php @@ -0,0 +1,440 @@ + 'int', + 'delivered' => 'int', + 'read' => 'int', + 'unsubscribe' => 'int', + 'notSent' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'sent' => null, + 'delivered' => null, + 'read' => null, + 'unsubscribe' => null, + 'notSent' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'sent' => 'sent', + 'delivered' => 'delivered', + 'read' => 'read', + 'unsubscribe' => 'unsubscribe', + 'notSent' => 'not_sent' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'sent' => 'setSent', + 'delivered' => 'setDelivered', + 'read' => 'setRead', + 'unsubscribe' => 'setUnsubscribe', + 'notSent' => 'setNotSent' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'sent' => 'getSent', + 'delivered' => 'getDelivered', + 'read' => 'getRead', + 'unsubscribe' => 'getUnsubscribe', + 'notSent' => 'getNotSent' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['sent'] = isset($data['sent']) ? $data['sent'] : null; + $this->container['delivered'] = isset($data['delivered']) ? $data['delivered'] : null; + $this->container['read'] = isset($data['read']) ? $data['read'] : null; + $this->container['unsubscribe'] = isset($data['unsubscribe']) ? $data['unsubscribe'] : null; + $this->container['notSent'] = isset($data['notSent']) ? $data['notSent'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['sent'] === null) { + $invalidProperties[] = "'sent' can't be null"; + } + if ($this->container['delivered'] === null) { + $invalidProperties[] = "'delivered' can't be null"; + } + if ($this->container['read'] === null) { + $invalidProperties[] = "'read' can't be null"; + } + if ($this->container['unsubscribe'] === null) { + $invalidProperties[] = "'unsubscribe' can't be null"; + } + if ($this->container['notSent'] === null) { + $invalidProperties[] = "'notSent' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets sent + * + * @return int + */ + public function getSent() + { + return $this->container['sent']; + } + + /** + * Sets sent + * + * @param int $sent sent + * + * @return $this + */ + public function setSent($sent) + { + $this->container['sent'] = $sent; + + return $this; + } + + /** + * Gets delivered + * + * @return int + */ + public function getDelivered() + { + return $this->container['delivered']; + } + + /** + * Sets delivered + * + * @param int $delivered delivered + * + * @return $this + */ + public function setDelivered($delivered) + { + $this->container['delivered'] = $delivered; + + return $this; + } + + /** + * Gets read + * + * @return int + */ + public function getRead() + { + return $this->container['read']; + } + + /** + * Sets read + * + * @param int $read read + * + * @return $this + */ + public function setRead($read) + { + $this->container['read'] = $read; + + return $this; + } + + /** + * Gets unsubscribe + * + * @return int + */ + public function getUnsubscribe() + { + return $this->container['unsubscribe']; + } + + /** + * Sets unsubscribe + * + * @param int $unsubscribe unsubscribe + * + * @return $this + */ + public function setUnsubscribe($unsubscribe) + { + $this->container['unsubscribe'] = $unsubscribe; + + return $this; + } + + /** + * Gets notSent + * + * @return int + */ + public function getNotSent() + { + return $this->container['notSent']; + } + + /** + * Sets notSent + * + * @param int $notSent notSent + * + * @return $this + */ + public function setNotSent($notSent) + { + $this->container['notSent'] = $notSent; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/Model/WhatsappCampTemplate.php b/vendor/getbrevo/brevo-php/lib/Model/WhatsappCampTemplate.php new file mode 100644 index 0000000..21e1005 --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/Model/WhatsappCampTemplate.php @@ -0,0 +1,605 @@ + 'string', + 'category' => 'string', + 'language' => 'string', + 'containsButton' => 'bool', + 'displayHeader' => 'bool', + 'headerType' => 'string', + 'components' => '\Brevo\Client\Model\ComponentItems[]', + 'headerVariables' => '\Brevo\Client\Model\VariablesItems[]', + 'bodyVariables' => '\Brevo\Client\Model\VariablesItems[]', + 'buttonType' => 'string', + 'hideFooter' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null, + 'category' => null, + 'language' => null, + 'containsButton' => null, + 'displayHeader' => null, + 'headerType' => null, + 'components' => null, + 'headerVariables' => null, + 'bodyVariables' => null, + 'buttonType' => null, + 'hideFooter' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'category' => 'category', + 'language' => 'language', + 'containsButton' => 'contains_button', + 'displayHeader' => 'display_header', + 'headerType' => 'header_type', + 'components' => 'components', + 'headerVariables' => 'header_variables', + 'bodyVariables' => 'body_variables', + 'buttonType' => 'button_type', + 'hideFooter' => 'hide_footer' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'category' => 'setCategory', + 'language' => 'setLanguage', + 'containsButton' => 'setContainsButton', + 'displayHeader' => 'setDisplayHeader', + 'headerType' => 'setHeaderType', + 'components' => 'setComponents', + 'headerVariables' => 'setHeaderVariables', + 'bodyVariables' => 'setBodyVariables', + 'buttonType' => 'setButtonType', + 'hideFooter' => 'setHideFooter' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'category' => 'getCategory', + 'language' => 'getLanguage', + 'containsButton' => 'getContainsButton', + 'displayHeader' => 'getDisplayHeader', + 'headerType' => 'getHeaderType', + 'components' => 'getComponents', + 'headerVariables' => 'getHeaderVariables', + 'bodyVariables' => 'getBodyVariables', + 'buttonType' => 'getButtonType', + 'hideFooter' => 'getHideFooter' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['category'] = isset($data['category']) ? $data['category'] : null; + $this->container['language'] = isset($data['language']) ? $data['language'] : null; + $this->container['containsButton'] = isset($data['containsButton']) ? $data['containsButton'] : null; + $this->container['displayHeader'] = isset($data['displayHeader']) ? $data['displayHeader'] : null; + $this->container['headerType'] = isset($data['headerType']) ? $data['headerType'] : null; + $this->container['components'] = isset($data['components']) ? $data['components'] : null; + $this->container['headerVariables'] = isset($data['headerVariables']) ? $data['headerVariables'] : null; + $this->container['bodyVariables'] = isset($data['bodyVariables']) ? $data['bodyVariables'] : null; + $this->container['buttonType'] = isset($data['buttonType']) ? $data['buttonType'] : null; + $this->container['hideFooter'] = isset($data['hideFooter']) ? $data['hideFooter'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name name of the template + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets category + * + * @return string + */ + public function getCategory() + { + return $this->container['category']; + } + + /** + * Sets category + * + * @param string $category description of the template + * + * @return $this + */ + public function setCategory($category) + { + $this->container['category'] = $category; + + return $this; + } + + /** + * Gets language + * + * @return string + */ + public function getLanguage() + { + return $this->container['language']; + } + + /** + * Sets language + * + * @param string $language language of the template + * + * @return $this + */ + public function setLanguage($language) + { + $this->container['language'] = $language; + + return $this; + } + + /** + * Gets containsButton + * + * @return bool + */ + public function getContainsButton() + { + return $this->container['containsButton']; + } + + /** + * Sets containsButton + * + * @param bool $containsButton containsButton + * + * @return $this + */ + public function setContainsButton($containsButton) + { + $this->container['containsButton'] = $containsButton; + + return $this; + } + + /** + * Gets displayHeader + * + * @return bool + */ + public function getDisplayHeader() + { + return $this->container['displayHeader']; + } + + /** + * Sets displayHeader + * + * @param bool $displayHeader displayHeader + * + * @return $this + */ + public function setDisplayHeader($displayHeader) + { + $this->container['displayHeader'] = $displayHeader; + + return $this; + } + + /** + * Gets headerType + * + * @return string + */ + public function getHeaderType() + { + return $this->container['headerType']; + } + + /** + * Sets headerType + * + * @param string $headerType type of header + * + * @return $this + */ + public function setHeaderType($headerType) + { + $this->container['headerType'] = $headerType; + + return $this; + } + + /** + * Gets components + * + * @return \Brevo\Client\Model\ComponentItems[] + */ + public function getComponents() + { + return $this->container['components']; + } + + /** + * Sets components + * + * @param \Brevo\Client\Model\ComponentItems[] $components array of component item objects + * + * @return $this + */ + public function setComponents($components) + { + $this->container['components'] = $components; + + return $this; + } + + /** + * Gets headerVariables + * + * @return \Brevo\Client\Model\VariablesItems[] + */ + public function getHeaderVariables() + { + return $this->container['headerVariables']; + } + + /** + * Sets headerVariables + * + * @param \Brevo\Client\Model\VariablesItems[] $headerVariables array of variables item object + * + * @return $this + */ + public function setHeaderVariables($headerVariables) + { + $this->container['headerVariables'] = $headerVariables; + + return $this; + } + + /** + * Gets bodyVariables + * + * @return \Brevo\Client\Model\VariablesItems[] + */ + public function getBodyVariables() + { + return $this->container['bodyVariables']; + } + + /** + * Sets bodyVariables + * + * @param \Brevo\Client\Model\VariablesItems[] $bodyVariables array of variables item variables + * + * @return $this + */ + public function setBodyVariables($bodyVariables) + { + $this->container['bodyVariables'] = $bodyVariables; + + return $this; + } + + /** + * Gets buttonType + * + * @return string + */ + public function getButtonType() + { + return $this->container['buttonType']; + } + + /** + * Sets buttonType + * + * @param string $buttonType buttonType + * + * @return $this + */ + public function setButtonType($buttonType) + { + $this->container['buttonType'] = $buttonType; + + return $this; + } + + /** + * Gets hideFooter + * + * @return bool + */ + public function getHideFooter() + { + return $this->container['hideFooter']; + } + + /** + * Sets hideFooter + * + * @param bool $hideFooter hideFooter + * + * @return $this + */ + public function setHideFooter($hideFooter) + { + $this->container['hideFooter'] = $hideFooter; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/vendor/getbrevo/brevo-php/lib/ObjectSerializer.php b/vendor/getbrevo/brevo-php/lib/ObjectSerializer.php new file mode 100644 index 0000000..a71301f --- /dev/null +++ b/vendor/getbrevo/brevo-php/lib/ObjectSerializer.php @@ -0,0 +1,322 @@ +format('Y-m-d') : $data->format(\DateTime::ATOM); + } elseif (is_array($data)) { + foreach ($data as $property => $value) { + $data[$property] = self::sanitizeForSerialization($value); + } + return $data; + } elseif ($data instanceof \stdClass) { + foreach ($data as $property => $value) { + $data->$property = self::sanitizeForSerialization($value); + } + return $data; + } elseif (is_object($data)) { + $values = []; + $formats = $data::swaggerFormats(); + foreach ($data::swaggerTypes() as $property => $swaggerType) { + $getter = $data::getters()[$property]; + $value = $data->$getter(); + if ($value !== null + && !in_array($swaggerType, ['DateTime', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true) + && method_exists($swaggerType, 'getAllowableEnumValues') + && !in_array($value, $swaggerType::getAllowableEnumValues(), true)) { + $imploded = implode("', '", $swaggerType::getAllowableEnumValues()); + throw new \InvalidArgumentException("Invalid value for enum '$swaggerType', must be one of: '$imploded'"); + } + if ($value !== null) { + $values[$data::attributeMap()[$property]] = self::sanitizeForSerialization($value, $swaggerType, $formats[$property]); + } + } + return (object)$values; + } else { + return (string)$data; + } + } + + /** + * Sanitize filename by removing path. + * e.g. ../../sun.gif becomes sun.gif + * + * @param string $filename filename to be sanitized + * + * @return string the sanitized filename + */ + public static function sanitizeFilename($filename) + { + if (preg_match("/.*[\/\\\\](.*)$/", $filename, $match)) { + return $match[1]; + } else { + return $filename; + } + } + + /** + * Take value and turn it into a string suitable for inclusion in + * the path, by url-encoding. + * + * @param string $value a string which will be part of the path + * + * @return string the serialized object + */ + public static function toPathValue($value) + { + return rawurlencode(self::toString($value)); + } + + /** + * Take value and turn it into a string suitable for inclusion in + * the query, by imploding comma-separated if it's an object. + * If it's a string, pass through unchanged. It will be url-encoded + * later. + * + * @param string[]|string|\DateTime $object an object to be serialized to a string + * + * @return string the serialized object + */ + public static function toQueryValue($object) + { + if (is_array($object)) { + return implode(',', $object); + } else { + return self::toString($object); + } + } + + /** + * Take value and turn it into a string suitable for inclusion in + * the header. If it's a string, pass through unchanged + * If it's a datetime object, format it in ISO8601 + * + * @param string $value a string which will be part of the header + * + * @return string the header string + */ + public static function toHeaderValue($value) + { + return self::toString($value); + } + + /** + * Take value and turn it into a string suitable for inclusion in + * the http body (form parameter). If it's a string, pass through unchanged + * If it's a datetime object, format it in ISO8601 + * + * @param string|\SplFileObject $value the value of the form parameter + * + * @return string the form string + */ + public static function toFormValue($value) + { + if ($value instanceof \SplFileObject) { + return $value->getRealPath(); + } else { + return self::toString($value); + } + } + + /** + * Take value and turn it into a string suitable for inclusion in + * the parameter. If it's a string, pass through unchanged + * If it's a datetime object, format it in ISO8601 + * + * @param string|\DateTime $value the value of the parameter + * + * @return string the header string + */ + public static function toString($value) + { + if ($value instanceof \DateTime) { // datetime in ISO8601 format + return $value->format(\DateTime::ATOM); + } else { + return $value; + } + } + + /** + * Serialize an array to a string. + * + * @param array $collection collection to serialize to a string + * @param string $collectionFormat the format use for serialization (csv, + * ssv, tsv, pipes, multi) + * @param bool $allowCollectionFormatMulti allow collection format to be a multidimensional array + * + * @return string + */ + public static function serializeCollection(array $collection, $collectionFormat, $allowCollectionFormatMulti = false) + { + if ($allowCollectionFormatMulti && ('multi' === $collectionFormat)) { + // http_build_query() almost does the job for us. We just + // need to fix the result of multidimensional arrays. + return preg_replace('/%5B[0-9]+%5D=/', '=', http_build_query($collection, '', '&')); + } + switch ($collectionFormat) { + case 'pipes': + return implode('|', $collection); + + case 'tsv': + return implode("\t", $collection); + + case 'ssv': + return implode(' ', $collection); + + case 'csv': + // Deliberate fall through. CSV is default format. + default: + return implode(',', $collection); + } + } + + /** + * Deserialize a JSON string into an object + * + * @param mixed $data object or primitive to be deserialized + * @param string $class class name is passed as a string + * @param string[] $httpHeaders HTTP headers + * @param string $discriminator discriminator if polymorphism is used + * + * @return object|array|null an single or an array of $class instances + */ + public static function deserialize($data, $class, $httpHeaders = null) + { + if (null === $data) { + return null; + } elseif (substr($class, 0, 4) === 'map[') { // for associative array e.g. map[string,int] + $inner = substr($class, 4, -1); + $deserialized = []; + if (strrpos($inner, ",") !== false) { + $subClass_array = explode(',', $inner, 2); + $subClass = $subClass_array[1]; + foreach ($data as $key => $value) { + $deserialized[$key] = self::deserialize($value, $subClass, null); + } + } + return $deserialized; + } elseif (strcasecmp(substr($class, -2), '[]') === 0) { + $subClass = substr($class, 0, -2); + $values = []; + foreach ($data as $key => $value) { + $values[] = self::deserialize($value, $subClass, null); + } + return $values; + } elseif ($class === 'object') { + settype($data, 'array'); + return $data; + } elseif ($class === '\DateTime') { + // Some API's return an invalid, empty string as a + // date-time property. DateTime::__construct() will return + // the current time for empty input which is probably not + // what is meant. The invalid empty string is probably to + // be interpreted as a missing field/value. Let's handle + // this graceful. + if (!empty($data)) { + return new \DateTime($data); + } else { + return null; + } + } elseif (in_array($class, ['DateTime', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + settype($data, $class); + return $data; + } elseif ($class === '\SplFileObject') { + /** @var \Psr\Http\Message\StreamInterface $data */ + + // determine file name + if (array_key_exists('Content-Disposition', $httpHeaders) && + preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match)) { + $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . DIRECTORY_SEPARATOR . self::sanitizeFilename($match[1]); + } else { + $filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), ''); + } + + $file = fopen($filename, 'w'); + while ($chunk = $data->read(200)) { + fwrite($file, $chunk); + } + fclose($file); + + return new \SplFileObject($filename, 'r'); + } elseif (method_exists($class, 'getAllowableEnumValues')) { + if (!in_array($data, $class::getAllowableEnumValues(), true)) { + $imploded = implode("', '", $class::getAllowableEnumValues()); + throw new \InvalidArgumentException("Invalid value for enum '$class', must be one of: '$imploded'"); + } + return $data; + } else { + // If a discriminator is defined and points to a valid subclass, use it. + $discriminator = $class::DISCRIMINATOR; + if (!empty($discriminator) && isset($data->{$discriminator}) && is_string($data->{$discriminator})) { + $subclass = '\Brevo\Client\Model\\' . $data->{$discriminator}; + if (is_subclass_of($subclass, $class)) { + $class = $subclass; + } + } + $instance = new $class(); + foreach ($instance::swaggerTypes() as $property => $type) { + $propertySetter = $instance::setters()[$property]; + + if (!isset($propertySetter) || !isset($data->{$instance::attributeMap()[$property]})) { + continue; + } + + $propertyValue = $data->{$instance::attributeMap()[$property]}; + if (isset($propertyValue)) { + $instance->$propertySetter(self::deserialize($propertyValue, $type, null)); + } + } + return $instance; + } + } +} diff --git a/vendor/getbrevo/brevo-php/phpunit.xml.dist b/vendor/getbrevo/brevo-php/phpunit.xml.dist new file mode 100755 index 0000000..c12ee14 --- /dev/null +++ b/vendor/getbrevo/brevo-php/phpunit.xml.dist @@ -0,0 +1,21 @@ + + + + + ./test/Api + ./test/Model + + + + + + ./lib/Api + ./lib/Model + + + diff --git a/vendor/getbrevo/brevo-php/test/Api/AccountApiTest.php b/vendor/getbrevo/brevo-php/test/Api/AccountApiTest.php new file mode 100644 index 0000000..82e5420 --- /dev/null +++ b/vendor/getbrevo/brevo-php/test/Api/AccountApiTest.php @@ -0,0 +1,93 @@ += 5.5 +* Updated to use PSR-7 + * Requires immutable messages, which basically means an event based system + owned by a request instance is no longer possible. + * Utilizing the [Guzzle PSR-7 package](https://github.com/guzzle/psr7). + * Removed the dependency on `guzzlehttp/streams`. These stream abstractions + are available in the `guzzlehttp/psr7` package under the `GuzzleHttp\Psr7` + namespace. +* Added middleware and handler system + * Replaced the Guzzle event and subscriber system with a middleware system. + * No longer depends on RingPHP, but rather places the HTTP handlers directly + in Guzzle, operating on PSR-7 messages. + * Retry logic is now encapsulated in `GuzzleHttp\Middleware::retry`, which + means the `guzzlehttp/retry-subscriber` is now obsolete. + * Mocking responses is now handled using `GuzzleHttp\Handler\MockHandler`. +* Asynchronous responses + * No longer supports the `future` request option to send an async request. + Instead, use one of the `*Async` methods of a client (e.g., `requestAsync`, + `getAsync`, etc.). + * Utilizing `GuzzleHttp\Promise` instead of React's promise library to avoid + recursion required by chaining and forwarding react promises. See + https://github.com/guzzle/promises + * Added `requestAsync` and `sendAsync` to send request asynchronously. + * Added magic methods for `getAsync()`, `postAsync()`, etc. to send requests + asynchronously. +* Request options + * POST and form updates + * Added the `form_fields` and `form_files` request options. + * Removed the `GuzzleHttp\Post` namespace. + * The `body` request option no longer accepts an array for POST requests. + * The `exceptions` request option has been deprecated in favor of the + `http_errors` request options. + * The `save_to` request option has been deprecated in favor of `sink` request + option. +* Clients no longer accept an array of URI template string and variables for + URI variables. You will need to expand URI templates before passing them + into a client constructor or request method. +* Client methods `get()`, `post()`, `put()`, `patch()`, `options()`, etc. are + now magic methods that will send synchronous requests. +* Replaced `Utils.php` with plain functions in `functions.php`. +* Removed `GuzzleHttp\Collection`. +* Removed `GuzzleHttp\BatchResults`. Batched pool results are now returned as + an array. +* Removed `GuzzleHttp\Query`. Query string handling is now handled using an + associative array passed into the `query` request option. The query string + is serialized using PHP's `http_build_query`. If you need more control, you + can pass the query string in as a string. +* `GuzzleHttp\QueryParser` has been replaced with the + `GuzzleHttp\Psr7\parse_query`. + + +## 5.2.0 - 2015-01-27 + +* Added `AppliesHeadersInterface` to make applying headers to a request based + on the body more generic and not specific to `PostBodyInterface`. +* Reduced the number of stack frames needed to send requests. +* Nested futures are now resolved in the client rather than the RequestFsm +* Finishing state transitions is now handled in the RequestFsm rather than the + RingBridge. +* Added a guard in the Pool class to not use recursion for request retries. + + +## 5.1.0 - 2014-12-19 + +* Pool class no longer uses recursion when a request is intercepted. +* The size of a Pool can now be dynamically adjusted using a callback. + See https://github.com/guzzle/guzzle/pull/943. +* Setting a request option to `null` when creating a request with a client will + ensure that the option is not set. This allows you to overwrite default + request options on a per-request basis. + See https://github.com/guzzle/guzzle/pull/937. +* Added the ability to limit which protocols are allowed for redirects by + specifying a `protocols` array in the `allow_redirects` request option. +* Nested futures due to retries are now resolved when waiting for synchronous + responses. See https://github.com/guzzle/guzzle/pull/947. +* `"0"` is now an allowed URI path. See + https://github.com/guzzle/guzzle/pull/935. +* `Query` no longer typehints on the `$query` argument in the constructor, + allowing for strings and arrays. +* Exceptions thrown in the `end` event are now correctly wrapped with Guzzle + specific exceptions if necessary. + + +## 5.0.3 - 2014-11-03 + +This change updates query strings so that they are treated as un-encoded values +by default where the value represents an un-encoded value to send over the +wire. A Query object then encodes the value before sending over the wire. This +means that even value query string values (e.g., ":") are url encoded. This +makes the Query class match PHP's http_build_query function. However, if you +want to send requests over the wire using valid query string characters that do +not need to be encoded, then you can provide a string to Url::setQuery() and +pass true as the second argument to specify that the query string is a raw +string that should not be parsed or encoded (unless a call to getQuery() is +subsequently made, forcing the query-string to be converted into a Query +object). + + +## 5.0.2 - 2014-10-30 + +* Added a trailing `\r\n` to multipart/form-data payloads. See + https://github.com/guzzle/guzzle/pull/871 +* Added a `GuzzleHttp\Pool::send()` convenience method to match the docs. +* Status codes are now returned as integers. See + https://github.com/guzzle/guzzle/issues/881 +* No longer overwriting an existing `application/x-www-form-urlencoded` header + when sending POST requests, allowing for customized headers. See + https://github.com/guzzle/guzzle/issues/877 +* Improved path URL serialization. + + * No longer double percent-encoding characters in the path or query string if + they are already encoded. + * Now properly encoding the supplied path to a URL object, instead of only + encoding ' ' and '?'. + * Note: This has been changed in 5.0.3 to now encode query string values by + default unless the `rawString` argument is provided when setting the query + string on a URL: Now allowing many more characters to be present in the + query string without being percent encoded. See + https://datatracker.ietf.org/doc/html/rfc3986#appendix-A + + +## 5.0.1 - 2014-10-16 + +Bugfix release. + +* Fixed an issue where connection errors still returned response object in + error and end events event though the response is unusable. This has been + corrected so that a response is not returned in the `getResponse` method of + these events if the response did not complete. https://github.com/guzzle/guzzle/issues/867 +* Fixed an issue where transfer statistics were not being populated in the + RingBridge. https://github.com/guzzle/guzzle/issues/866 + + +## 5.0.0 - 2014-10-12 + +Adding support for non-blocking responses and some minor API cleanup. + +### New Features + +* Added support for non-blocking responses based on `guzzlehttp/guzzle-ring`. +* Added a public API for creating a default HTTP adapter. +* Updated the redirect plugin to be non-blocking so that redirects are sent + concurrently. Other plugins like this can now be updated to be non-blocking. +* Added a "progress" event so that you can get upload and download progress + events. +* Added `GuzzleHttp\Pool` which implements FutureInterface and transfers + requests concurrently using a capped pool size as efficiently as possible. +* Added `hasListeners()` to EmitterInterface. +* Removed `GuzzleHttp\ClientInterface::sendAll` and marked + `GuzzleHttp\Client::sendAll` as deprecated (it's still there, just not the + recommended way). + +### Breaking changes + +The breaking changes in this release are relatively minor. The biggest thing to +look out for is that request and response objects no longer implement fluent +interfaces. + +* Removed the fluent interfaces (i.e., `return $this`) from requests, + responses, `GuzzleHttp\Collection`, `GuzzleHttp\Url`, + `GuzzleHttp\Query`, `GuzzleHttp\Post\PostBody`, and + `GuzzleHttp\Cookie\SetCookie`. This blog post provides a good outline of + why I did this: https://ocramius.github.io/blog/fluent-interfaces-are-evil/. + This also makes the Guzzle message interfaces compatible with the current + PSR-7 message proposal. +* Removed "functions.php", so that Guzzle is truly PSR-4 compliant. Except + for the HTTP request functions from function.php, these functions are now + implemented in `GuzzleHttp\Utils` using camelCase. `GuzzleHttp\json_decode` + moved to `GuzzleHttp\Utils::jsonDecode`. `GuzzleHttp\get_path` moved to + `GuzzleHttp\Utils::getPath`. `GuzzleHttp\set_path` moved to + `GuzzleHttp\Utils::setPath`. `GuzzleHttp\batch` should now be + `GuzzleHttp\Pool::batch`, which returns an `objectStorage`. Using functions.php + caused problems for many users: they aren't PSR-4 compliant, require an + explicit include, and needed an if-guard to ensure that the functions are not + declared multiple times. +* Rewrote adapter layer. + * Removing all classes from `GuzzleHttp\Adapter`, these are now + implemented as callables that are stored in `GuzzleHttp\Ring\Client`. + * Removed the concept of "parallel adapters". Sending requests serially or + concurrently is now handled using a single adapter. + * Moved `GuzzleHttp\Adapter\Transaction` to `GuzzleHttp\Transaction`. The + Transaction object now exposes the request, response, and client as public + properties. The getters and setters have been removed. +* Removed the "headers" event. This event was only useful for changing the + body a response once the headers of the response were known. You can implement + a similar behavior in a number of ways. One example might be to use a + FnStream that has access to the transaction being sent. For example, when the + first byte is written, you could check if the response headers match your + expectations, and if so, change the actual stream body that is being + written to. +* Removed the `asArray` parameter from + `GuzzleHttp\Message\MessageInterface::getHeader`. If you want to get a header + value as an array, then use the newly added `getHeaderAsArray()` method of + `MessageInterface`. This change makes the Guzzle interfaces compatible with + the PSR-7 interfaces. +* `GuzzleHttp\Message\MessageFactory` no longer allows subclasses to add + custom request options using double-dispatch (this was an implementation + detail). Instead, you should now provide an associative array to the + constructor which is a mapping of the request option name mapping to a + function that applies the option value to a request. +* Removed the concept of "throwImmediately" from exceptions and error events. + This control mechanism was used to stop a transfer of concurrent requests + from completing. This can now be handled by throwing the exception or by + cancelling a pool of requests or each outstanding future request individually. +* Updated to "GuzzleHttp\Streams" 3.0. + * `GuzzleHttp\Stream\StreamInterface::getContents()` no longer accepts a + `maxLen` parameter. This update makes the Guzzle streams project + compatible with the current PSR-7 proposal. + * `GuzzleHttp\Stream\Stream::__construct`, + `GuzzleHttp\Stream\Stream::factory`, and + `GuzzleHttp\Stream\Utils::create` no longer accept a size in the second + argument. They now accept an associative array of options, including the + "size" key and "metadata" key which can be used to provide custom metadata. + + +## 4.2.2 - 2014-09-08 + +* Fixed a memory leak in the CurlAdapter when reusing cURL handles. +* No longer using `request_fulluri` in stream adapter proxies. +* Relative redirects are now based on the last response, not the first response. + +## 4.2.1 - 2014-08-19 + +* Ensuring that the StreamAdapter does not always add a Content-Type header +* Adding automated github releases with a phar and zip + +## 4.2.0 - 2014-08-17 + +* Now merging in default options using a case-insensitive comparison. + Closes https://github.com/guzzle/guzzle/issues/767 +* Added the ability to automatically decode `Content-Encoding` response bodies + using the `decode_content` request option. This is set to `true` by default + to decode the response body if it comes over the wire with a + `Content-Encoding`. Set this value to `false` to disable decoding the + response content, and pass a string to provide a request `Accept-Encoding` + header and turn on automatic response decoding. This feature now allows you + to pass an `Accept-Encoding` header in the headers of a request but still + disable automatic response decoding. + Closes https://github.com/guzzle/guzzle/issues/764 +* Added the ability to throw an exception immediately when transferring + requests in parallel. Closes https://github.com/guzzle/guzzle/issues/760 +* Updating guzzlehttp/streams dependency to ~2.1 +* No longer utilizing the now deprecated namespaced methods from the stream + package. + +## 4.1.8 - 2014-08-14 + +* Fixed an issue in the CurlFactory that caused setting the `stream=false` + request option to throw an exception. + See: https://github.com/guzzle/guzzle/issues/769 +* TransactionIterator now calls rewind on the inner iterator. + See: https://github.com/guzzle/guzzle/pull/765 +* You can now set the `Content-Type` header to `multipart/form-data` + when creating POST requests to force multipart bodies. + See https://github.com/guzzle/guzzle/issues/768 + +## 4.1.7 - 2014-08-07 + +* Fixed an error in the HistoryPlugin that caused the same request and response + to be logged multiple times when an HTTP protocol error occurs. +* Ensuring that cURL does not add a default Content-Type when no Content-Type + has been supplied by the user. This prevents the adapter layer from modifying + the request that is sent over the wire after any listeners may have already + put the request in a desired state (e.g., signed the request). +* Throwing an exception when you attempt to send requests that have the + "stream" set to true in parallel using the MultiAdapter. +* Only calling curl_multi_select when there are active cURL handles. This was + previously changed and caused performance problems on some systems due to PHP + always selecting until the maximum select timeout. +* Fixed a bug where multipart/form-data POST fields were not correctly + aggregated (e.g., values with "&"). + +## 4.1.6 - 2014-08-03 + +* Added helper methods to make it easier to represent messages as strings, + including getting the start line and getting headers as a string. + +## 4.1.5 - 2014-08-02 + +* Automatically retrying cURL "Connection died, retrying a fresh connect" + errors when possible. +* cURL implementation cleanup +* Allowing multiple event subscriber listeners to be registered per event by + passing an array of arrays of listener configuration. + +## 4.1.4 - 2014-07-22 + +* Fixed a bug that caused multi-part POST requests with more than one field to + serialize incorrectly. +* Paths can now be set to "0" +* `ResponseInterface::xml` now accepts a `libxml_options` option and added a + missing default argument that was required when parsing XML response bodies. +* A `save_to` stream is now created lazily, which means that files are not + created on disk unless a request succeeds. + +## 4.1.3 - 2014-07-15 + +* Various fixes to multipart/form-data POST uploads +* Wrapping function.php in an if-statement to ensure Guzzle can be used + globally and in a Composer install +* Fixed an issue with generating and merging in events to an event array +* POST headers are only applied before sending a request to allow you to change + the query aggregator used before uploading +* Added much more robust query string parsing +* Fixed various parsing and normalization issues with URLs +* Fixing an issue where multi-valued headers were not being utilized correctly + in the StreamAdapter + +## 4.1.2 - 2014-06-18 + +* Added support for sending payloads with GET requests + +## 4.1.1 - 2014-06-08 + +* Fixed an issue related to using custom message factory options in subclasses +* Fixed an issue with nested form fields in a multi-part POST +* Fixed an issue with using the `json` request option for POST requests +* Added `ToArrayInterface` to `GuzzleHttp\Cookie\CookieJar` + +## 4.1.0 - 2014-05-27 + +* Added a `json` request option to easily serialize JSON payloads. +* Added a `GuzzleHttp\json_decode()` wrapper to safely parse JSON. +* Added `setPort()` and `getPort()` to `GuzzleHttp\Message\RequestInterface`. +* Added the ability to provide an emitter to a client in the client constructor. +* Added the ability to persist a cookie session using $_SESSION. +* Added a trait that can be used to add event listeners to an iterator. +* Removed request method constants from RequestInterface. +* Fixed warning when invalid request start-lines are received. +* Updated MessageFactory to work with custom request option methods. +* Updated cacert bundle to latest build. + +4.0.2 (2014-04-16) +------------------ + +* Proxy requests using the StreamAdapter now properly use request_fulluri (#632) +* Added the ability to set scalars as POST fields (#628) + +## 4.0.1 - 2014-04-04 + +* The HTTP status code of a response is now set as the exception code of + RequestException objects. +* 303 redirects will now correctly switch from POST to GET requests. +* The default parallel adapter of a client now correctly uses the MultiAdapter. +* HasDataTrait now initializes the internal data array as an empty array so + that the toArray() method always returns an array. + +## 4.0.0 - 2014-03-29 + +* For information on changes and upgrading, see: + https://github.com/guzzle/guzzle/blob/master/UPGRADING.md#3x-to-40 +* Added `GuzzleHttp\batch()` as a convenience function for sending requests in + parallel without needing to write asynchronous code. +* Restructured how events are added to `GuzzleHttp\ClientInterface::sendAll()`. + You can now pass a callable or an array of associative arrays where each + associative array contains the "fn", "priority", and "once" keys. + +## 4.0.0.rc-2 - 2014-03-25 + +* Removed `getConfig()` and `setConfig()` from clients to avoid confusion + around whether things like base_url, message_factory, etc. should be able to + be retrieved or modified. +* Added `getDefaultOption()` and `setDefaultOption()` to ClientInterface +* functions.php functions were renamed using snake_case to match PHP idioms +* Added support for `HTTP_PROXY`, `HTTPS_PROXY`, and + `GUZZLE_CURL_SELECT_TIMEOUT` environment variables +* Added the ability to specify custom `sendAll()` event priorities +* Added the ability to specify custom stream context options to the stream + adapter. +* Added a functions.php function for `get_path()` and `set_path()` +* CurlAdapter and MultiAdapter now use a callable to generate curl resources +* MockAdapter now properly reads a body and emits a `headers` event +* Updated Url class to check if a scheme and host are set before adding ":" + and "//". This allows empty Url (e.g., "") to be serialized as "". +* Parsing invalid XML no longer emits warnings +* Curl classes now properly throw AdapterExceptions +* Various performance optimizations +* Streams are created with the faster `Stream\create()` function +* Marked deprecation_proxy() as internal +* Test server is now a collection of static methods on a class + +## 4.0.0-rc.1 - 2014-03-15 + +* See https://github.com/guzzle/guzzle/blob/master/UPGRADING.md#3x-to-40 + +## 3.8.1 - 2014-01-28 + +* Bug: Always using GET requests when redirecting from a 303 response +* Bug: CURLOPT_SSL_VERIFYHOST is now correctly set to false when setting `$certificateAuthority` to false in + `Guzzle\Http\ClientInterface::setSslVerification()` +* Bug: RedirectPlugin now uses strict RFC 3986 compliance when combining a base URL with a relative URL +* Bug: The body of a request can now be set to `"0"` +* Sending PHP stream requests no longer forces `HTTP/1.0` +* Adding more information to ExceptionCollection exceptions so that users have more context, including a stack trace of + each sub-exception +* Updated the `$ref` attribute in service descriptions to merge over any existing parameters of a schema (rather than + clobbering everything). +* Merging URLs will now use the query string object from the relative URL (thus allowing custom query aggregators) +* Query strings are now parsed in a way that they do no convert empty keys with no value to have a dangling `=`. + For example `foo&bar=baz` is now correctly parsed and recognized as `foo&bar=baz` rather than `foo=&bar=baz`. +* Now properly escaping the regular expression delimiter when matching Cookie domains. +* Network access is now disabled when loading XML documents + +## 3.8.0 - 2013-12-05 + +* Added the ability to define a POST name for a file +* JSON response parsing now properly walks additionalProperties +* cURL error code 18 is now retried automatically in the BackoffPlugin +* Fixed a cURL error when URLs contain fragments +* Fixed an issue in the BackoffPlugin retry event where it was trying to access all exceptions as if they were + CurlExceptions +* CURLOPT_PROGRESS function fix for PHP 5.5 (69fcc1e) +* Added the ability for Guzzle to work with older versions of cURL that do not support `CURLOPT_TIMEOUT_MS` +* Fixed a bug that was encountered when parsing empty header parameters +* UriTemplate now has a `setRegex()` method to match the docs +* The `debug` request parameter now checks if it is truthy rather than if it exists +* Setting the `debug` request parameter to true shows verbose cURL output instead of using the LogPlugin +* Added the ability to combine URLs using strict RFC 3986 compliance +* Command objects can now return the validation errors encountered by the command +* Various fixes to cache revalidation (#437 and 29797e5) +* Various fixes to the AsyncPlugin +* Cleaned up build scripts + +## 3.7.4 - 2013-10-02 + +* Bug fix: 0 is now an allowed value in a description parameter that has a default value (#430) +* Bug fix: SchemaFormatter now returns an integer when formatting to a Unix timestamp + (see https://github.com/aws/aws-sdk-php/issues/147) +* Bug fix: Cleaned up and fixed URL dot segment removal to properly resolve internal dots +* Minimum PHP version is now properly specified as 5.3.3 (up from 5.3.2) (#420) +* Updated the bundled cacert.pem (#419) +* OauthPlugin now supports adding authentication to headers or query string (#425) + +## 3.7.3 - 2013-09-08 + +* Added the ability to get the exception associated with a request/command when using `MultiTransferException` and + `CommandTransferException`. +* Setting `additionalParameters` of a response to false is now honored when parsing responses with a service description +* Schemas are only injected into response models when explicitly configured. +* No longer guessing Content-Type based on the path of a request. Content-Type is now only guessed based on the path of + an EntityBody. +* Bug fix: ChunkedIterator can now properly chunk a \Traversable as well as an \Iterator. +* Bug fix: FilterIterator now relies on `\Iterator` instead of `\Traversable`. +* Bug fix: Gracefully handling malformed responses in RequestMediator::writeResponseBody() +* Bug fix: Replaced call to canCache with canCacheRequest in the CallbackCanCacheStrategy of the CachePlugin +* Bug fix: Visiting XML attributes first before visiting XML children when serializing requests +* Bug fix: Properly parsing headers that contain commas contained in quotes +* Bug fix: mimetype guessing based on a filename is now case-insensitive + +## 3.7.2 - 2013-08-02 + +* Bug fix: Properly URL encoding paths when using the PHP-only version of the UriTemplate expander + See https://github.com/guzzle/guzzle/issues/371 +* Bug fix: Cookie domains are now matched correctly according to RFC 6265 + See https://github.com/guzzle/guzzle/issues/377 +* Bug fix: GET parameters are now used when calculating an OAuth signature +* Bug fix: Fixed an issue with cache revalidation where the If-None-Match header was being double quoted +* `Guzzle\Common\AbstractHasDispatcher::dispatch()` now returns the event that was dispatched +* `Guzzle\Http\QueryString::factory()` now guesses the most appropriate query aggregator to used based on the input. + See https://github.com/guzzle/guzzle/issues/379 +* Added a way to add custom domain objects to service description parsing using the `operation.parse_class` event. See + https://github.com/guzzle/guzzle/pull/380 +* cURL multi cleanup and optimizations + +## 3.7.1 - 2013-07-05 + +* Bug fix: Setting default options on a client now works +* Bug fix: Setting options on HEAD requests now works. See #352 +* Bug fix: Moving stream factory before send event to before building the stream. See #353 +* Bug fix: Cookies no longer match on IP addresses per RFC 6265 +* Bug fix: Correctly parsing header parameters that are in `<>` and quotes +* Added `cert` and `ssl_key` as request options +* `Host` header can now diverge from the host part of a URL if the header is set manually +* `Guzzle\Service\Command\LocationVisitor\Request\XmlVisitor` was rewritten to change from using SimpleXML to XMLWriter +* OAuth parameters are only added via the plugin if they aren't already set +* Exceptions are now thrown when a URL cannot be parsed +* Returning `false` if `Guzzle\Http\EntityBody::getContentMd5()` fails +* Not setting a `Content-MD5` on a command if calculating the Content-MD5 fails via the CommandContentMd5Plugin + +## 3.7.0 - 2013-06-10 + +* See UPGRADING.md for more information on how to upgrade. +* Requests now support the ability to specify an array of $options when creating a request to more easily modify a + request. You can pass a 'request.options' configuration setting to a client to apply default request options to + every request created by a client (e.g. default query string variables, headers, curl options, etc.). +* Added a static facade class that allows you to use Guzzle with static methods and mount the class to `\Guzzle`. + See `Guzzle\Http\StaticClient::mount`. +* Added `command.request_options` to `Guzzle\Service\Command\AbstractCommand` to pass request options to requests + created by a command (e.g. custom headers, query string variables, timeout settings, etc.). +* Stream size in `Guzzle\Stream\PhpStreamRequestFactory` will now be set if Content-Length is returned in the + headers of a response +* Added `Guzzle\Common\Collection::setPath($path, $value)` to set a value into an array using a nested key + (e.g. `$collection->setPath('foo/baz/bar', 'test'); echo $collection['foo']['bar']['bar'];`) +* ServiceBuilders now support storing and retrieving arbitrary data +* CachePlugin can now purge all resources for a given URI +* CachePlugin can automatically purge matching cached items when a non-idempotent request is sent to a resource +* CachePlugin now uses the Vary header to determine if a resource is a cache hit +* `Guzzle\Http\Message\Response` now implements `\Serializable` +* Added `Guzzle\Cache\CacheAdapterFactory::fromCache()` to more easily create cache adapters +* `Guzzle\Service\ClientInterface::execute()` now accepts an array, single command, or Traversable +* Fixed a bug in `Guzzle\Http\Message\Header\Link::addLink()` +* Better handling of calculating the size of a stream in `Guzzle\Stream\Stream` using fstat() and caching the size +* `Guzzle\Common\Exception\ExceptionCollection` now creates a more readable exception message +* Fixing BC break: Added back the MonologLogAdapter implementation rather than extending from PsrLog so that older + Symfony users can still use the old version of Monolog. +* Fixing BC break: Added the implementation back in for `Guzzle\Http\Message\AbstractMessage::getTokenizedHeader()`. + Now triggering an E_USER_DEPRECATED warning when used. Use `$message->getHeader()->parseParams()`. +* Several performance improvements to `Guzzle\Common\Collection` +* Added an `$options` argument to the end of the following methods of `Guzzle\Http\ClientInterface`: + createRequest, head, delete, put, patch, post, options, prepareRequest +* Added an `$options` argument to the end of `Guzzle\Http\Message\Request\RequestFactoryInterface::createRequest()` +* Added an `applyOptions()` method to `Guzzle\Http\Message\Request\RequestFactoryInterface` +* Changed `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $body = null)` to + `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $options = array())`. You can still pass in a + resource, string, or EntityBody into the $options parameter to specify the download location of the response. +* Changed `Guzzle\Common\Collection::__construct($data)` to no longer accepts a null value for `$data` but a + default `array()` +* Added `Guzzle\Stream\StreamInterface::isRepeatable` +* Removed `Guzzle\Http\ClientInterface::setDefaultHeaders(). Use + $client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`. or + $client->getConfig()->setPath('request.options/headers', array('header_name' => 'value'))`. +* Removed `Guzzle\Http\ClientInterface::getDefaultHeaders(). Use $client->getConfig()->getPath('request.options/headers')`. +* Removed `Guzzle\Http\ClientInterface::expandTemplate()` +* Removed `Guzzle\Http\ClientInterface::setRequestFactory()` +* Removed `Guzzle\Http\ClientInterface::getCurlMulti()` +* Removed `Guzzle\Http\Message\RequestInterface::canCache` +* Removed `Guzzle\Http\Message\RequestInterface::setIsRedirect` +* Removed `Guzzle\Http\Message\RequestInterface::isRedirect` +* Made `Guzzle\Http\Client::expandTemplate` and `getUriTemplate` protected methods. +* You can now enable E_USER_DEPRECATED warnings to see if you are using a deprecated method by setting + `Guzzle\Common\Version::$emitWarnings` to true. +* Marked `Guzzle\Http\Message\Request::isResponseBodyRepeatable()` as deprecated. Use + `$request->getResponseBody()->isRepeatable()` instead. +* Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use + `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead. +* Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use + `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead. +* Marked `Guzzle\Http\Message\Request::setIsRedirect()` as deprecated. Use the HistoryPlugin instead. +* Marked `Guzzle\Http\Message\Request::isRedirect()` as deprecated. Use the HistoryPlugin instead. +* Marked `Guzzle\Cache\CacheAdapterFactory::factory()` as deprecated +* Marked 'command.headers', 'command.response_body' and 'command.on_complete' as deprecated for AbstractCommand. + These will work through Guzzle 4.0 +* Marked 'request.params' for `Guzzle\Http\Client` as deprecated. Use [request.options][params]. +* Marked `Guzzle\Service\Client::enableMagicMethods()` as deprecated. Magic methods can no longer be disabled on a Guzzle\Service\Client. +* Marked `Guzzle\Service\Client::getDefaultHeaders()` as deprecated. Use $client->getConfig()->getPath('request.options/headers')`. +* Marked `Guzzle\Service\Client::setDefaultHeaders()` as deprecated. Use $client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`. +* Marked `Guzzle\Parser\Url\UrlParser` as deprecated. Just use PHP's `parse_url()` and percent encode your UTF-8. +* Marked `Guzzle\Common\Collection::inject()` as deprecated. +* Marked `Guzzle\Plugin\CurlAuth\CurlAuthPlugin` as deprecated. Use `$client->getConfig()->setPath('request.options/auth', array('user', 'pass', 'Basic|Digest');` +* CacheKeyProviderInterface and DefaultCacheKeyProvider are no longer used. All of this logic is handled in a + CacheStorageInterface. These two objects and interface will be removed in a future version. +* Always setting X-cache headers on cached responses +* Default cache TTLs are now handled by the CacheStorageInterface of a CachePlugin +* `CacheStorageInterface::cache($key, Response $response, $ttl = null)` has changed to `cache(RequestInterface + $request, Response $response);` +* `CacheStorageInterface::fetch($key)` has changed to `fetch(RequestInterface $request);` +* `CacheStorageInterface::delete($key)` has changed to `delete(RequestInterface $request);` +* Added `CacheStorageInterface::purge($url)` +* `DefaultRevalidation::__construct(CacheKeyProviderInterface $cacheKey, CacheStorageInterface $cache, CachePlugin + $plugin)` has changed to `DefaultRevalidation::__construct(CacheStorageInterface $cache, + CanCacheStrategyInterface $canCache = null)` +* Added `RevalidationInterface::shouldRevalidate(RequestInterface $request, Response $response)` + +## 3.6.0 - 2013-05-29 + +* ServiceDescription now implements ToArrayInterface +* Added command.hidden_params to blacklist certain headers from being treated as additionalParameters +* Guzzle can now correctly parse incomplete URLs +* Mixed casing of headers are now forced to be a single consistent casing across all values for that header. +* Messages internally use a HeaderCollection object to delegate handling case-insensitive header resolution +* Removed the whole changedHeader() function system of messages because all header changes now go through addHeader(). +* Specific header implementations can be created for complex headers. When a message creates a header, it uses a + HeaderFactory which can map specific headers to specific header classes. There is now a Link header and + CacheControl header implementation. +* Removed from interface: Guzzle\Http\ClientInterface::setUriTemplate +* Removed from interface: Guzzle\Http\ClientInterface::setCurlMulti() +* Removed Guzzle\Http\Message\Request::receivedRequestHeader() and implemented this functionality in + Guzzle\Http\Curl\RequestMediator +* Removed the optional $asString parameter from MessageInterface::getHeader(). Just cast the header to a string. +* Removed the optional $tryChunkedTransfer option from Guzzle\Http\Message\EntityEnclosingRequestInterface +* Removed the $asObjects argument from Guzzle\Http\Message\MessageInterface::getHeaders() +* Removed Guzzle\Parser\ParserRegister::get(). Use getParser() +* Removed Guzzle\Parser\ParserRegister::set(). Use registerParser(). +* All response header helper functions return a string rather than mixing Header objects and strings inconsistently +* Removed cURL blacklist support. This is no longer necessary now that Expect, Accept, etc. are managed by Guzzle + directly via interfaces +* Removed the injecting of a request object onto a response object. The methods to get and set a request still exist + but are a no-op until removed. +* Most classes that used to require a `Guzzle\Service\Command\CommandInterface` typehint now request a + `Guzzle\Service\Command\ArrayCommandInterface`. +* Added `Guzzle\Http\Message\RequestInterface::startResponse()` to the RequestInterface to handle injecting a response + on a request while the request is still being transferred +* The ability to case-insensitively search for header values +* Guzzle\Http\Message\Header::hasExactHeader +* Guzzle\Http\Message\Header::raw. Use getAll() +* Deprecated cache control specific methods on Guzzle\Http\Message\AbstractMessage. Use the CacheControl header object + instead. +* `Guzzle\Service\Command\CommandInterface` now extends from ToArrayInterface and ArrayAccess +* Added the ability to cast Model objects to a string to view debug information. + +## 3.5.0 - 2013-05-13 + +* Bug: Fixed a regression so that request responses are parsed only once per oncomplete event rather than multiple times +* Bug: Better cleanup of one-time events across the board (when an event is meant to fire once, it will now remove + itself from the EventDispatcher) +* Bug: `Guzzle\Log\MessageFormatter` now properly writes "total_time" and "connect_time" values +* Bug: Cloning an EntityEnclosingRequest now clones the EntityBody too +* Bug: Fixed an undefined index error when parsing nested JSON responses with a sentAs parameter that reference a + non-existent key +* Bug: All __call() method arguments are now required (helps with mocking frameworks) +* Deprecating Response::getRequest() and now using a shallow clone of a request object to remove a circular reference + to help with refcount based garbage collection of resources created by sending a request +* Deprecating ZF1 cache and log adapters. These will be removed in the next major version. +* Deprecating `Response::getPreviousResponse()` (method signature still exists, but it's deprecated). Use the + HistoryPlugin for a history. +* Added a `responseBody` alias for the `response_body` location +* Refactored internals to no longer rely on Response::getRequest() +* HistoryPlugin can now be cast to a string +* HistoryPlugin now logs transactions rather than requests and responses to more accurately keep track of the requests + and responses that are sent over the wire +* Added `getEffectiveUrl()` and `getRedirectCount()` to Response objects + +## 3.4.3 - 2013-04-30 + +* Bug fix: Fixing bug introduced in 3.4.2 where redirect responses are duplicated on the final redirected response +* Added a check to re-extract the temp cacert bundle from the phar before sending each request + +## 3.4.2 - 2013-04-29 + +* Bug fix: Stream objects now work correctly with "a" and "a+" modes +* Bug fix: Removing `Transfer-Encoding: chunked` header when a Content-Length is present +* Bug fix: AsyncPlugin no longer forces HEAD requests +* Bug fix: DateTime timezones are now properly handled when using the service description schema formatter +* Bug fix: CachePlugin now properly handles stale-if-error directives when a request to the origin server fails +* Setting a response on a request will write to the custom request body from the response body if one is specified +* LogPlugin now writes to php://output when STDERR is undefined +* Added the ability to set multiple POST files for the same key in a single call +* application/x-www-form-urlencoded POSTs now use the utf-8 charset by default +* Added the ability to queue CurlExceptions to the MockPlugin +* Cleaned up how manual responses are queued on requests (removed "queued_response" and now using request.before_send) +* Configuration loading now allows remote files + +## 3.4.1 - 2013-04-16 + +* Large refactoring to how CurlMulti handles work. There is now a proxy that sits in front of a pool of CurlMulti + handles. This greatly simplifies the implementation, fixes a couple bugs, and provides a small performance boost. +* Exceptions are now properly grouped when sending requests in parallel +* Redirects are now properly aggregated when a multi transaction fails +* Redirects now set the response on the original object even in the event of a failure +* Bug fix: Model names are now properly set even when using $refs +* Added support for PHP 5.5's CurlFile to prevent warnings with the deprecated @ syntax +* Added support for oauth_callback in OAuth signatures +* Added support for oauth_verifier in OAuth signatures +* Added support to attempt to retrieve a command first literally, then ucfirst, the with inflection + +## 3.4.0 - 2013-04-11 + +* Bug fix: URLs are now resolved correctly based on https://datatracker.ietf.org/doc/html/rfc3986#section-5.2. #289 +* Bug fix: Absolute URLs with a path in a service description will now properly override the base URL. #289 +* Bug fix: Parsing a query string with a single PHP array value will now result in an array. #263 +* Bug fix: Better normalization of the User-Agent header to prevent duplicate headers. #264. +* Bug fix: Added `number` type to service descriptions. +* Bug fix: empty parameters are removed from an OAuth signature +* Bug fix: Revalidating a cache entry prefers the Last-Modified over the Date header +* Bug fix: Fixed "array to string" error when validating a union of types in a service description +* Bug fix: Removed code that attempted to determine the size of a stream when data is written to the stream +* Bug fix: Not including an `oauth_token` if the value is null in the OauthPlugin. +* Bug fix: Now correctly aggregating successful requests and failed requests in CurlMulti when a redirect occurs. +* The new default CURLOPT_TIMEOUT setting has been increased to 150 seconds so that Guzzle works on poor connections. +* Added a feature to EntityEnclosingRequest::setBody() that will automatically set the Content-Type of the request if + the Content-Type can be determined based on the entity body or the path of the request. +* Added the ability to overwrite configuration settings in a client when grabbing a throwaway client from a builder. +* Added support for a PSR-3 LogAdapter. +* Added a `command.after_prepare` event +* Added `oauth_callback` parameter to the OauthPlugin +* Added the ability to create a custom stream class when using a stream factory +* Added a CachingEntityBody decorator +* Added support for `additionalParameters` in service descriptions to define how custom parameters are serialized. +* The bundled SSL certificate is now provided in the phar file and extracted when running Guzzle from a phar. +* You can now send any EntityEnclosingRequest with POST fields or POST files and cURL will handle creating bodies +* POST requests using a custom entity body are now treated exactly like PUT requests but with a custom cURL method. This + means that the redirect behavior of POST requests with custom bodies will not be the same as POST requests that use + POST fields or files (the latter is only used when emulating a form POST in the browser). +* Lots of cleanup to CurlHandle::factory and RequestFactory::createRequest + +## 3.3.1 - 2013-03-10 + +* Added the ability to create PHP streaming responses from HTTP requests +* Bug fix: Running any filters when parsing response headers with service descriptions +* Bug fix: OauthPlugin fixes to allow for multi-dimensional array signing, and sorting parameters before signing +* Bug fix: Removed the adding of default empty arrays and false Booleans to responses in order to be consistent across + response location visitors. +* Bug fix: Removed the possibility of creating configuration files with circular dependencies +* RequestFactory::create() now uses the key of a POST file when setting the POST file name +* Added xmlAllowEmpty to serialize an XML body even if no XML specific parameters are set + +## 3.3.0 - 2013-03-03 + +* A large number of performance optimizations have been made +* Bug fix: Added 'wb' as a valid write mode for streams +* Bug fix: `Guzzle\Http\Message\Response::json()` now allows scalar values to be returned +* Bug fix: Fixed bug in `Guzzle\Http\Message\Response` where wrapping quotes were stripped from `getEtag()` +* BC: Removed `Guzzle\Http\Utils` class +* BC: Setting a service description on a client will no longer modify the client's command factories. +* BC: Emitting IO events from a RequestMediator is now a parameter that must be set in a request's curl options using + the 'emit_io' key. This was previously set under a request's parameters using 'curl.emit_io' +* BC: `Guzzle\Stream\Stream::getWrapper()` and `Guzzle\Stream\Stream::getSteamType()` are no longer converted to + lowercase +* Operation parameter objects are now lazy loaded internally +* Added ErrorResponsePlugin that can throw errors for responses defined in service description operations' errorResponses +* Added support for instantiating responseType=class responseClass classes. Classes must implement + `Guzzle\Service\Command\ResponseClassInterface` +* Added support for additionalProperties for top-level parameters in responseType=model responseClasses. These + additional properties also support locations and can be used to parse JSON responses where the outermost part of the + JSON is an array +* Added support for nested renaming of JSON models (rename sentAs to name) +* CachePlugin + * Added support for stale-if-error so that the CachePlugin can now serve stale content from the cache on error + * Debug headers can now added to cached response in the CachePlugin + +## 3.2.0 - 2013-02-14 + +* CurlMulti is no longer reused globally. A new multi object is created per-client. This helps to isolate clients. +* URLs with no path no longer contain a "/" by default +* Guzzle\Http\QueryString does no longer manages the leading "?". This is now handled in Guzzle\Http\Url. +* BadResponseException no longer includes the full request and response message +* Adding setData() to Guzzle\Service\Description\ServiceDescriptionInterface +* Adding getResponseBody() to Guzzle\Http\Message\RequestInterface +* Various updates to classes to use ServiceDescriptionInterface type hints rather than ServiceDescription +* Header values can now be normalized into distinct values when multiple headers are combined with a comma separated list +* xmlEncoding can now be customized for the XML declaration of a XML service description operation +* Guzzle\Http\QueryString now uses Guzzle\Http\QueryAggregator\QueryAggregatorInterface objects to add custom value + aggregation and no longer uses callbacks +* The URL encoding implementation of Guzzle\Http\QueryString can now be customized +* Bug fix: Filters were not always invoked for array service description parameters +* Bug fix: Redirects now use a target response body rather than a temporary response body +* Bug fix: The default exponential backoff BackoffPlugin was not giving when the request threshold was exceeded +* Bug fix: Guzzle now takes the first found value when grabbing Cache-Control directives + +## 3.1.2 - 2013-01-27 + +* Refactored how operation responses are parsed. Visitors now include a before() method responsible for parsing the + response body. For example, the XmlVisitor now parses the XML response into an array in the before() method. +* Fixed an issue where cURL would not automatically decompress responses when the Accept-Encoding header was sent +* CURLOPT_SSL_VERIFYHOST is never set to 1 because it is deprecated (see 5e0ff2ef20f839e19d1eeb298f90ba3598784444) +* Fixed a bug where redirect responses were not chained correctly using getPreviousResponse() +* Setting default headers on a client after setting the user-agent will not erase the user-agent setting + +## 3.1.1 - 2013-01-20 + +* Adding wildcard support to Guzzle\Common\Collection::getPath() +* Adding alias support to ServiceBuilder configs +* Adding Guzzle\Service\Resource\CompositeResourceIteratorFactory and cleaning up factory interface + +## 3.1.0 - 2013-01-12 + +* BC: CurlException now extends from RequestException rather than BadResponseException +* BC: Renamed Guzzle\Plugin\Cache\CanCacheStrategyInterface::canCache() to canCacheRequest() and added CanCacheResponse() +* Added getData to ServiceDescriptionInterface +* Added context array to RequestInterface::setState() +* Bug: Removing hard dependency on the BackoffPlugin from Guzzle\Http +* Bug: Adding required content-type when JSON request visitor adds JSON to a command +* Bug: Fixing the serialization of a service description with custom data +* Made it easier to deal with exceptions thrown when transferring commands or requests in parallel by providing + an array of successful and failed responses +* Moved getPath from Guzzle\Service\Resource\Model to Guzzle\Common\Collection +* Added Guzzle\Http\IoEmittingEntityBody +* Moved command filtration from validators to location visitors +* Added `extends` attributes to service description parameters +* Added getModels to ServiceDescriptionInterface + +## 3.0.7 - 2012-12-19 + +* Fixing phar detection when forcing a cacert to system if null or true +* Allowing filename to be passed to `Guzzle\Http\Message\Request::setResponseBody()` +* Cleaning up `Guzzle\Common\Collection::inject` method +* Adding a response_body location to service descriptions + +## 3.0.6 - 2012-12-09 + +* CurlMulti performance improvements +* Adding setErrorResponses() to Operation +* composer.json tweaks + +## 3.0.5 - 2012-11-18 + +* Bug: Fixing an infinite recursion bug caused from revalidating with the CachePlugin +* Bug: Response body can now be a string containing "0" +* Bug: Using Guzzle inside of a phar uses system by default but now allows for a custom cacert +* Bug: QueryString::fromString now properly parses query string parameters that contain equal signs +* Added support for XML attributes in service description responses +* DefaultRequestSerializer now supports array URI parameter values for URI template expansion +* Added better mimetype guessing to requests and post files + +## 3.0.4 - 2012-11-11 + +* Bug: Fixed a bug when adding multiple cookies to a request to use the correct glue value +* Bug: Cookies can now be added that have a name, domain, or value set to "0" +* Bug: Using the system cacert bundle when using the Phar +* Added json and xml methods to Response to make it easier to parse JSON and XML response data into data structures +* Enhanced cookie jar de-duplication +* Added the ability to enable strict cookie jars that throw exceptions when invalid cookies are added +* Added setStream to StreamInterface to actually make it possible to implement custom rewind behavior for entity bodies +* Added the ability to create any sort of hash for a stream rather than just an MD5 hash + +## 3.0.3 - 2012-11-04 + +* Implementing redirects in PHP rather than cURL +* Added PECL URI template extension and using as default parser if available +* Bug: Fixed Content-Length parsing of Response factory +* Adding rewind() method to entity bodies and streams. Allows for custom rewinding of non-repeatable streams. +* Adding ToArrayInterface throughout library +* Fixing OauthPlugin to create unique nonce values per request + +## 3.0.2 - 2012-10-25 + +* Magic methods are enabled by default on clients +* Magic methods return the result of a command +* Service clients no longer require a base_url option in the factory +* Bug: Fixed an issue with URI templates where null template variables were being expanded + +## 3.0.1 - 2012-10-22 + +* Models can now be used like regular collection objects by calling filter, map, etc. +* Models no longer require a Parameter structure or initial data in the constructor +* Added a custom AppendIterator to get around a PHP bug with the `\AppendIterator` + +## 3.0.0 - 2012-10-15 + +* Rewrote service description format to be based on Swagger + * Now based on JSON schema + * Added nested input structures and nested response models + * Support for JSON and XML input and output models + * Renamed `commands` to `operations` + * Removed dot class notation + * Removed custom types +* Broke the project into smaller top-level namespaces to be more component friendly +* Removed support for XML configs and descriptions. Use arrays or JSON files. +* Removed the Validation component and Inspector +* Moved all cookie code to Guzzle\Plugin\Cookie +* Magic methods on a Guzzle\Service\Client now return the command un-executed. +* Calling getResult() or getResponse() on a command will lazily execute the command if needed. +* Now shipping with cURL's CA certs and using it by default +* Added previousResponse() method to response objects +* No longer sending Accept and Accept-Encoding headers on every request +* Only sending an Expect header by default when a payload is greater than 1MB +* Added/moved client options: + * curl.blacklist to curl.option.blacklist + * Added ssl.certificate_authority +* Added a Guzzle\Iterator component +* Moved plugins from Guzzle\Http\Plugin to Guzzle\Plugin +* Added a more robust backoff retry strategy (replaced the ExponentialBackoffPlugin) +* Added a more robust caching plugin +* Added setBody to response objects +* Updating LogPlugin to use a more flexible MessageFormatter +* Added a completely revamped build process +* Cleaning up Collection class and removing default values from the get method +* Fixed ZF2 cache adapters + +## 2.8.8 - 2012-10-15 + +* Bug: Fixed a cookie issue that caused dot prefixed domains to not match where popular browsers did + +## 2.8.7 - 2012-09-30 + +* Bug: Fixed config file aliases for JSON includes +* Bug: Fixed cookie bug on a request object by using CookieParser to parse cookies on requests +* Bug: Removing the path to a file when sending a Content-Disposition header on a POST upload +* Bug: Hardening request and response parsing to account for missing parts +* Bug: Fixed PEAR packaging +* Bug: Fixed Request::getInfo +* Bug: Fixed cases where CURLM_CALL_MULTI_PERFORM return codes were causing curl transactions to fail +* Adding the ability for the namespace Iterator factory to look in multiple directories +* Added more getters/setters/removers from service descriptions +* Added the ability to remove POST fields from OAuth signatures +* OAuth plugin now supports 2-legged OAuth + +## 2.8.6 - 2012-09-05 + +* Added the ability to modify and build service descriptions +* Added the use of visitors to apply parameters to locations in service descriptions using the dynamic command +* Added a `json` parameter location +* Now allowing dot notation for classes in the CacheAdapterFactory +* Using the union of two arrays rather than an array_merge when extending service builder services and service params +* Ensuring that a service is a string before doing strpos() checks on it when substituting services for references + in service builder config files. +* Services defined in two different config files that include one another will by default replace the previously + defined service, but you can now create services that extend themselves and merge their settings over the previous +* The JsonLoader now supports aliasing filenames with different filenames. This allows you to alias something like + '_default' with a default JSON configuration file. + +## 2.8.5 - 2012-08-29 + +* Bug: Suppressed empty arrays from URI templates +* Bug: Added the missing $options argument from ServiceDescription::factory to enable caching +* Added support for HTTP responses that do not contain a reason phrase in the start-line +* AbstractCommand commands are now invokable +* Added a way to get the data used when signing an Oauth request before a request is sent + +## 2.8.4 - 2012-08-15 + +* Bug: Custom delay time calculations are no longer ignored in the ExponentialBackoffPlugin +* Added the ability to transfer entity bodies as a string rather than streamed. This gets around curl error 65. Set `body_as_string` in a request's curl options to enable. +* Added a StreamInterface, EntityBodyInterface, and added ftell() to Guzzle\Common\Stream +* Added an AbstractEntityBodyDecorator and a ReadLimitEntityBody decorator to transfer only a subset of a decorated stream +* Stream and EntityBody objects will now return the file position to the previous position after a read required operation (e.g. getContentMd5()) +* Added additional response status codes +* Removed SSL information from the default User-Agent header +* DELETE requests can now send an entity body +* Added an EventDispatcher to the ExponentialBackoffPlugin and added an ExponentialBackoffLogger to log backoff retries +* Added the ability of the MockPlugin to consume mocked request bodies +* LogPlugin now exposes request and response objects in the extras array + +## 2.8.3 - 2012-07-30 + +* Bug: Fixed a case where empty POST requests were sent as GET requests +* Bug: Fixed a bug in ExponentialBackoffPlugin that caused fatal errors when retrying an EntityEnclosingRequest that does not have a body +* Bug: Setting the response body of a request to null after completing a request, not when setting the state of a request to new +* Added multiple inheritance to service description commands +* Added an ApiCommandInterface and added `getParamNames()` and `hasParam()` +* Removed the default 2mb size cutoff from the Md5ValidatorPlugin so that it now defaults to validating everything +* Changed CurlMulti::perform to pass a smaller timeout to CurlMulti::executeHandles + +## 2.8.2 - 2012-07-24 + +* Bug: Query string values set to 0 are no longer dropped from the query string +* Bug: A Collection object is no longer created each time a call is made to `Guzzle\Service\Command\AbstractCommand::getRequestHeaders()` +* Bug: `+` is now treated as an encoded space when parsing query strings +* QueryString and Collection performance improvements +* Allowing dot notation for class paths in filters attribute of a service descriptions + +## 2.8.1 - 2012-07-16 + +* Loosening Event Dispatcher dependency +* POST redirects can now be customized using CURLOPT_POSTREDIR + +## 2.8.0 - 2012-07-15 + +* BC: Guzzle\Http\Query + * Query strings with empty variables will always show an equal sign unless the variable is set to QueryString::BLANK (e.g. ?acl= vs ?acl) + * Changed isEncodingValues() and isEncodingFields() to isUrlEncoding() + * Changed setEncodeValues(bool) and setEncodeFields(bool) to useUrlEncoding(bool) + * Changed the aggregation functions of QueryString to be static methods + * Can now use fromString() with querystrings that have a leading ? +* cURL configuration values can be specified in service descriptions using `curl.` prefixed parameters +* Content-Length is set to 0 before emitting the request.before_send event when sending an empty request body +* Cookies are no longer URL decoded by default +* Bug: URI template variables set to null are no longer expanded + +## 2.7.2 - 2012-07-02 + +* BC: Moving things to get ready for subtree splits. Moving Inflection into Common. Moving Guzzle\Http\Parser to Guzzle\Parser. +* BC: Removing Guzzle\Common\Batch\Batch::count() and replacing it with isEmpty() +* CachePlugin now allows for a custom request parameter function to check if a request can be cached +* Bug fix: CachePlugin now only caches GET and HEAD requests by default +* Bug fix: Using header glue when transferring headers over the wire +* Allowing deeply nested arrays for composite variables in URI templates +* Batch divisors can now return iterators or arrays + +## 2.7.1 - 2012-06-26 + +* Minor patch to update version number in UA string +* Updating build process + +## 2.7.0 - 2012-06-25 + +* BC: Inflection classes moved to Guzzle\Inflection. No longer static methods. Can now inject custom inflectors into classes. +* BC: Removed magic setX methods from commands +* BC: Magic methods mapped to service description commands are now inflected in the command factory rather than the client __call() method +* Verbose cURL options are no longer enabled by default. Set curl.debug to true on a client to enable. +* Bug: Now allowing colons in a response start-line (e.g. HTTP/1.1 503 Service Unavailable: Back-end server is at capacity) +* Guzzle\Service\Resource\ResourceIteratorApplyBatched now internally uses the Guzzle\Common\Batch namespace +* Added Guzzle\Service\Plugin namespace and a PluginCollectionPlugin +* Added the ability to set POST fields and files in a service description +* Guzzle\Http\EntityBody::factory() now accepts objects with a __toString() method +* Adding a command.before_prepare event to clients +* Added BatchClosureTransfer and BatchClosureDivisor +* BatchTransferException now includes references to the batch divisor and transfer strategies +* Fixed some tests so that they pass more reliably +* Added Guzzle\Common\Log\ArrayLogAdapter + +## 2.6.6 - 2012-06-10 + +* BC: Removing Guzzle\Http\Plugin\BatchQueuePlugin +* BC: Removing Guzzle\Service\Command\CommandSet +* Adding generic batching system (replaces the batch queue plugin and command set) +* Updating ZF cache and log adapters and now using ZF's composer repository +* Bug: Setting the name of each ApiParam when creating through an ApiCommand +* Adding result_type, result_doc, deprecated, and doc_url to service descriptions +* Bug: Changed the default cookie header casing back to 'Cookie' + +## 2.6.5 - 2012-06-03 + +* BC: Renaming Guzzle\Http\Message\RequestInterface::getResourceUri() to getResource() +* BC: Removing unused AUTH_BASIC and AUTH_DIGEST constants from +* BC: Guzzle\Http\Cookie is now used to manage Set-Cookie data, not Cookie data +* BC: Renaming methods in the CookieJarInterface +* Moving almost all cookie logic out of the CookiePlugin and into the Cookie or CookieJar implementations +* Making the default glue for HTTP headers ';' instead of ',' +* Adding a removeValue to Guzzle\Http\Message\Header +* Adding getCookies() to request interface. +* Making it easier to add event subscribers to HasDispatcherInterface classes. Can now directly call addSubscriber() + +## 2.6.4 - 2012-05-30 + +* BC: Cleaning up how POST files are stored in EntityEnclosingRequest objects. Adding PostFile class. +* BC: Moving ApiCommand specific functionality from the Inspector and on to the ApiCommand +* Bug: Fixing magic method command calls on clients +* Bug: Email constraint only validates strings +* Bug: Aggregate POST fields when POST files are present in curl handle +* Bug: Fixing default User-Agent header +* Bug: Only appending or prepending parameters in commands if they are specified +* Bug: Not requiring response reason phrases or status codes to match a predefined list of codes +* Allowing the use of dot notation for class namespaces when using instance_of constraint +* Added any_match validation constraint +* Added an AsyncPlugin +* Passing request object to the calculateWait method of the ExponentialBackoffPlugin +* Allowing the result of a command object to be changed +* Parsing location and type sub values when instantiating a service description rather than over and over at runtime + +## 2.6.3 - 2012-05-23 + +* [BC] Guzzle\Common\FromConfigInterface no longer requires any config options. +* [BC] Refactoring how POST files are stored on an EntityEnclosingRequest. They are now separate from POST fields. +* You can now use an array of data when creating PUT request bodies in the request factory. +* Removing the requirement that HTTPS requests needed a Cache-Control: public directive to be cacheable. +* [Http] Adding support for Content-Type in multipart POST uploads per upload +* [Http] Added support for uploading multiple files using the same name (foo[0], foo[1]) +* Adding more POST data operations for easier manipulation of POST data. +* You can now set empty POST fields. +* The body of a request is only shown on EntityEnclosingRequest objects that do not use POST files. +* Split the Guzzle\Service\Inspector::validateConfig method into two methods. One to initialize when a command is created, and one to validate. +* CS updates + +## 2.6.2 - 2012-05-19 + +* [Http] Better handling of nested scope requests in CurlMulti. Requests are now always prepares in the send() method rather than the addRequest() method. + +## 2.6.1 - 2012-05-19 + +* [BC] Removing 'path' support in service descriptions. Use 'uri'. +* [BC] Guzzle\Service\Inspector::parseDocBlock is now protected. Adding getApiParamsForClass() with cache. +* [BC] Removing Guzzle\Common\NullObject. Use https://github.com/mtdowling/NullObject if you need it. +* [BC] Removing Guzzle\Common\XmlElement. +* All commands, both dynamic and concrete, have ApiCommand objects. +* Adding a fix for CurlMulti so that if all of the connections encounter some sort of curl error, then the loop exits. +* Adding checks to EntityEnclosingRequest so that empty POST files and fields are ignored. +* Making the method signature of Guzzle\Service\Builder\ServiceBuilder::factory more flexible. + +## 2.6.0 - 2012-05-15 + +* [BC] Moving Guzzle\Service\Builder to Guzzle\Service\Builder\ServiceBuilder +* [BC] Executing a Command returns the result of the command rather than the command +* [BC] Moving all HTTP parsing logic to Guzzle\Http\Parsers. Allows for faster C implementations if needed. +* [BC] Changing the Guzzle\Http\Message\Response::setProtocol() method to accept a protocol and version in separate args. +* [BC] Moving ResourceIterator* to Guzzle\Service\Resource +* [BC] Completely refactored ResourceIterators to iterate over a cloned command object +* [BC] Moved Guzzle\Http\UriTemplate to Guzzle\Http\Parser\UriTemplate\UriTemplate +* [BC] Guzzle\Guzzle is now deprecated +* Moving Guzzle\Common\Guzzle::inject to Guzzle\Common\Collection::inject +* Adding Guzzle\Version class to give version information about Guzzle +* Adding Guzzle\Http\Utils class to provide getDefaultUserAgent() and getHttpDate() +* Adding Guzzle\Curl\CurlVersion to manage caching curl_version() data +* ServiceDescription and ServiceBuilder are now cacheable using similar configs +* Changing the format of XML and JSON service builder configs. Backwards compatible. +* Cleaned up Cookie parsing +* Trimming the default Guzzle User-Agent header +* Adding a setOnComplete() method to Commands that is called when a command completes +* Keeping track of requests that were mocked in the MockPlugin +* Fixed a caching bug in the CacheAdapterFactory +* Inspector objects can be injected into a Command object +* Refactoring a lot of code and tests to be case insensitive when dealing with headers +* Adding Guzzle\Http\Message\HeaderComparison for easy comparison of HTTP headers using a DSL +* Adding the ability to set global option overrides to service builder configs +* Adding the ability to include other service builder config files from within XML and JSON files +* Moving the parseQuery method out of Url and on to QueryString::fromString() as a static factory method. + +## 2.5.0 - 2012-05-08 + +* Major performance improvements +* [BC] Simplifying Guzzle\Common\Collection. Please check to see if you are using features that are now deprecated. +* [BC] Using a custom validation system that allows a flyweight implementation for much faster validation. No longer using Symfony2 Validation component. +* [BC] No longer supporting "{{ }}" for injecting into command or UriTemplates. Use "{}" +* Added the ability to passed parameters to all requests created by a client +* Added callback functionality to the ExponentialBackoffPlugin +* Using microtime in ExponentialBackoffPlugin to allow more granular backoff strategies. +* Rewinding request stream bodies when retrying requests +* Exception is thrown when JSON response body cannot be decoded +* Added configurable magic method calls to clients and commands. This is off by default. +* Fixed a defect that added a hash to every parsed URL part +* Fixed duplicate none generation for OauthPlugin. +* Emitting an event each time a client is generated by a ServiceBuilder +* Using an ApiParams object instead of a Collection for parameters of an ApiCommand +* cache.* request parameters should be renamed to params.cache.* +* Added the ability to set arbitrary curl options on requests (disable_wire, progress, etc.). See CurlHandle. +* Added the ability to disable type validation of service descriptions +* ServiceDescriptions and ServiceBuilders are now Serializable diff --git a/vendor/guzzlehttp/guzzle/LICENSE b/vendor/guzzlehttp/guzzle/LICENSE new file mode 100644 index 0000000..fd2375d --- /dev/null +++ b/vendor/guzzlehttp/guzzle/LICENSE @@ -0,0 +1,27 @@ +The MIT License (MIT) + +Copyright (c) 2011 Michael Dowling +Copyright (c) 2012 Jeremy Lindblom +Copyright (c) 2014 Graham Campbell +Copyright (c) 2015 Márk Sági-Kazár +Copyright (c) 2015 Tobias Schultze +Copyright (c) 2016 Tobias Nyholm +Copyright (c) 2016 George Mponos + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/guzzlehttp/guzzle/README.md b/vendor/guzzlehttp/guzzle/README.md new file mode 100644 index 0000000..cdaebee --- /dev/null +++ b/vendor/guzzlehttp/guzzle/README.md @@ -0,0 +1,94 @@ +![Guzzle](.github/logo.png?raw=true) + +# Guzzle, PHP HTTP client + +[![Latest Version](https://img.shields.io/github/release/guzzle/guzzle.svg?style=flat-square)](https://github.com/guzzle/guzzle/releases) +[![Build Status](https://img.shields.io/github/actions/workflow/status/guzzle/guzzle/ci.yml?label=ci%20build&style=flat-square)](https://github.com/guzzle/guzzle/actions?query=workflow%3ACI) +[![Total Downloads](https://img.shields.io/packagist/dt/guzzlehttp/guzzle.svg?style=flat-square)](https://packagist.org/packages/guzzlehttp/guzzle) + +Guzzle is a PHP HTTP client that makes it easy to send HTTP requests and +trivial to integrate with web services. + +- Simple interface for building query strings, POST requests, streaming large + uploads, streaming large downloads, using HTTP cookies, uploading JSON data, + etc... +- Can send both synchronous and asynchronous requests using the same interface. +- Uses PSR-7 interfaces for requests, responses, and streams. This allows you + to utilize other PSR-7 compatible libraries with Guzzle. +- Supports PSR-18 allowing interoperability between other PSR-18 HTTP Clients. +- Abstracts away the underlying HTTP transport, allowing you to write + environment and transport agnostic code; i.e., no hard dependency on cURL, + PHP streams, sockets, or non-blocking event loops. +- Middleware system allows you to augment and compose client behavior. + +```php +$client = new \GuzzleHttp\Client(); +$response = $client->request('GET', 'https://api.github.com/repos/guzzle/guzzle'); + +echo $response->getStatusCode(); // 200 +echo $response->getHeaderLine('content-type'); // 'application/json; charset=utf8' +echo $response->getBody(); // '{"id": 1420053, "name": "guzzle", ...}' + +// Send an asynchronous request. +$request = new \GuzzleHttp\Psr7\Request('GET', 'http://httpbin.org'); +$promise = $client->sendAsync($request)->then(function ($response) { + echo 'I completed! ' . $response->getBody(); +}); + +$promise->wait(); +``` + +## Help and docs + +We use GitHub issues only to discuss bugs and new features. For support please refer to: + +- [Documentation](https://docs.guzzlephp.org) +- [Stack Overflow](https://stackoverflow.com/questions/tagged/guzzle) +- [#guzzle](https://app.slack.com/client/T0D2S9JCT/CE6UAAKL4) channel on [PHP-HTTP Slack](https://slack.httplug.io/) +- [Gitter](https://gitter.im/guzzle/guzzle) + + +## Installing Guzzle + +The recommended way to install Guzzle is through +[Composer](https://getcomposer.org/). + +```bash +composer require guzzlehttp/guzzle +``` + + +## Version Guidance + +| Version | Status | Packagist | Namespace | Repo | Docs | PSR-7 | PHP Version | +|---------|---------------------|---------------------|--------------|---------------------|---------------------|-------|--------------| +| 3.x | EOL (2016-10-31) | `guzzle/guzzle` | `Guzzle` | [v3][guzzle-3-repo] | [v3][guzzle-3-docs] | No | >=5.3.3,<7.0 | +| 4.x | EOL (2016-10-31) | `guzzlehttp/guzzle` | `GuzzleHttp` | [v4][guzzle-4-repo] | N/A | No | >=5.4,<7.0 | +| 5.x | EOL (2019-10-31) | `guzzlehttp/guzzle` | `GuzzleHttp` | [v5][guzzle-5-repo] | [v5][guzzle-5-docs] | No | >=5.4,<7.4 | +| 6.x | EOL (2023-10-31) | `guzzlehttp/guzzle` | `GuzzleHttp` | [v6][guzzle-6-repo] | [v6][guzzle-6-docs] | Yes | >=5.5,<8.0 | +| 7.x | Latest | `guzzlehttp/guzzle` | `GuzzleHttp` | [v7][guzzle-7-repo] | [v7][guzzle-7-docs] | Yes | >=7.2.5,<8.5 | + +[guzzle-3-repo]: https://github.com/guzzle/guzzle3 +[guzzle-4-repo]: https://github.com/guzzle/guzzle/tree/4.x +[guzzle-5-repo]: https://github.com/guzzle/guzzle/tree/5.3 +[guzzle-6-repo]: https://github.com/guzzle/guzzle/tree/6.5 +[guzzle-7-repo]: https://github.com/guzzle/guzzle +[guzzle-3-docs]: https://guzzle3.readthedocs.io/ +[guzzle-5-docs]: https://docs.guzzlephp.org/en/5.3/ +[guzzle-6-docs]: https://docs.guzzlephp.org/en/6.5/ +[guzzle-7-docs]: https://docs.guzzlephp.org/en/latest/ + + +## Security + +If you discover a security vulnerability within this package, please send an email to security@tidelift.com. All security vulnerabilities will be promptly addressed. Please do not disclose security-related issues publicly until a fix has been announced. Please see [Security Policy](https://github.com/guzzle/guzzle/security/policy) for more information. + +## License + +Guzzle is made available under the MIT License (MIT). Please see [License File](LICENSE) for more information. + +## For Enterprise + +Available as part of the Tidelift Subscription + +The maintainers of Guzzle and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/packagist-guzzlehttp-guzzle?utm_source=packagist-guzzlehttp-guzzle&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) diff --git a/vendor/guzzlehttp/guzzle/UPGRADING.md b/vendor/guzzlehttp/guzzle/UPGRADING.md new file mode 100644 index 0000000..4efbb59 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/UPGRADING.md @@ -0,0 +1,1253 @@ +Guzzle Upgrade Guide +==================== + +6.0 to 7.0 +---------- + +In order to take advantage of the new features of PHP, Guzzle dropped the support +of PHP 5. The minimum supported PHP version is now PHP 7.2. Type hints and return +types for functions and methods have been added wherever possible. + +Please make sure: +- You are calling a function or a method with the correct type. +- If you extend a class of Guzzle; update all signatures on methods you override. + +#### Other backwards compatibility breaking changes + +- Class `GuzzleHttp\UriTemplate` is removed. +- Class `GuzzleHttp\Exception\SeekException` is removed. +- Classes `GuzzleHttp\Exception\BadResponseException`, `GuzzleHttp\Exception\ClientException`, + `GuzzleHttp\Exception\ServerException` can no longer be initialized with an empty + Response as argument. +- Class `GuzzleHttp\Exception\ConnectException` now extends `GuzzleHttp\Exception\TransferException` + instead of `GuzzleHttp\Exception\RequestException`. +- Function `GuzzleHttp\Exception\ConnectException::getResponse()` is removed. +- Function `GuzzleHttp\Exception\ConnectException::hasResponse()` is removed. +- Constant `GuzzleHttp\ClientInterface::VERSION` is removed. Added `GuzzleHttp\ClientInterface::MAJOR_VERSION` instead. +- Function `GuzzleHttp\Exception\RequestException::getResponseBodySummary` is removed. + Use `\GuzzleHttp\Psr7\get_message_body_summary` as an alternative. +- Function `GuzzleHttp\Cookie\CookieJar::getCookieValue` is removed. +- Request option `exceptions` is removed. Please use `http_errors`. +- Request option `save_to` is removed. Please use `sink`. +- Pool option `pool_size` is removed. Please use `concurrency`. +- We now look for environment variables in the `$_SERVER` super global, due to thread safety issues with `getenv`. We continue to fallback to `getenv` in CLI environments, for maximum compatibility. +- The `get`, `head`, `put`, `post`, `patch`, `delete`, `getAsync`, `headAsync`, `putAsync`, `postAsync`, `patchAsync`, and `deleteAsync` methods are now implemented as genuine methods on `GuzzleHttp\Client`, with strong typing. The original `__call` implementation remains unchanged for now, for maximum backwards compatibility, but won't be invoked under normal operation. +- The `log` middleware will log the errors with level `error` instead of `notice` +- Support for international domain names (IDN) is now disabled by default, and enabling it requires installing ext-intl, linked against a modern version of the C library (ICU 4.6 or higher). + +#### Native functions calls + +All internal native functions calls of Guzzle are now prefixed with a slash. This +change makes it impossible for method overloading by other libraries or applications. +Example: + +```php +// Before: +curl_version(); + +// After: +\curl_version(); +``` + +For the full diff you can check [here](https://github.com/guzzle/guzzle/compare/6.5.4..master). + +5.0 to 6.0 +---------- + +Guzzle now uses [PSR-7](https://www.php-fig.org/psr/psr-7/) for HTTP messages. +Due to the fact that these messages are immutable, this prompted a refactoring +of Guzzle to use a middleware based system rather than an event system. Any +HTTP message interaction (e.g., `GuzzleHttp\Message\Request`) need to be +updated to work with the new immutable PSR-7 request and response objects. Any +event listeners or subscribers need to be updated to become middleware +functions that wrap handlers (or are injected into a +`GuzzleHttp\HandlerStack`). + +- Removed `GuzzleHttp\BatchResults` +- Removed `GuzzleHttp\Collection` +- Removed `GuzzleHttp\HasDataTrait` +- Removed `GuzzleHttp\ToArrayInterface` +- The `guzzlehttp/streams` dependency has been removed. Stream functionality + is now present in the `GuzzleHttp\Psr7` namespace provided by the + `guzzlehttp/psr7` package. +- Guzzle no longer uses ReactPHP promises and now uses the + `guzzlehttp/promises` library. We use a custom promise library for three + significant reasons: + 1. React promises (at the time of writing this) are recursive. Promise + chaining and promise resolution will eventually blow the stack. Guzzle + promises are not recursive as they use a sort of trampolining technique. + Note: there has been movement in the React project to modify promises to + no longer utilize recursion. + 2. Guzzle needs to have the ability to synchronously block on a promise to + wait for a result. Guzzle promises allows this functionality (and does + not require the use of recursion). + 3. Because we need to be able to wait on a result, doing so using React + promises requires wrapping react promises with RingPHP futures. This + overhead is no longer needed, reducing stack sizes, reducing complexity, + and improving performance. +- `GuzzleHttp\Mimetypes` has been moved to a function in + `GuzzleHttp\Psr7\mimetype_from_extension` and + `GuzzleHttp\Psr7\mimetype_from_filename`. +- `GuzzleHttp\Query` and `GuzzleHttp\QueryParser` have been removed. Query + strings must now be passed into request objects as strings, or provided to + the `query` request option when creating requests with clients. The `query` + option uses PHP's `http_build_query` to convert an array to a string. If you + need a different serialization technique, you will need to pass the query + string in as a string. There are a couple helper functions that will make + working with query strings easier: `GuzzleHttp\Psr7\parse_query` and + `GuzzleHttp\Psr7\build_query`. +- Guzzle no longer has a dependency on RingPHP. Due to the use of a middleware + system based on PSR-7, using RingPHP and it's middleware system as well adds + more complexity than the benefits it provides. All HTTP handlers that were + present in RingPHP have been modified to work directly with PSR-7 messages + and placed in the `GuzzleHttp\Handler` namespace. This significantly reduces + complexity in Guzzle, removes a dependency, and improves performance. RingPHP + will be maintained for Guzzle 5 support, but will no longer be a part of + Guzzle 6. +- As Guzzle now uses a middleware based systems the event system and RingPHP + integration has been removed. Note: while the event system has been removed, + it is possible to add your own type of event system that is powered by the + middleware system. + - Removed the `Event` namespace. + - Removed the `Subscriber` namespace. + - Removed `Transaction` class + - Removed `RequestFsm` + - Removed `RingBridge` + - `GuzzleHttp\Subscriber\Cookie` is now provided by + `GuzzleHttp\Middleware::cookies` + - `GuzzleHttp\Subscriber\HttpError` is now provided by + `GuzzleHttp\Middleware::httpError` + - `GuzzleHttp\Subscriber\History` is now provided by + `GuzzleHttp\Middleware::history` + - `GuzzleHttp\Subscriber\Mock` is now provided by + `GuzzleHttp\Handler\MockHandler` + - `GuzzleHttp\Subscriber\Prepare` is now provided by + `GuzzleHttp\PrepareBodyMiddleware` + - `GuzzleHttp\Subscriber\Redirect` is now provided by + `GuzzleHttp\RedirectMiddleware` +- Guzzle now uses `Psr\Http\Message\UriInterface` (implements in + `GuzzleHttp\Psr7\Uri`) for URI support. `GuzzleHttp\Url` is now gone. +- Static functions in `GuzzleHttp\Utils` have been moved to namespaced + functions under the `GuzzleHttp` namespace. This requires either a Composer + based autoloader or you to include functions.php. +- `GuzzleHttp\ClientInterface::getDefaultOption` has been renamed to + `GuzzleHttp\ClientInterface::getConfig`. +- `GuzzleHttp\ClientInterface::setDefaultOption` has been removed. +- The `json` and `xml` methods of response objects has been removed. With the + migration to strictly adhering to PSR-7 as the interface for Guzzle messages, + adding methods to message interfaces would actually require Guzzle messages + to extend from PSR-7 messages rather then work with them directly. + +## Migrating to middleware + +The change to PSR-7 unfortunately required significant refactoring to Guzzle +due to the fact that PSR-7 messages are immutable. Guzzle 5 relied on an event +system from plugins. The event system relied on mutability of HTTP messages and +side effects in order to work. With immutable messages, you have to change your +workflow to become more about either returning a value (e.g., functional +middlewares) or setting a value on an object. Guzzle v6 has chosen the +functional middleware approach. + +Instead of using the event system to listen for things like the `before` event, +you now create a stack based middleware function that intercepts a request on +the way in and the promise of the response on the way out. This is a much +simpler and more predictable approach than the event system and works nicely +with PSR-7 middleware. Due to the use of promises, the middleware system is +also asynchronous. + +v5: + +```php +use GuzzleHttp\Event\BeforeEvent; +$client = new GuzzleHttp\Client(); +// Get the emitter and listen to the before event. +$client->getEmitter()->on('before', function (BeforeEvent $e) { + // Guzzle v5 events relied on mutation + $e->getRequest()->setHeader('X-Foo', 'Bar'); +}); +``` + +v6: + +In v6, you can modify the request before it is sent using the `mapRequest` +middleware. The idiomatic way in v6 to modify the request/response lifecycle is +to setup a handler middleware stack up front and inject the handler into a +client. + +```php +use GuzzleHttp\Middleware; +// Create a handler stack that has all of the default middlewares attached +$handler = GuzzleHttp\HandlerStack::create(); +// Push the handler onto the handler stack +$handler->push(Middleware::mapRequest(function (RequestInterface $request) { + // Notice that we have to return a request object + return $request->withHeader('X-Foo', 'Bar'); +})); +// Inject the handler into the client +$client = new GuzzleHttp\Client(['handler' => $handler]); +``` + +## POST Requests + +This version added the [`form_params`](https://docs.guzzlephp.org/en/latest/request-options.html#form_params) +and `multipart` request options. `form_params` is an associative array of +strings or array of strings and is used to serialize an +`application/x-www-form-urlencoded` POST request. The +[`multipart`](https://docs.guzzlephp.org/en/latest/request-options.html#multipart) +option is now used to send a multipart/form-data POST request. + +`GuzzleHttp\Post\PostFile` has been removed. Use the `multipart` option to add +POST files to a multipart/form-data request. + +The `body` option no longer accepts an array to send POST requests. Please use +`multipart` or `form_params` instead. + +The `base_url` option has been renamed to `base_uri`. + +4.x to 5.0 +---------- + +## Rewritten Adapter Layer + +Guzzle now uses [RingPHP](https://ringphp.readthedocs.org/en/latest) to send +HTTP requests. The `adapter` option in a `GuzzleHttp\Client` constructor +is still supported, but it has now been renamed to `handler`. Instead of +passing a `GuzzleHttp\Adapter\AdapterInterface`, you must now pass a PHP +`callable` that follows the RingPHP specification. + +## Removed Fluent Interfaces + +[Fluent interfaces were removed](https://ocramius.github.io/blog/fluent-interfaces-are-evil/) +from the following classes: + +- `GuzzleHttp\Collection` +- `GuzzleHttp\Url` +- `GuzzleHttp\Query` +- `GuzzleHttp\Post\PostBody` +- `GuzzleHttp\Cookie\SetCookie` + +## Removed functions.php + +Removed "functions.php", so that Guzzle is truly PSR-4 compliant. The following +functions can be used as replacements. + +- `GuzzleHttp\json_decode` -> `GuzzleHttp\Utils::jsonDecode` +- `GuzzleHttp\get_path` -> `GuzzleHttp\Utils::getPath` +- `GuzzleHttp\Utils::setPath` -> `GuzzleHttp\set_path` +- `GuzzleHttp\Pool::batch` -> `GuzzleHttp\batch`. This function is, however, + deprecated in favor of using `GuzzleHttp\Pool::batch()`. + +The "procedural" global client has been removed with no replacement (e.g., +`GuzzleHttp\get()`, `GuzzleHttp\post()`, etc.). Use a `GuzzleHttp\Client` +object as a replacement. + +## `throwImmediately` has been removed + +The concept of "throwImmediately" has been removed from exceptions and error +events. This control mechanism was used to stop a transfer of concurrent +requests from completing. This can now be handled by throwing the exception or +by cancelling a pool of requests or each outstanding future request +individually. + +## headers event has been removed + +Removed the "headers" event. This event was only useful for changing the +body a response once the headers of the response were known. You can implement +a similar behavior in a number of ways. One example might be to use a +FnStream that has access to the transaction being sent. For example, when the +first byte is written, you could check if the response headers match your +expectations, and if so, change the actual stream body that is being +written to. + +## Updates to HTTP Messages + +Removed the `asArray` parameter from +`GuzzleHttp\Message\MessageInterface::getHeader`. If you want to get a header +value as an array, then use the newly added `getHeaderAsArray()` method of +`MessageInterface`. This change makes the Guzzle interfaces compatible with +the PSR-7 interfaces. + +3.x to 4.0 +---------- + +## Overarching changes: + +- Now requires PHP 5.4 or greater. +- No longer requires cURL to send requests. +- Guzzle no longer wraps every exception it throws. Only exceptions that are + recoverable are now wrapped by Guzzle. +- Various namespaces have been removed or renamed. +- No longer requiring the Symfony EventDispatcher. A custom event dispatcher + based on the Symfony EventDispatcher is + now utilized in `GuzzleHttp\Event\EmitterInterface` (resulting in significant + speed and functionality improvements). + +Changes per Guzzle 3.x namespace are described below. + +## Batch + +The `Guzzle\Batch` namespace has been removed. This is best left to +third-parties to implement on top of Guzzle's core HTTP library. + +## Cache + +The `Guzzle\Cache` namespace has been removed. (Todo: No suitable replacement +has been implemented yet, but hoping to utilize a PSR cache interface). + +## Common + +- Removed all of the wrapped exceptions. It's better to use the standard PHP + library for unrecoverable exceptions. +- `FromConfigInterface` has been removed. +- `Guzzle\Common\Version` has been removed. The VERSION constant can be found + at `GuzzleHttp\ClientInterface::VERSION`. + +### Collection + +- `getAll` has been removed. Use `toArray` to convert a collection to an array. +- `inject` has been removed. +- `keySearch` has been removed. +- `getPath` no longer supports wildcard expressions. Use something better like + JMESPath for this. +- `setPath` now supports appending to an existing array via the `[]` notation. + +### Events + +Guzzle no longer requires Symfony's EventDispatcher component. Guzzle now uses +`GuzzleHttp\Event\Emitter`. + +- `Symfony\Component\EventDispatcher\EventDispatcherInterface` is replaced by + `GuzzleHttp\Event\EmitterInterface`. +- `Symfony\Component\EventDispatcher\EventDispatcher` is replaced by + `GuzzleHttp\Event\Emitter`. +- `Symfony\Component\EventDispatcher\Event` is replaced by + `GuzzleHttp\Event\Event`, and Guzzle now has an EventInterface in + `GuzzleHttp\Event\EventInterface`. +- `AbstractHasDispatcher` has moved to a trait, `HasEmitterTrait`, and + `HasDispatcherInterface` has moved to `HasEmitterInterface`. Retrieving the + event emitter of a request, client, etc. now uses the `getEmitter` method + rather than the `getDispatcher` method. + +#### Emitter + +- Use the `once()` method to add a listener that automatically removes itself + the first time it is invoked. +- Use the `listeners()` method to retrieve a list of event listeners rather than + the `getListeners()` method. +- Use `emit()` instead of `dispatch()` to emit an event from an emitter. +- Use `attach()` instead of `addSubscriber()` and `detach()` instead of + `removeSubscriber()`. + +```php +$mock = new Mock(); +// 3.x +$request->getEventDispatcher()->addSubscriber($mock); +$request->getEventDispatcher()->removeSubscriber($mock); +// 4.x +$request->getEmitter()->attach($mock); +$request->getEmitter()->detach($mock); +``` + +Use the `on()` method to add a listener rather than the `addListener()` method. + +```php +// 3.x +$request->getEventDispatcher()->addListener('foo', function (Event $event) { /* ... */ } ); +// 4.x +$request->getEmitter()->on('foo', function (Event $event, $name) { /* ... */ } ); +``` + +## Http + +### General changes + +- The cacert.pem certificate has been moved to `src/cacert.pem`. +- Added the concept of adapters that are used to transfer requests over the + wire. +- Simplified the event system. +- Sending requests in parallel is still possible, but batching is no longer a + concept of the HTTP layer. Instead, you must use the `complete` and `error` + events to asynchronously manage parallel request transfers. +- `Guzzle\Http\Url` has moved to `GuzzleHttp\Url`. +- `Guzzle\Http\QueryString` has moved to `GuzzleHttp\Query`. +- QueryAggregators have been rewritten so that they are simply callable + functions. +- `GuzzleHttp\StaticClient` has been removed. Use the functions provided in + `functions.php` for an easy to use static client instance. +- Exceptions in `GuzzleHttp\Exception` have been updated to all extend from + `GuzzleHttp\Exception\TransferException`. + +### Client + +Calling methods like `get()`, `post()`, `head()`, etc. no longer create and +return a request, but rather creates a request, sends the request, and returns +the response. + +```php +// 3.0 +$request = $client->get('/'); +$response = $request->send(); + +// 4.0 +$response = $client->get('/'); + +// or, to mirror the previous behavior +$request = $client->createRequest('GET', '/'); +$response = $client->send($request); +``` + +`GuzzleHttp\ClientInterface` has changed. + +- The `send` method no longer accepts more than one request. Use `sendAll` to + send multiple requests in parallel. +- `setUserAgent()` has been removed. Use a default request option instead. You + could, for example, do something like: + `$client->setConfig('defaults/headers/User-Agent', 'Foo/Bar ' . $client::getDefaultUserAgent())`. +- `setSslVerification()` has been removed. Use default request options instead, + like `$client->setConfig('defaults/verify', true)`. + +`GuzzleHttp\Client` has changed. + +- The constructor now accepts only an associative array. You can include a + `base_url` string or array to use a URI template as the base URL of a client. + You can also specify a `defaults` key that is an associative array of default + request options. You can pass an `adapter` to use a custom adapter, + `batch_adapter` to use a custom adapter for sending requests in parallel, or + a `message_factory` to change the factory used to create HTTP requests and + responses. +- The client no longer emits a `client.create_request` event. +- Creating requests with a client no longer automatically utilize a URI + template. You must pass an array into a creational method (e.g., + `createRequest`, `get`, `put`, etc.) in order to expand a URI template. + +### Messages + +Messages no longer have references to their counterparts (i.e., a request no +longer has a reference to it's response, and a response no loger has a +reference to its request). This association is now managed through a +`GuzzleHttp\Adapter\TransactionInterface` object. You can get references to +these transaction objects using request events that are emitted over the +lifecycle of a request. + +#### Requests with a body + +- `GuzzleHttp\Message\EntityEnclosingRequest` and + `GuzzleHttp\Message\EntityEnclosingRequestInterface` have been removed. The + separation between requests that contain a body and requests that do not + contain a body has been removed, and now `GuzzleHttp\Message\RequestInterface` + handles both use cases. +- Any method that previously accepts a `GuzzleHttp\Response` object now accept a + `GuzzleHttp\Message\ResponseInterface`. +- `GuzzleHttp\Message\RequestFactoryInterface` has been renamed to + `GuzzleHttp\Message\MessageFactoryInterface`. This interface is used to create + both requests and responses and is implemented in + `GuzzleHttp\Message\MessageFactory`. +- POST field and file methods have been removed from the request object. You + must now use the methods made available to `GuzzleHttp\Post\PostBodyInterface` + to control the format of a POST body. Requests that are created using a + standard `GuzzleHttp\Message\MessageFactoryInterface` will automatically use + a `GuzzleHttp\Post\PostBody` body if the body was passed as an array or if + the method is POST and no body is provided. + +```php +$request = $client->createRequest('POST', '/'); +$request->getBody()->setField('foo', 'bar'); +$request->getBody()->addFile(new PostFile('file_key', fopen('/path/to/content', 'r'))); +``` + +#### Headers + +- `GuzzleHttp\Message\Header` has been removed. Header values are now simply + represented by an array of values or as a string. Header values are returned + as a string by default when retrieving a header value from a message. You can + pass an optional argument of `true` to retrieve a header value as an array + of strings instead of a single concatenated string. +- `GuzzleHttp\PostFile` and `GuzzleHttp\PostFileInterface` have been moved to + `GuzzleHttp\Post`. This interface has been simplified and now allows the + addition of arbitrary headers. +- Custom headers like `GuzzleHttp\Message\Header\Link` have been removed. Most + of the custom headers are now handled separately in specific + subscribers/plugins, and `GuzzleHttp\Message\HeaderValues::parseParams()` has + been updated to properly handle headers that contain parameters (like the + `Link` header). + +#### Responses + +- `GuzzleHttp\Message\Response::getInfo()` and + `GuzzleHttp\Message\Response::setInfo()` have been removed. Use the event + system to retrieve this type of information. +- `GuzzleHttp\Message\Response::getRawHeaders()` has been removed. +- `GuzzleHttp\Message\Response::getMessage()` has been removed. +- `GuzzleHttp\Message\Response::calculateAge()` and other cache specific + methods have moved to the CacheSubscriber. +- Header specific helper functions like `getContentMd5()` have been removed. + Just use `getHeader('Content-MD5')` instead. +- `GuzzleHttp\Message\Response::setRequest()` and + `GuzzleHttp\Message\Response::getRequest()` have been removed. Use the event + system to work with request and response objects as a transaction. +- `GuzzleHttp\Message\Response::getRedirectCount()` has been removed. Use the + Redirect subscriber instead. +- `GuzzleHttp\Message\Response::isSuccessful()` and other related methods have + been removed. Use `getStatusCode()` instead. + +#### Streaming responses + +Streaming requests can now be created by a client directly, returning a +`GuzzleHttp\Message\ResponseInterface` object that contains a body stream +referencing an open PHP HTTP stream. + +```php +// 3.0 +use Guzzle\Stream\PhpStreamRequestFactory; +$request = $client->get('/'); +$factory = new PhpStreamRequestFactory(); +$stream = $factory->fromRequest($request); +$data = $stream->read(1024); + +// 4.0 +$response = $client->get('/', ['stream' => true]); +// Read some data off of the stream in the response body +$data = $response->getBody()->read(1024); +``` + +#### Redirects + +The `configureRedirects()` method has been removed in favor of a +`allow_redirects` request option. + +```php +// Standard redirects with a default of a max of 5 redirects +$request = $client->createRequest('GET', '/', ['allow_redirects' => true]); + +// Strict redirects with a custom number of redirects +$request = $client->createRequest('GET', '/', [ + 'allow_redirects' => ['max' => 5, 'strict' => true] +]); +``` + +#### EntityBody + +EntityBody interfaces and classes have been removed or moved to +`GuzzleHttp\Stream`. All classes and interfaces that once required +`GuzzleHttp\EntityBodyInterface` now require +`GuzzleHttp\Stream\StreamInterface`. Creating a new body for a request no +longer uses `GuzzleHttp\EntityBody::factory` but now uses +`GuzzleHttp\Stream\Stream::factory` or even better: +`GuzzleHttp\Stream\create()`. + +- `Guzzle\Http\EntityBodyInterface` is now `GuzzleHttp\Stream\StreamInterface` +- `Guzzle\Http\EntityBody` is now `GuzzleHttp\Stream\Stream` +- `Guzzle\Http\CachingEntityBody` is now `GuzzleHttp\Stream\CachingStream` +- `Guzzle\Http\ReadLimitEntityBody` is now `GuzzleHttp\Stream\LimitStream` +- `Guzzle\Http\IoEmittyinEntityBody` has been removed. + +#### Request lifecycle events + +Requests previously submitted a large number of requests. The number of events +emitted over the lifecycle of a request has been significantly reduced to make +it easier to understand how to extend the behavior of a request. All events +emitted during the lifecycle of a request now emit a custom +`GuzzleHttp\Event\EventInterface` object that contains context providing +methods and a way in which to modify the transaction at that specific point in +time (e.g., intercept the request and set a response on the transaction). + +- `request.before_send` has been renamed to `before` and now emits a + `GuzzleHttp\Event\BeforeEvent` +- `request.complete` has been renamed to `complete` and now emits a + `GuzzleHttp\Event\CompleteEvent`. +- `request.sent` has been removed. Use `complete`. +- `request.success` has been removed. Use `complete`. +- `error` is now an event that emits a `GuzzleHttp\Event\ErrorEvent`. +- `request.exception` has been removed. Use `error`. +- `request.receive.status_line` has been removed. +- `curl.callback.progress` has been removed. Use a custom `StreamInterface` to + maintain a status update. +- `curl.callback.write` has been removed. Use a custom `StreamInterface` to + intercept writes. +- `curl.callback.read` has been removed. Use a custom `StreamInterface` to + intercept reads. + +`headers` is a new event that is emitted after the response headers of a +request have been received before the body of the response is downloaded. This +event emits a `GuzzleHttp\Event\HeadersEvent`. + +You can intercept a request and inject a response using the `intercept()` event +of a `GuzzleHttp\Event\BeforeEvent`, `GuzzleHttp\Event\CompleteEvent`, and +`GuzzleHttp\Event\ErrorEvent` event. + +See: https://docs.guzzlephp.org/en/latest/events.html + +## Inflection + +The `Guzzle\Inflection` namespace has been removed. This is not a core concern +of Guzzle. + +## Iterator + +The `Guzzle\Iterator` namespace has been removed. + +- `Guzzle\Iterator\AppendIterator`, `Guzzle\Iterator\ChunkedIterator`, and + `Guzzle\Iterator\MethodProxyIterator` are nice, but not a core requirement of + Guzzle itself. +- `Guzzle\Iterator\FilterIterator` is no longer needed because an equivalent + class is shipped with PHP 5.4. +- `Guzzle\Iterator\MapIterator` is not really needed when using PHP 5.5 because + it's easier to just wrap an iterator in a generator that maps values. + +For a replacement of these iterators, see https://github.com/nikic/iter + +## Log + +The LogPlugin has moved to https://github.com/guzzle/log-subscriber. The +`Guzzle\Log` namespace has been removed. Guzzle now relies on +`Psr\Log\LoggerInterface` for all logging. The MessageFormatter class has been +moved to `GuzzleHttp\Subscriber\Log\Formatter`. + +## Parser + +The `Guzzle\Parser` namespace has been removed. This was previously used to +make it possible to plug in custom parsers for cookies, messages, URI +templates, and URLs; however, this level of complexity is not needed in Guzzle +so it has been removed. + +- Cookie: Cookie parsing logic has been moved to + `GuzzleHttp\Cookie\SetCookie::fromString`. +- Message: Message parsing logic for both requests and responses has been moved + to `GuzzleHttp\Message\MessageFactory::fromMessage`. Message parsing is only + used in debugging or deserializing messages, so it doesn't make sense for + Guzzle as a library to add this level of complexity to parsing messages. +- UriTemplate: URI template parsing has been moved to + `GuzzleHttp\UriTemplate`. The Guzzle library will automatically use the PECL + URI template library if it is installed. +- Url: URL parsing is now performed in `GuzzleHttp\Url::fromString` (previously + it was `Guzzle\Http\Url::factory()`). If custom URL parsing is necessary, + then developers are free to subclass `GuzzleHttp\Url`. + +## Plugin + +The `Guzzle\Plugin` namespace has been renamed to `GuzzleHttp\Subscriber`. +Several plugins are shipping with the core Guzzle library under this namespace. + +- `GuzzleHttp\Subscriber\Cookie`: Replaces the old CookiePlugin. Cookie jar + code has moved to `GuzzleHttp\Cookie`. +- `GuzzleHttp\Subscriber\History`: Replaces the old HistoryPlugin. +- `GuzzleHttp\Subscriber\HttpError`: Throws errors when a bad HTTP response is + received. +- `GuzzleHttp\Subscriber\Mock`: Replaces the old MockPlugin. +- `GuzzleHttp\Subscriber\Prepare`: Prepares the body of a request just before + sending. This subscriber is attached to all requests by default. +- `GuzzleHttp\Subscriber\Redirect`: Replaces the RedirectPlugin. + +The following plugins have been removed (third-parties are free to re-implement +these if needed): + +- `GuzzleHttp\Plugin\Async` has been removed. +- `GuzzleHttp\Plugin\CurlAuth` has been removed. +- `GuzzleHttp\Plugin\ErrorResponse\ErrorResponsePlugin` has been removed. This + functionality should instead be implemented with event listeners that occur + after normal response parsing occurs in the guzzle/command package. + +The following plugins are not part of the core Guzzle package, but are provided +in separate repositories: + +- `Guzzle\Http\Plugin\BackoffPlugin` has been rewritten to be much simpler + to build custom retry policies using simple functions rather than various + chained classes. See: https://github.com/guzzle/retry-subscriber +- `Guzzle\Http\Plugin\Cache\CachePlugin` has moved to + https://github.com/guzzle/cache-subscriber +- `Guzzle\Http\Plugin\Log\LogPlugin` has moved to + https://github.com/guzzle/log-subscriber +- `Guzzle\Http\Plugin\Md5\Md5Plugin` has moved to + https://github.com/guzzle/message-integrity-subscriber +- `Guzzle\Http\Plugin\Mock\MockPlugin` has moved to + `GuzzleHttp\Subscriber\MockSubscriber`. +- `Guzzle\Http\Plugin\Oauth\OauthPlugin` has moved to + https://github.com/guzzle/oauth-subscriber + +## Service + +The service description layer of Guzzle has moved into two separate packages: + +- https://github.com/guzzle/command Provides a high level abstraction over web + services by representing web service operations using commands. +- https://github.com/guzzle/guzzle-services Provides an implementation of + guzzle/command that provides request serialization and response parsing using + Guzzle service descriptions. + +## Stream + +Stream have moved to a separate package available at +https://github.com/guzzle/streams. + +`Guzzle\Stream\StreamInterface` has been given a large update to cleanly take +on the responsibilities of `Guzzle\Http\EntityBody` and +`Guzzle\Http\EntityBodyInterface` now that they have been removed. The number +of methods implemented by the `StreamInterface` has been drastically reduced to +allow developers to more easily extend and decorate stream behavior. + +## Removed methods from StreamInterface + +- `getStream` and `setStream` have been removed to better encapsulate streams. +- `getMetadata` and `setMetadata` have been removed in favor of + `GuzzleHttp\Stream\MetadataStreamInterface`. +- `getWrapper`, `getWrapperData`, `getStreamType`, and `getUri` have all been + removed. This data is accessible when + using streams that implement `GuzzleHttp\Stream\MetadataStreamInterface`. +- `rewind` has been removed. Use `seek(0)` for a similar behavior. + +## Renamed methods + +- `detachStream` has been renamed to `detach`. +- `feof` has been renamed to `eof`. +- `ftell` has been renamed to `tell`. +- `readLine` has moved from an instance method to a static class method of + `GuzzleHttp\Stream\Stream`. + +## Metadata streams + +`GuzzleHttp\Stream\MetadataStreamInterface` has been added to denote streams +that contain additional metadata accessible via `getMetadata()`. +`GuzzleHttp\Stream\StreamInterface::getMetadata` and +`GuzzleHttp\Stream\StreamInterface::setMetadata` have been removed. + +## StreamRequestFactory + +The entire concept of the StreamRequestFactory has been removed. The way this +was used in Guzzle 3 broke the actual interface of sending streaming requests +(instead of getting back a Response, you got a StreamInterface). Streaming +PHP requests are now implemented through the `GuzzleHttp\Adapter\StreamAdapter`. + +3.6 to 3.7 +---------- + +### Deprecations + +- You can now enable E_USER_DEPRECATED warnings to see if you are using any deprecated methods.: + +```php +\Guzzle\Common\Version::$emitWarnings = true; +``` + +The following APIs and options have been marked as deprecated: + +- Marked `Guzzle\Http\Message\Request::isResponseBodyRepeatable()` as deprecated. Use `$request->getResponseBody()->isRepeatable()` instead. +- Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead. +- Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead. +- Marked `Guzzle\Http\Message\Request::setIsRedirect()` as deprecated. Use the HistoryPlugin instead. +- Marked `Guzzle\Http\Message\Request::isRedirect()` as deprecated. Use the HistoryPlugin instead. +- Marked `Guzzle\Cache\CacheAdapterFactory::factory()` as deprecated +- Marked `Guzzle\Service\Client::enableMagicMethods()` as deprecated. Magic methods can no longer be disabled on a Guzzle\Service\Client. +- Marked `Guzzle\Parser\Url\UrlParser` as deprecated. Just use PHP's `parse_url()` and percent encode your UTF-8. +- Marked `Guzzle\Common\Collection::inject()` as deprecated. +- Marked `Guzzle\Plugin\CurlAuth\CurlAuthPlugin` as deprecated. Use + `$client->getConfig()->setPath('request.options/auth', array('user', 'pass', 'Basic|Digest|NTLM|Any'));` or + `$client->setDefaultOption('auth', array('user', 'pass', 'Basic|Digest|NTLM|Any'));` + +3.7 introduces `request.options` as a parameter for a client configuration and as an optional argument to all creational +request methods. When paired with a client's configuration settings, these options allow you to specify default settings +for various aspects of a request. Because these options make other previous configuration options redundant, several +configuration options and methods of a client and AbstractCommand have been deprecated. + +- Marked `Guzzle\Service\Client::getDefaultHeaders()` as deprecated. Use `$client->getDefaultOption('headers')`. +- Marked `Guzzle\Service\Client::setDefaultHeaders()` as deprecated. Use `$client->setDefaultOption('headers/{header_name}', 'value')`. +- Marked 'request.params' for `Guzzle\Http\Client` as deprecated. Use `$client->setDefaultOption('params/{param_name}', 'value')` +- Marked 'command.headers', 'command.response_body' and 'command.on_complete' as deprecated for AbstractCommand. These will work through Guzzle 4.0 + + $command = $client->getCommand('foo', array( + 'command.headers' => array('Test' => '123'), + 'command.response_body' => '/path/to/file' + )); + + // Should be changed to: + + $command = $client->getCommand('foo', array( + 'command.request_options' => array( + 'headers' => array('Test' => '123'), + 'save_as' => '/path/to/file' + ) + )); + +### Interface changes + +Additions and changes (you will need to update any implementations or subclasses you may have created): + +- Added an `$options` argument to the end of the following methods of `Guzzle\Http\ClientInterface`: + createRequest, head, delete, put, patch, post, options, prepareRequest +- Added an `$options` argument to the end of `Guzzle\Http\Message\Request\RequestFactoryInterface::createRequest()` +- Added an `applyOptions()` method to `Guzzle\Http\Message\Request\RequestFactoryInterface` +- Changed `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $body = null)` to + `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $options = array())`. You can still pass in a + resource, string, or EntityBody into the $options parameter to specify the download location of the response. +- Changed `Guzzle\Common\Collection::__construct($data)` to no longer accepts a null value for `$data` but a + default `array()` +- Added `Guzzle\Stream\StreamInterface::isRepeatable` +- Made `Guzzle\Http\Client::expandTemplate` and `getUriTemplate` protected methods. + +The following methods were removed from interfaces. All of these methods are still available in the concrete classes +that implement them, but you should update your code to use alternative methods: + +- Removed `Guzzle\Http\ClientInterface::setDefaultHeaders(). Use + `$client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`. or + `$client->getConfig()->setPath('request.options/headers', array('header_name' => 'value'))` or + `$client->setDefaultOption('headers/{header_name}', 'value')`. or + `$client->setDefaultOption('headers', array('header_name' => 'value'))`. +- Removed `Guzzle\Http\ClientInterface::getDefaultHeaders(). Use `$client->getConfig()->getPath('request.options/headers')`. +- Removed `Guzzle\Http\ClientInterface::expandTemplate()`. This is an implementation detail. +- Removed `Guzzle\Http\ClientInterface::setRequestFactory()`. This is an implementation detail. +- Removed `Guzzle\Http\ClientInterface::getCurlMulti()`. This is a very specific implementation detail. +- Removed `Guzzle\Http\Message\RequestInterface::canCache`. Use the CachePlugin. +- Removed `Guzzle\Http\Message\RequestInterface::setIsRedirect`. Use the HistoryPlugin. +- Removed `Guzzle\Http\Message\RequestInterface::isRedirect`. Use the HistoryPlugin. + +### Cache plugin breaking changes + +- CacheKeyProviderInterface and DefaultCacheKeyProvider are no longer used. All of this logic is handled in a + CacheStorageInterface. These two objects and interface will be removed in a future version. +- Always setting X-cache headers on cached responses +- Default cache TTLs are now handled by the CacheStorageInterface of a CachePlugin +- `CacheStorageInterface::cache($key, Response $response, $ttl = null)` has changed to `cache(RequestInterface + $request, Response $response);` +- `CacheStorageInterface::fetch($key)` has changed to `fetch(RequestInterface $request);` +- `CacheStorageInterface::delete($key)` has changed to `delete(RequestInterface $request);` +- Added `CacheStorageInterface::purge($url)` +- `DefaultRevalidation::__construct(CacheKeyProviderInterface $cacheKey, CacheStorageInterface $cache, CachePlugin + $plugin)` has changed to `DefaultRevalidation::__construct(CacheStorageInterface $cache, + CanCacheStrategyInterface $canCache = null)` +- Added `RevalidationInterface::shouldRevalidate(RequestInterface $request, Response $response)` + +3.5 to 3.6 +---------- + +* Mixed casing of headers are now forced to be a single consistent casing across all values for that header. +* Messages internally use a HeaderCollection object to delegate handling case-insensitive header resolution +* Removed the whole changedHeader() function system of messages because all header changes now go through addHeader(). + For example, setHeader() first removes the header using unset on a HeaderCollection and then calls addHeader(). + Keeping the Host header and URL host in sync is now handled by overriding the addHeader method in Request. +* Specific header implementations can be created for complex headers. When a message creates a header, it uses a + HeaderFactory which can map specific headers to specific header classes. There is now a Link header and + CacheControl header implementation. +* Moved getLinks() from Response to just be used on a Link header object. + +If you previously relied on Guzzle\Http\Message\Header::raw(), then you will need to update your code to use the +HeaderInterface (e.g. toArray(), getAll(), etc.). + +### Interface changes + +* Removed from interface: Guzzle\Http\ClientInterface::setUriTemplate +* Removed from interface: Guzzle\Http\ClientInterface::setCurlMulti() +* Removed Guzzle\Http\Message\Request::receivedRequestHeader() and implemented this functionality in + Guzzle\Http\Curl\RequestMediator +* Removed the optional $asString parameter from MessageInterface::getHeader(). Just cast the header to a string. +* Removed the optional $tryChunkedTransfer option from Guzzle\Http\Message\EntityEnclosingRequestInterface +* Removed the $asObjects argument from Guzzle\Http\Message\MessageInterface::getHeaders() + +### Removed deprecated functions + +* Removed Guzzle\Parser\ParserRegister::get(). Use getParser() +* Removed Guzzle\Parser\ParserRegister::set(). Use registerParser(). + +### Deprecations + +* The ability to case-insensitively search for header values +* Guzzle\Http\Message\Header::hasExactHeader +* Guzzle\Http\Message\Header::raw. Use getAll() +* Deprecated cache control specific methods on Guzzle\Http\Message\AbstractMessage. Use the CacheControl header object + instead. + +### Other changes + +* All response header helper functions return a string rather than mixing Header objects and strings inconsistently +* Removed cURL blacklist support. This is no longer necessary now that Expect, Accept, etc. are managed by Guzzle + directly via interfaces +* Removed the injecting of a request object onto a response object. The methods to get and set a request still exist + but are a no-op until removed. +* Most classes that used to require a `Guzzle\Service\Command\CommandInterface` typehint now request a + `Guzzle\Service\Command\ArrayCommandInterface`. +* Added `Guzzle\Http\Message\RequestInterface::startResponse()` to the RequestInterface to handle injecting a response + on a request while the request is still being transferred +* `Guzzle\Service\Command\CommandInterface` now extends from ToArrayInterface and ArrayAccess + +3.3 to 3.4 +---------- + +Base URLs of a client now follow the rules of https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.2 when merging URLs. + +3.2 to 3.3 +---------- + +### Response::getEtag() quote stripping removed + +`Guzzle\Http\Message\Response::getEtag()` no longer strips quotes around the ETag response header + +### Removed `Guzzle\Http\Utils` + +The `Guzzle\Http\Utils` class was removed. This class was only used for testing. + +### Stream wrapper and type + +`Guzzle\Stream\Stream::getWrapper()` and `Guzzle\Stream\Stream::getStreamType()` are no longer converted to lowercase. + +### curl.emit_io became emit_io + +Emitting IO events from a RequestMediator is now a parameter that must be set in a request's curl options using the +'emit_io' key. This was previously set under a request's parameters using 'curl.emit_io' + +3.1 to 3.2 +---------- + +### CurlMulti is no longer reused globally + +Before 3.2, the same CurlMulti object was reused globally for each client. This can cause issue where plugins added +to a single client can pollute requests dispatched from other clients. + +If you still wish to reuse the same CurlMulti object with each client, then you can add a listener to the +ServiceBuilder's `service_builder.create_client` event to inject a custom CurlMulti object into each client as it is +created. + +```php +$multi = new Guzzle\Http\Curl\CurlMulti(); +$builder = Guzzle\Service\Builder\ServiceBuilder::factory('/path/to/config.json'); +$builder->addListener('service_builder.create_client', function ($event) use ($multi) { + $event['client']->setCurlMulti($multi); +} +}); +``` + +### No default path + +URLs no longer have a default path value of '/' if no path was specified. + +Before: + +```php +$request = $client->get('http://www.foo.com'); +echo $request->getUrl(); +// >> http://www.foo.com/ +``` + +After: + +```php +$request = $client->get('http://www.foo.com'); +echo $request->getUrl(); +// >> http://www.foo.com +``` + +### Less verbose BadResponseException + +The exception message for `Guzzle\Http\Exception\BadResponseException` no longer contains the full HTTP request and +response information. You can, however, get access to the request and response object by calling `getRequest()` or +`getResponse()` on the exception object. + +### Query parameter aggregation + +Multi-valued query parameters are no longer aggregated using a callback function. `Guzzle\Http\Query` now has a +setAggregator() method that accepts a `Guzzle\Http\QueryAggregator\QueryAggregatorInterface` object. This object is +responsible for handling the aggregation of multi-valued query string variables into a flattened hash. + +2.8 to 3.x +---------- + +### Guzzle\Service\Inspector + +Change `\Guzzle\Service\Inspector::fromConfig` to `\Guzzle\Common\Collection::fromConfig` + +**Before** + +```php +use Guzzle\Service\Inspector; + +class YourClient extends \Guzzle\Service\Client +{ + public static function factory($config = array()) + { + $default = array(); + $required = array('base_url', 'username', 'api_key'); + $config = Inspector::fromConfig($config, $default, $required); + + $client = new self( + $config->get('base_url'), + $config->get('username'), + $config->get('api_key') + ); + $client->setConfig($config); + + $client->setDescription(ServiceDescription::factory(__DIR__ . DIRECTORY_SEPARATOR . 'client.json')); + + return $client; + } +``` + +**After** + +```php +use Guzzle\Common\Collection; + +class YourClient extends \Guzzle\Service\Client +{ + public static function factory($config = array()) + { + $default = array(); + $required = array('base_url', 'username', 'api_key'); + $config = Collection::fromConfig($config, $default, $required); + + $client = new self( + $config->get('base_url'), + $config->get('username'), + $config->get('api_key') + ); + $client->setConfig($config); + + $client->setDescription(ServiceDescription::factory(__DIR__ . DIRECTORY_SEPARATOR . 'client.json')); + + return $client; + } +``` + +### Convert XML Service Descriptions to JSON + +**Before** + +```xml + + + + + + Get a list of groups + + + Uses a search query to get a list of groups + + + + Create a group + + + + + Delete a group by ID + + + + + + + Update a group + + + + + + +``` + +**After** + +```json +{ + "name": "Zendesk REST API v2", + "apiVersion": "2012-12-31", + "description":"Provides access to Zendesk views, groups, tickets, ticket fields, and users", + "operations": { + "list_groups": { + "httpMethod":"GET", + "uri": "groups.json", + "summary": "Get a list of groups" + }, + "search_groups":{ + "httpMethod":"GET", + "uri": "search.json?query=\"{query} type:group\"", + "summary": "Uses a search query to get a list of groups", + "parameters":{ + "query":{ + "location": "uri", + "description":"Zendesk Search Query", + "type": "string", + "required": true + } + } + }, + "create_group": { + "httpMethod":"POST", + "uri": "groups.json", + "summary": "Create a group", + "parameters":{ + "data": { + "type": "array", + "location": "body", + "description":"Group JSON", + "filters": "json_encode", + "required": true + }, + "Content-Type":{ + "type": "string", + "location":"header", + "static": "application/json" + } + } + }, + "delete_group": { + "httpMethod":"DELETE", + "uri": "groups/{id}.json", + "summary": "Delete a group", + "parameters":{ + "id":{ + "location": "uri", + "description":"Group to delete by ID", + "type": "integer", + "required": true + } + } + }, + "get_group": { + "httpMethod":"GET", + "uri": "groups/{id}.json", + "summary": "Get a ticket", + "parameters":{ + "id":{ + "location": "uri", + "description":"Group to get by ID", + "type": "integer", + "required": true + } + } + }, + "update_group": { + "httpMethod":"PUT", + "uri": "groups/{id}.json", + "summary": "Update a group", + "parameters":{ + "id": { + "location": "uri", + "description":"Group to update by ID", + "type": "integer", + "required": true + }, + "data": { + "type": "array", + "location": "body", + "description":"Group JSON", + "filters": "json_encode", + "required": true + }, + "Content-Type":{ + "type": "string", + "location":"header", + "static": "application/json" + } + } + } +} +``` + +### Guzzle\Service\Description\ServiceDescription + +Commands are now called Operations + +**Before** + +```php +use Guzzle\Service\Description\ServiceDescription; + +$sd = new ServiceDescription(); +$sd->getCommands(); // @returns ApiCommandInterface[] +$sd->hasCommand($name); +$sd->getCommand($name); // @returns ApiCommandInterface|null +$sd->addCommand($command); // @param ApiCommandInterface $command +``` + +**After** + +```php +use Guzzle\Service\Description\ServiceDescription; + +$sd = new ServiceDescription(); +$sd->getOperations(); // @returns OperationInterface[] +$sd->hasOperation($name); +$sd->getOperation($name); // @returns OperationInterface|null +$sd->addOperation($operation); // @param OperationInterface $operation +``` + +### Guzzle\Common\Inflection\Inflector + +Namespace is now `Guzzle\Inflection\Inflector` + +### Guzzle\Http\Plugin + +Namespace is now `Guzzle\Plugin`. Many other changes occur within this namespace and are detailed in their own sections below. + +### Guzzle\Http\Plugin\LogPlugin and Guzzle\Common\Log + +Now `Guzzle\Plugin\Log\LogPlugin` and `Guzzle\Log` respectively. + +**Before** + +```php +use Guzzle\Common\Log\ClosureLogAdapter; +use Guzzle\Http\Plugin\LogPlugin; + +/** @var \Guzzle\Http\Client */ +$client; + +// $verbosity is an integer indicating desired message verbosity level +$client->addSubscriber(new LogPlugin(new ClosureLogAdapter(function($m) { echo $m; }, $verbosity = LogPlugin::LOG_VERBOSE); +``` + +**After** + +```php +use Guzzle\Log\ClosureLogAdapter; +use Guzzle\Log\MessageFormatter; +use Guzzle\Plugin\Log\LogPlugin; + +/** @var \Guzzle\Http\Client */ +$client; + +// $format is a string indicating desired message format -- @see MessageFormatter +$client->addSubscriber(new LogPlugin(new ClosureLogAdapter(function($m) { echo $m; }, $format = MessageFormatter::DEBUG_FORMAT); +``` + +### Guzzle\Http\Plugin\CurlAuthPlugin + +Now `Guzzle\Plugin\CurlAuth\CurlAuthPlugin`. + +### Guzzle\Http\Plugin\ExponentialBackoffPlugin + +Now `Guzzle\Plugin\Backoff\BackoffPlugin`, and other changes. + +**Before** + +```php +use Guzzle\Http\Plugin\ExponentialBackoffPlugin; + +$backoffPlugin = new ExponentialBackoffPlugin($maxRetries, array_merge( + ExponentialBackoffPlugin::getDefaultFailureCodes(), array(429) + )); + +$client->addSubscriber($backoffPlugin); +``` + +**After** + +```php +use Guzzle\Plugin\Backoff\BackoffPlugin; +use Guzzle\Plugin\Backoff\HttpBackoffStrategy; + +// Use convenient factory method instead -- see implementation for ideas of what +// you can do with chaining backoff strategies +$backoffPlugin = BackoffPlugin::getExponentialBackoff($maxRetries, array_merge( + HttpBackoffStrategy::getDefaultFailureCodes(), array(429) + )); +$client->addSubscriber($backoffPlugin); +``` + +### Known Issues + +#### [BUG] Accept-Encoding header behavior changed unintentionally. + +(See #217) (Fixed in 09daeb8c666fb44499a0646d655a8ae36456575e) + +In version 2.8 setting the `Accept-Encoding` header would set the CURLOPT_ENCODING option, which permitted cURL to +properly handle gzip/deflate compressed responses from the server. In versions affected by this bug this does not happen. +See issue #217 for a workaround, or use a version containing the fix. diff --git a/vendor/guzzlehttp/guzzle/composer.json b/vendor/guzzlehttp/guzzle/composer.json new file mode 100644 index 0000000..cbede14 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/composer.json @@ -0,0 +1,131 @@ +{ + "name": "guzzlehttp/guzzle", + "description": "Guzzle is a PHP HTTP client library", + "keywords": [ + "framework", + "http", + "rest", + "web service", + "curl", + "client", + "HTTP client", + "PSR-7", + "PSR-18" + ], + "license": "MIT", + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "repositories": [ + { + "type": "package", + "package": { + "name": "guzzle/client-integration-tests", + "version": "v3.0.2", + "dist": { + "url": "https://codeload.github.com/guzzle/client-integration-tests/zip/2c025848417c1135031fdf9c728ee53d0a7ceaee", + "type": "zip" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "phpunit/phpunit": "^7.5.20 || ^8.5.8 || ^9.3.11", + "php-http/message": "^1.0 || ^2.0", + "guzzlehttp/psr7": "^1.7 || ^2.0", + "th3n3rd/cartesian-product": "^0.3" + }, + "autoload": { + "psr-4": { + "Http\\Client\\Tests\\": "src/" + } + }, + "bin": [ + "bin/http_test_server" + ] + } + } + ], + "require": { + "php": "^7.2.5 || ^8.0", + "ext-json": "*", + "guzzlehttp/promises": "^1.5.3 || ^2.0.3", + "guzzlehttp/psr7": "^2.7.0", + "psr/http-client": "^1.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0" + }, + "provide": { + "psr/http-client-implementation": "1.0" + }, + "require-dev": { + "ext-curl": "*", + "bamarni/composer-bin-plugin": "^1.8.2", + "guzzle/client-integration-tests": "3.0.2", + "php-http/message-factory": "^1.1", + "phpunit/phpunit": "^8.5.39 || ^9.6.20", + "psr/log": "^1.1 || ^2.0 || ^3.0" + }, + "suggest": { + "ext-curl": "Required for CURL handler support", + "ext-intl": "Required for Internationalized Domain Name (IDN) support", + "psr/log": "Required for using the Log middleware" + }, + "config": { + "allow-plugins": { + "bamarni/composer-bin-plugin": true + }, + "preferred-install": "dist", + "sort-packages": true + }, + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "autoload-dev": { + "psr-4": { + "GuzzleHttp\\Tests\\": "tests/" + } + } +} diff --git a/vendor/guzzlehttp/guzzle/src/BodySummarizer.php b/vendor/guzzlehttp/guzzle/src/BodySummarizer.php new file mode 100644 index 0000000..761506d --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/BodySummarizer.php @@ -0,0 +1,28 @@ +truncateAt = $truncateAt; + } + + /** + * Returns a summarized message body. + */ + public function summarize(MessageInterface $message): ?string + { + return $this->truncateAt === null + ? Psr7\Message::bodySummary($message) + : Psr7\Message::bodySummary($message, $this->truncateAt); + } +} diff --git a/vendor/guzzlehttp/guzzle/src/BodySummarizerInterface.php b/vendor/guzzlehttp/guzzle/src/BodySummarizerInterface.php new file mode 100644 index 0000000..3e02e03 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/BodySummarizerInterface.php @@ -0,0 +1,13 @@ + 'http://www.foo.com/1.0/', + * 'timeout' => 0, + * 'allow_redirects' => false, + * 'proxy' => '192.168.16.1:10' + * ]); + * + * Client configuration settings include the following options: + * + * - handler: (callable) Function that transfers HTTP requests over the + * wire. The function is called with a Psr7\Http\Message\RequestInterface + * and array of transfer options, and must return a + * GuzzleHttp\Promise\PromiseInterface that is fulfilled with a + * Psr7\Http\Message\ResponseInterface on success. + * If no handler is provided, a default handler will be created + * that enables all of the request options below by attaching all of the + * default middleware to the handler. + * - base_uri: (string|UriInterface) Base URI of the client that is merged + * into relative URIs. Can be a string or instance of UriInterface. + * - **: any request option + * + * @param array $config Client configuration settings. + * + * @see RequestOptions for a list of available request options. + */ + public function __construct(array $config = []) + { + if (!isset($config['handler'])) { + $config['handler'] = HandlerStack::create(); + } elseif (!\is_callable($config['handler'])) { + throw new InvalidArgumentException('handler must be a callable'); + } + + // Convert the base_uri to a UriInterface + if (isset($config['base_uri'])) { + $config['base_uri'] = Psr7\Utils::uriFor($config['base_uri']); + } + + $this->configureDefaults($config); + } + + /** + * @param string $method + * @param array $args + * + * @return PromiseInterface|ResponseInterface + * + * @deprecated Client::__call will be removed in guzzlehttp/guzzle:8.0. + */ + public function __call($method, $args) + { + if (\count($args) < 1) { + throw new InvalidArgumentException('Magic request methods require a URI and optional options array'); + } + + $uri = $args[0]; + $opts = $args[1] ?? []; + + return \substr($method, -5) === 'Async' + ? $this->requestAsync(\substr($method, 0, -5), $uri, $opts) + : $this->request($method, $uri, $opts); + } + + /** + * Asynchronously send an HTTP request. + * + * @param array $options Request options to apply to the given + * request and to the transfer. See \GuzzleHttp\RequestOptions. + */ + public function sendAsync(RequestInterface $request, array $options = []): PromiseInterface + { + // Merge the base URI into the request URI if needed. + $options = $this->prepareDefaults($options); + + return $this->transfer( + $request->withUri($this->buildUri($request->getUri(), $options), $request->hasHeader('Host')), + $options + ); + } + + /** + * Send an HTTP request. + * + * @param array $options Request options to apply to the given + * request and to the transfer. See \GuzzleHttp\RequestOptions. + * + * @throws GuzzleException + */ + public function send(RequestInterface $request, array $options = []): ResponseInterface + { + $options[RequestOptions::SYNCHRONOUS] = true; + + return $this->sendAsync($request, $options)->wait(); + } + + /** + * The HttpClient PSR (PSR-18) specify this method. + * + * {@inheritDoc} + */ + public function sendRequest(RequestInterface $request): ResponseInterface + { + $options[RequestOptions::SYNCHRONOUS] = true; + $options[RequestOptions::ALLOW_REDIRECTS] = false; + $options[RequestOptions::HTTP_ERRORS] = false; + + return $this->sendAsync($request, $options)->wait(); + } + + /** + * Create and send an asynchronous HTTP request. + * + * Use an absolute path to override the base path of the client, or a + * relative path to append to the base path of the client. The URL can + * contain the query string as well. Use an array to provide a URL + * template and additional variables to use in the URL template expansion. + * + * @param string $method HTTP method + * @param string|UriInterface $uri URI object or string. + * @param array $options Request options to apply. See \GuzzleHttp\RequestOptions. + */ + public function requestAsync(string $method, $uri = '', array $options = []): PromiseInterface + { + $options = $this->prepareDefaults($options); + // Remove request modifying parameter because it can be done up-front. + $headers = $options['headers'] ?? []; + $body = $options['body'] ?? null; + $version = $options['version'] ?? '1.1'; + // Merge the URI into the base URI. + $uri = $this->buildUri(Psr7\Utils::uriFor($uri), $options); + if (\is_array($body)) { + throw $this->invalidBody(); + } + $request = new Psr7\Request($method, $uri, $headers, $body, $version); + // Remove the option so that they are not doubly-applied. + unset($options['headers'], $options['body'], $options['version']); + + return $this->transfer($request, $options); + } + + /** + * Create and send an HTTP request. + * + * Use an absolute path to override the base path of the client, or a + * relative path to append to the base path of the client. The URL can + * contain the query string as well. + * + * @param string $method HTTP method. + * @param string|UriInterface $uri URI object or string. + * @param array $options Request options to apply. See \GuzzleHttp\RequestOptions. + * + * @throws GuzzleException + */ + public function request(string $method, $uri = '', array $options = []): ResponseInterface + { + $options[RequestOptions::SYNCHRONOUS] = true; + + return $this->requestAsync($method, $uri, $options)->wait(); + } + + /** + * Get a client configuration option. + * + * These options include default request options of the client, a "handler" + * (if utilized by the concrete client), and a "base_uri" if utilized by + * the concrete client. + * + * @param string|null $option The config option to retrieve. + * + * @return mixed + * + * @deprecated Client::getConfig will be removed in guzzlehttp/guzzle:8.0. + */ + public function getConfig(?string $option = null) + { + return $option === null + ? $this->config + : ($this->config[$option] ?? null); + } + + private function buildUri(UriInterface $uri, array $config): UriInterface + { + if (isset($config['base_uri'])) { + $uri = Psr7\UriResolver::resolve(Psr7\Utils::uriFor($config['base_uri']), $uri); + } + + if (isset($config['idn_conversion']) && ($config['idn_conversion'] !== false)) { + $idnOptions = ($config['idn_conversion'] === true) ? \IDNA_DEFAULT : $config['idn_conversion']; + $uri = Utils::idnUriConvert($uri, $idnOptions); + } + + return $uri->getScheme() === '' && $uri->getHost() !== '' ? $uri->withScheme('http') : $uri; + } + + /** + * Configures the default options for a client. + */ + private function configureDefaults(array $config): void + { + $defaults = [ + 'allow_redirects' => RedirectMiddleware::$defaultSettings, + 'http_errors' => true, + 'decode_content' => true, + 'verify' => true, + 'cookies' => false, + 'idn_conversion' => false, + ]; + + // Use the standard Linux HTTP_PROXY and HTTPS_PROXY if set. + + // We can only trust the HTTP_PROXY environment variable in a CLI + // process due to the fact that PHP has no reliable mechanism to + // get environment variables that start with "HTTP_". + if (\PHP_SAPI === 'cli' && ($proxy = Utils::getenv('HTTP_PROXY'))) { + $defaults['proxy']['http'] = $proxy; + } + + if ($proxy = Utils::getenv('HTTPS_PROXY')) { + $defaults['proxy']['https'] = $proxy; + } + + if ($noProxy = Utils::getenv('NO_PROXY')) { + $cleanedNoProxy = \str_replace(' ', '', $noProxy); + $defaults['proxy']['no'] = \explode(',', $cleanedNoProxy); + } + + $this->config = $config + $defaults; + + if (!empty($config['cookies']) && $config['cookies'] === true) { + $this->config['cookies'] = new CookieJar(); + } + + // Add the default user-agent header. + if (!isset($this->config['headers'])) { + $this->config['headers'] = ['User-Agent' => Utils::defaultUserAgent()]; + } else { + // Add the User-Agent header if one was not already set. + foreach (\array_keys($this->config['headers']) as $name) { + if (\strtolower($name) === 'user-agent') { + return; + } + } + $this->config['headers']['User-Agent'] = Utils::defaultUserAgent(); + } + } + + /** + * Merges default options into the array. + * + * @param array $options Options to modify by reference + */ + private function prepareDefaults(array $options): array + { + $defaults = $this->config; + + if (!empty($defaults['headers'])) { + // Default headers are only added if they are not present. + $defaults['_conditional'] = $defaults['headers']; + unset($defaults['headers']); + } + + // Special handling for headers is required as they are added as + // conditional headers and as headers passed to a request ctor. + if (\array_key_exists('headers', $options)) { + // Allows default headers to be unset. + if ($options['headers'] === null) { + $defaults['_conditional'] = []; + unset($options['headers']); + } elseif (!\is_array($options['headers'])) { + throw new InvalidArgumentException('headers must be an array'); + } + } + + // Shallow merge defaults underneath options. + $result = $options + $defaults; + + // Remove null values. + foreach ($result as $k => $v) { + if ($v === null) { + unset($result[$k]); + } + } + + return $result; + } + + /** + * Transfers the given request and applies request options. + * + * The URI of the request is not modified and the request options are used + * as-is without merging in default options. + * + * @param array $options See \GuzzleHttp\RequestOptions. + */ + private function transfer(RequestInterface $request, array $options): PromiseInterface + { + $request = $this->applyOptions($request, $options); + /** @var HandlerStack $handler */ + $handler = $options['handler']; + + try { + return P\Create::promiseFor($handler($request, $options)); + } catch (\Exception $e) { + return P\Create::rejectionFor($e); + } + } + + /** + * Applies the array of request options to a request. + */ + private function applyOptions(RequestInterface $request, array &$options): RequestInterface + { + $modify = [ + 'set_headers' => [], + ]; + + if (isset($options['headers'])) { + if (array_keys($options['headers']) === range(0, count($options['headers']) - 1)) { + throw new InvalidArgumentException('The headers array must have header name as keys.'); + } + $modify['set_headers'] = $options['headers']; + unset($options['headers']); + } + + if (isset($options['form_params'])) { + if (isset($options['multipart'])) { + throw new InvalidArgumentException('You cannot use ' + .'form_params and multipart at the same time. Use the ' + .'form_params option if you want to send application/' + .'x-www-form-urlencoded requests, and the multipart ' + .'option to send multipart/form-data requests.'); + } + $options['body'] = \http_build_query($options['form_params'], '', '&'); + unset($options['form_params']); + // Ensure that we don't have the header in different case and set the new value. + $options['_conditional'] = Psr7\Utils::caselessRemove(['Content-Type'], $options['_conditional']); + $options['_conditional']['Content-Type'] = 'application/x-www-form-urlencoded'; + } + + if (isset($options['multipart'])) { + $options['body'] = new Psr7\MultipartStream($options['multipart']); + unset($options['multipart']); + } + + if (isset($options['json'])) { + $options['body'] = Utils::jsonEncode($options['json']); + unset($options['json']); + // Ensure that we don't have the header in different case and set the new value. + $options['_conditional'] = Psr7\Utils::caselessRemove(['Content-Type'], $options['_conditional']); + $options['_conditional']['Content-Type'] = 'application/json'; + } + + if (!empty($options['decode_content']) + && $options['decode_content'] !== true + ) { + // Ensure that we don't have the header in different case and set the new value. + $options['_conditional'] = Psr7\Utils::caselessRemove(['Accept-Encoding'], $options['_conditional']); + $modify['set_headers']['Accept-Encoding'] = $options['decode_content']; + } + + if (isset($options['body'])) { + if (\is_array($options['body'])) { + throw $this->invalidBody(); + } + $modify['body'] = Psr7\Utils::streamFor($options['body']); + unset($options['body']); + } + + if (!empty($options['auth']) && \is_array($options['auth'])) { + $value = $options['auth']; + $type = isset($value[2]) ? \strtolower($value[2]) : 'basic'; + switch ($type) { + case 'basic': + // Ensure that we don't have the header in different case and set the new value. + $modify['set_headers'] = Psr7\Utils::caselessRemove(['Authorization'], $modify['set_headers']); + $modify['set_headers']['Authorization'] = 'Basic ' + .\base64_encode("$value[0]:$value[1]"); + break; + case 'digest': + // @todo: Do not rely on curl + $options['curl'][\CURLOPT_HTTPAUTH] = \CURLAUTH_DIGEST; + $options['curl'][\CURLOPT_USERPWD] = "$value[0]:$value[1]"; + break; + case 'ntlm': + $options['curl'][\CURLOPT_HTTPAUTH] = \CURLAUTH_NTLM; + $options['curl'][\CURLOPT_USERPWD] = "$value[0]:$value[1]"; + break; + } + } + + if (isset($options['query'])) { + $value = $options['query']; + if (\is_array($value)) { + $value = \http_build_query($value, '', '&', \PHP_QUERY_RFC3986); + } + if (!\is_string($value)) { + throw new InvalidArgumentException('query must be a string or array'); + } + $modify['query'] = $value; + unset($options['query']); + } + + // Ensure that sink is not an invalid value. + if (isset($options['sink'])) { + // TODO: Add more sink validation? + if (\is_bool($options['sink'])) { + throw new InvalidArgumentException('sink must not be a boolean'); + } + } + + if (isset($options['version'])) { + $modify['version'] = $options['version']; + } + + $request = Psr7\Utils::modifyRequest($request, $modify); + if ($request->getBody() instanceof Psr7\MultipartStream) { + // Use a multipart/form-data POST if a Content-Type is not set. + // Ensure that we don't have the header in different case and set the new value. + $options['_conditional'] = Psr7\Utils::caselessRemove(['Content-Type'], $options['_conditional']); + $options['_conditional']['Content-Type'] = 'multipart/form-data; boundary=' + .$request->getBody()->getBoundary(); + } + + // Merge in conditional headers if they are not present. + if (isset($options['_conditional'])) { + // Build up the changes so it's in a single clone of the message. + $modify = []; + foreach ($options['_conditional'] as $k => $v) { + if (!$request->hasHeader($k)) { + $modify['set_headers'][$k] = $v; + } + } + $request = Psr7\Utils::modifyRequest($request, $modify); + // Don't pass this internal value along to middleware/handlers. + unset($options['_conditional']); + } + + return $request; + } + + /** + * Return an InvalidArgumentException with pre-set message. + */ + private function invalidBody(): InvalidArgumentException + { + return new InvalidArgumentException('Passing in the "body" request ' + .'option as an array to send a request is not supported. ' + .'Please use the "form_params" request option to send a ' + .'application/x-www-form-urlencoded request, or the "multipart" ' + .'request option to send a multipart/form-data request.'); + } +} diff --git a/vendor/guzzlehttp/guzzle/src/ClientInterface.php b/vendor/guzzlehttp/guzzle/src/ClientInterface.php new file mode 100644 index 0000000..6aaee61 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/ClientInterface.php @@ -0,0 +1,84 @@ +request('GET', $uri, $options); + } + + /** + * Create and send an HTTP HEAD request. + * + * Use an absolute path to override the base path of the client, or a + * relative path to append to the base path of the client. The URL can + * contain the query string as well. + * + * @param string|UriInterface $uri URI object or string. + * @param array $options Request options to apply. + * + * @throws GuzzleException + */ + public function head($uri, array $options = []): ResponseInterface + { + return $this->request('HEAD', $uri, $options); + } + + /** + * Create and send an HTTP PUT request. + * + * Use an absolute path to override the base path of the client, or a + * relative path to append to the base path of the client. The URL can + * contain the query string as well. + * + * @param string|UriInterface $uri URI object or string. + * @param array $options Request options to apply. + * + * @throws GuzzleException + */ + public function put($uri, array $options = []): ResponseInterface + { + return $this->request('PUT', $uri, $options); + } + + /** + * Create and send an HTTP POST request. + * + * Use an absolute path to override the base path of the client, or a + * relative path to append to the base path of the client. The URL can + * contain the query string as well. + * + * @param string|UriInterface $uri URI object or string. + * @param array $options Request options to apply. + * + * @throws GuzzleException + */ + public function post($uri, array $options = []): ResponseInterface + { + return $this->request('POST', $uri, $options); + } + + /** + * Create and send an HTTP PATCH request. + * + * Use an absolute path to override the base path of the client, or a + * relative path to append to the base path of the client. The URL can + * contain the query string as well. + * + * @param string|UriInterface $uri URI object or string. + * @param array $options Request options to apply. + * + * @throws GuzzleException + */ + public function patch($uri, array $options = []): ResponseInterface + { + return $this->request('PATCH', $uri, $options); + } + + /** + * Create and send an HTTP DELETE request. + * + * Use an absolute path to override the base path of the client, or a + * relative path to append to the base path of the client. The URL can + * contain the query string as well. + * + * @param string|UriInterface $uri URI object or string. + * @param array $options Request options to apply. + * + * @throws GuzzleException + */ + public function delete($uri, array $options = []): ResponseInterface + { + return $this->request('DELETE', $uri, $options); + } + + /** + * Create and send an asynchronous HTTP request. + * + * Use an absolute path to override the base path of the client, or a + * relative path to append to the base path of the client. The URL can + * contain the query string as well. Use an array to provide a URL + * template and additional variables to use in the URL template expansion. + * + * @param string $method HTTP method + * @param string|UriInterface $uri URI object or string. + * @param array $options Request options to apply. + */ + abstract public function requestAsync(string $method, $uri, array $options = []): PromiseInterface; + + /** + * Create and send an asynchronous HTTP GET request. + * + * Use an absolute path to override the base path of the client, or a + * relative path to append to the base path of the client. The URL can + * contain the query string as well. Use an array to provide a URL + * template and additional variables to use in the URL template expansion. + * + * @param string|UriInterface $uri URI object or string. + * @param array $options Request options to apply. + */ + public function getAsync($uri, array $options = []): PromiseInterface + { + return $this->requestAsync('GET', $uri, $options); + } + + /** + * Create and send an asynchronous HTTP HEAD request. + * + * Use an absolute path to override the base path of the client, or a + * relative path to append to the base path of the client. The URL can + * contain the query string as well. Use an array to provide a URL + * template and additional variables to use in the URL template expansion. + * + * @param string|UriInterface $uri URI object or string. + * @param array $options Request options to apply. + */ + public function headAsync($uri, array $options = []): PromiseInterface + { + return $this->requestAsync('HEAD', $uri, $options); + } + + /** + * Create and send an asynchronous HTTP PUT request. + * + * Use an absolute path to override the base path of the client, or a + * relative path to append to the base path of the client. The URL can + * contain the query string as well. Use an array to provide a URL + * template and additional variables to use in the URL template expansion. + * + * @param string|UriInterface $uri URI object or string. + * @param array $options Request options to apply. + */ + public function putAsync($uri, array $options = []): PromiseInterface + { + return $this->requestAsync('PUT', $uri, $options); + } + + /** + * Create and send an asynchronous HTTP POST request. + * + * Use an absolute path to override the base path of the client, or a + * relative path to append to the base path of the client. The URL can + * contain the query string as well. Use an array to provide a URL + * template and additional variables to use in the URL template expansion. + * + * @param string|UriInterface $uri URI object or string. + * @param array $options Request options to apply. + */ + public function postAsync($uri, array $options = []): PromiseInterface + { + return $this->requestAsync('POST', $uri, $options); + } + + /** + * Create and send an asynchronous HTTP PATCH request. + * + * Use an absolute path to override the base path of the client, or a + * relative path to append to the base path of the client. The URL can + * contain the query string as well. Use an array to provide a URL + * template and additional variables to use in the URL template expansion. + * + * @param string|UriInterface $uri URI object or string. + * @param array $options Request options to apply. + */ + public function patchAsync($uri, array $options = []): PromiseInterface + { + return $this->requestAsync('PATCH', $uri, $options); + } + + /** + * Create and send an asynchronous HTTP DELETE request. + * + * Use an absolute path to override the base path of the client, or a + * relative path to append to the base path of the client. The URL can + * contain the query string as well. Use an array to provide a URL + * template and additional variables to use in the URL template expansion. + * + * @param string|UriInterface $uri URI object or string. + * @param array $options Request options to apply. + */ + public function deleteAsync($uri, array $options = []): PromiseInterface + { + return $this->requestAsync('DELETE', $uri, $options); + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php b/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php new file mode 100644 index 0000000..b616cf2 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php @@ -0,0 +1,307 @@ +strictMode = $strictMode; + + foreach ($cookieArray as $cookie) { + if (!($cookie instanceof SetCookie)) { + $cookie = new SetCookie($cookie); + } + $this->setCookie($cookie); + } + } + + /** + * Create a new Cookie jar from an associative array and domain. + * + * @param array $cookies Cookies to create the jar from + * @param string $domain Domain to set the cookies to + */ + public static function fromArray(array $cookies, string $domain): self + { + $cookieJar = new self(); + foreach ($cookies as $name => $value) { + $cookieJar->setCookie(new SetCookie([ + 'Domain' => $domain, + 'Name' => $name, + 'Value' => $value, + 'Discard' => true, + ])); + } + + return $cookieJar; + } + + /** + * Evaluate if this cookie should be persisted to storage + * that survives between requests. + * + * @param SetCookie $cookie Being evaluated. + * @param bool $allowSessionCookies If we should persist session cookies + */ + public static function shouldPersist(SetCookie $cookie, bool $allowSessionCookies = false): bool + { + if ($cookie->getExpires() || $allowSessionCookies) { + if (!$cookie->getDiscard()) { + return true; + } + } + + return false; + } + + /** + * Finds and returns the cookie based on the name + * + * @param string $name cookie name to search for + * + * @return SetCookie|null cookie that was found or null if not found + */ + public function getCookieByName(string $name): ?SetCookie + { + foreach ($this->cookies as $cookie) { + if ($cookie->getName() !== null && \strcasecmp($cookie->getName(), $name) === 0) { + return $cookie; + } + } + + return null; + } + + public function toArray(): array + { + return \array_map(static function (SetCookie $cookie): array { + return $cookie->toArray(); + }, $this->getIterator()->getArrayCopy()); + } + + public function clear(?string $domain = null, ?string $path = null, ?string $name = null): void + { + if (!$domain) { + $this->cookies = []; + + return; + } elseif (!$path) { + $this->cookies = \array_filter( + $this->cookies, + static function (SetCookie $cookie) use ($domain): bool { + return !$cookie->matchesDomain($domain); + } + ); + } elseif (!$name) { + $this->cookies = \array_filter( + $this->cookies, + static function (SetCookie $cookie) use ($path, $domain): bool { + return !($cookie->matchesPath($path) + && $cookie->matchesDomain($domain)); + } + ); + } else { + $this->cookies = \array_filter( + $this->cookies, + static function (SetCookie $cookie) use ($path, $domain, $name) { + return !($cookie->getName() == $name + && $cookie->matchesPath($path) + && $cookie->matchesDomain($domain)); + } + ); + } + } + + public function clearSessionCookies(): void + { + $this->cookies = \array_filter( + $this->cookies, + static function (SetCookie $cookie): bool { + return !$cookie->getDiscard() && $cookie->getExpires(); + } + ); + } + + public function setCookie(SetCookie $cookie): bool + { + // If the name string is empty (but not 0), ignore the set-cookie + // string entirely. + $name = $cookie->getName(); + if (!$name && $name !== '0') { + return false; + } + + // Only allow cookies with set and valid domain, name, value + $result = $cookie->validate(); + if ($result !== true) { + if ($this->strictMode) { + throw new \RuntimeException('Invalid cookie: '.$result); + } + $this->removeCookieIfEmpty($cookie); + + return false; + } + + // Resolve conflicts with previously set cookies + foreach ($this->cookies as $i => $c) { + // Two cookies are identical, when their path, and domain are + // identical. + if ($c->getPath() != $cookie->getPath() + || $c->getDomain() != $cookie->getDomain() + || $c->getName() != $cookie->getName() + ) { + continue; + } + + // The previously set cookie is a discard cookie and this one is + // not so allow the new cookie to be set + if (!$cookie->getDiscard() && $c->getDiscard()) { + unset($this->cookies[$i]); + continue; + } + + // If the new cookie's expiration is further into the future, then + // replace the old cookie + if ($cookie->getExpires() > $c->getExpires()) { + unset($this->cookies[$i]); + continue; + } + + // If the value has changed, we better change it + if ($cookie->getValue() !== $c->getValue()) { + unset($this->cookies[$i]); + continue; + } + + // The cookie exists, so no need to continue + return false; + } + + $this->cookies[] = $cookie; + + return true; + } + + public function count(): int + { + return \count($this->cookies); + } + + /** + * @return \ArrayIterator + */ + public function getIterator(): \ArrayIterator + { + return new \ArrayIterator(\array_values($this->cookies)); + } + + public function extractCookies(RequestInterface $request, ResponseInterface $response): void + { + if ($cookieHeader = $response->getHeader('Set-Cookie')) { + foreach ($cookieHeader as $cookie) { + $sc = SetCookie::fromString($cookie); + if (!$sc->getDomain()) { + $sc->setDomain($request->getUri()->getHost()); + } + if (0 !== \strpos($sc->getPath(), '/')) { + $sc->setPath($this->getCookiePathFromRequest($request)); + } + if (!$sc->matchesDomain($request->getUri()->getHost())) { + continue; + } + // Note: At this point `$sc->getDomain()` being a public suffix should + // be rejected, but we don't want to pull in the full PSL dependency. + $this->setCookie($sc); + } + } + } + + /** + * Computes cookie path following RFC 6265 section 5.1.4 + * + * @see https://datatracker.ietf.org/doc/html/rfc6265#section-5.1.4 + */ + private function getCookiePathFromRequest(RequestInterface $request): string + { + $uriPath = $request->getUri()->getPath(); + if ('' === $uriPath) { + return '/'; + } + if (0 !== \strpos($uriPath, '/')) { + return '/'; + } + if ('/' === $uriPath) { + return '/'; + } + $lastSlashPos = \strrpos($uriPath, '/'); + if (0 === $lastSlashPos || false === $lastSlashPos) { + return '/'; + } + + return \substr($uriPath, 0, $lastSlashPos); + } + + public function withCookieHeader(RequestInterface $request): RequestInterface + { + $values = []; + $uri = $request->getUri(); + $scheme = $uri->getScheme(); + $host = $uri->getHost(); + $path = $uri->getPath() ?: '/'; + + foreach ($this->cookies as $cookie) { + if ($cookie->matchesPath($path) + && $cookie->matchesDomain($host) + && !$cookie->isExpired() + && (!$cookie->getSecure() || $scheme === 'https') + ) { + $values[] = $cookie->getName().'=' + .$cookie->getValue(); + } + } + + return $values + ? $request->withHeader('Cookie', \implode('; ', $values)) + : $request; + } + + /** + * If a cookie already exists and the server asks to set it again with a + * null value, the cookie must be deleted. + */ + private function removeCookieIfEmpty(SetCookie $cookie): void + { + $cookieValue = $cookie->getValue(); + if ($cookieValue === null || $cookieValue === '') { + $this->clear( + $cookie->getDomain(), + $cookie->getPath(), + $cookie->getName() + ); + } + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php b/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php new file mode 100644 index 0000000..93ada58 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php @@ -0,0 +1,80 @@ + + */ +interface CookieJarInterface extends \Countable, \IteratorAggregate +{ + /** + * Create a request with added cookie headers. + * + * If no matching cookies are found in the cookie jar, then no Cookie + * header is added to the request and the same request is returned. + * + * @param RequestInterface $request Request object to modify. + * + * @return RequestInterface returns the modified request. + */ + public function withCookieHeader(RequestInterface $request): RequestInterface; + + /** + * Extract cookies from an HTTP response and store them in the CookieJar. + * + * @param RequestInterface $request Request that was sent + * @param ResponseInterface $response Response that was received + */ + public function extractCookies(RequestInterface $request, ResponseInterface $response): void; + + /** + * Sets a cookie in the cookie jar. + * + * @param SetCookie $cookie Cookie to set. + * + * @return bool Returns true on success or false on failure + */ + public function setCookie(SetCookie $cookie): bool; + + /** + * Remove cookies currently held in the cookie jar. + * + * Invoking this method without arguments will empty the whole cookie jar. + * If given a $domain argument only cookies belonging to that domain will + * be removed. If given a $domain and $path argument, cookies belonging to + * the specified path within that domain are removed. If given all three + * arguments, then the cookie with the specified name, path and domain is + * removed. + * + * @param string|null $domain Clears cookies matching a domain + * @param string|null $path Clears cookies matching a domain and path + * @param string|null $name Clears cookies matching a domain, path, and name + */ + public function clear(?string $domain = null, ?string $path = null, ?string $name = null): void; + + /** + * Discard all sessions cookies. + * + * Removes cookies that don't have an expire field or a have a discard + * field set to true. To be called when the user agent shuts down according + * to RFC 2965. + */ + public function clearSessionCookies(): void; + + /** + * Converts the cookie jar to an array. + */ + public function toArray(): array; +} diff --git a/vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php b/vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php new file mode 100644 index 0000000..290236d --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php @@ -0,0 +1,101 @@ +filename = $cookieFile; + $this->storeSessionCookies = $storeSessionCookies; + + if (\file_exists($cookieFile)) { + $this->load($cookieFile); + } + } + + /** + * Saves the file when shutting down + */ + public function __destruct() + { + $this->save($this->filename); + } + + /** + * Saves the cookies to a file. + * + * @param string $filename File to save + * + * @throws \RuntimeException if the file cannot be found or created + */ + public function save(string $filename): void + { + $json = []; + /** @var SetCookie $cookie */ + foreach ($this as $cookie) { + if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) { + $json[] = $cookie->toArray(); + } + } + + $jsonStr = Utils::jsonEncode($json); + if (false === \file_put_contents($filename, $jsonStr, \LOCK_EX)) { + throw new \RuntimeException("Unable to save file {$filename}"); + } + } + + /** + * Load cookies from a JSON formatted file. + * + * Old cookies are kept unless overwritten by newly loaded ones. + * + * @param string $filename Cookie file to load. + * + * @throws \RuntimeException if the file cannot be loaded. + */ + public function load(string $filename): void + { + $json = \file_get_contents($filename); + if (false === $json) { + throw new \RuntimeException("Unable to load file {$filename}"); + } + if ($json === '') { + return; + } + + $data = Utils::jsonDecode($json, true); + if (\is_array($data)) { + foreach ($data as $cookie) { + $this->setCookie(new SetCookie($cookie)); + } + } elseif (\is_scalar($data) && !empty($data)) { + throw new \RuntimeException("Invalid cookie file: {$filename}"); + } + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php b/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php new file mode 100644 index 0000000..cb3e67c --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php @@ -0,0 +1,77 @@ +sessionKey = $sessionKey; + $this->storeSessionCookies = $storeSessionCookies; + $this->load(); + } + + /** + * Saves cookies to session when shutting down + */ + public function __destruct() + { + $this->save(); + } + + /** + * Save cookies to the client session + */ + public function save(): void + { + $json = []; + /** @var SetCookie $cookie */ + foreach ($this as $cookie) { + if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) { + $json[] = $cookie->toArray(); + } + } + + $_SESSION[$this->sessionKey] = \json_encode($json); + } + + /** + * Load the contents of the client session into the data array + */ + protected function load(): void + { + if (!isset($_SESSION[$this->sessionKey])) { + return; + } + $data = \json_decode($_SESSION[$this->sessionKey], true); + if (\is_array($data)) { + foreach ($data as $cookie) { + $this->setCookie(new SetCookie($cookie)); + } + } elseif (\strlen($data)) { + throw new \RuntimeException('Invalid cookie data'); + } + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php b/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php new file mode 100644 index 0000000..c9806da --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php @@ -0,0 +1,488 @@ + null, + 'Value' => null, + 'Domain' => null, + 'Path' => '/', + 'Max-Age' => null, + 'Expires' => null, + 'Secure' => false, + 'Discard' => false, + 'HttpOnly' => false, + ]; + + /** + * @var array Cookie data + */ + private $data; + + /** + * Create a new SetCookie object from a string. + * + * @param string $cookie Set-Cookie header string + */ + public static function fromString(string $cookie): self + { + // Create the default return array + $data = self::$defaults; + // Explode the cookie string using a series of semicolons + $pieces = \array_filter(\array_map('trim', \explode(';', $cookie))); + // The name of the cookie (first kvp) must exist and include an equal sign. + if (!isset($pieces[0]) || \strpos($pieces[0], '=') === false) { + return new self($data); + } + + // Add the cookie pieces into the parsed data array + foreach ($pieces as $part) { + $cookieParts = \explode('=', $part, 2); + $key = \trim($cookieParts[0]); + $value = isset($cookieParts[1]) + ? \trim($cookieParts[1], " \n\r\t\0\x0B") + : true; + + // Only check for non-cookies when cookies have been found + if (!isset($data['Name'])) { + $data['Name'] = $key; + $data['Value'] = $value; + } else { + foreach (\array_keys(self::$defaults) as $search) { + if (!\strcasecmp($search, $key)) { + if ($search === 'Max-Age') { + if (is_numeric($value)) { + $data[$search] = (int) $value; + } + } else { + $data[$search] = $value; + } + continue 2; + } + } + $data[$key] = $value; + } + } + + return new self($data); + } + + /** + * @param array $data Array of cookie data provided by a Cookie parser + */ + public function __construct(array $data = []) + { + $this->data = self::$defaults; + + if (isset($data['Name'])) { + $this->setName($data['Name']); + } + + if (isset($data['Value'])) { + $this->setValue($data['Value']); + } + + if (isset($data['Domain'])) { + $this->setDomain($data['Domain']); + } + + if (isset($data['Path'])) { + $this->setPath($data['Path']); + } + + if (isset($data['Max-Age'])) { + $this->setMaxAge($data['Max-Age']); + } + + if (isset($data['Expires'])) { + $this->setExpires($data['Expires']); + } + + if (isset($data['Secure'])) { + $this->setSecure($data['Secure']); + } + + if (isset($data['Discard'])) { + $this->setDiscard($data['Discard']); + } + + if (isset($data['HttpOnly'])) { + $this->setHttpOnly($data['HttpOnly']); + } + + // Set the remaining values that don't have extra validation logic + foreach (array_diff(array_keys($data), array_keys(self::$defaults)) as $key) { + $this->data[$key] = $data[$key]; + } + + // Extract the Expires value and turn it into a UNIX timestamp if needed + if (!$this->getExpires() && $this->getMaxAge()) { + // Calculate the Expires date + $this->setExpires(\time() + $this->getMaxAge()); + } elseif (null !== ($expires = $this->getExpires()) && !\is_numeric($expires)) { + $this->setExpires($expires); + } + } + + public function __toString() + { + $str = $this->data['Name'].'='.($this->data['Value'] ?? '').'; '; + foreach ($this->data as $k => $v) { + if ($k !== 'Name' && $k !== 'Value' && $v !== null && $v !== false) { + if ($k === 'Expires') { + $str .= 'Expires='.\gmdate('D, d M Y H:i:s \G\M\T', $v).'; '; + } else { + $str .= ($v === true ? $k : "{$k}={$v}").'; '; + } + } + } + + return \rtrim($str, '; '); + } + + public function toArray(): array + { + return $this->data; + } + + /** + * Get the cookie name. + * + * @return string + */ + public function getName() + { + return $this->data['Name']; + } + + /** + * Set the cookie name. + * + * @param string $name Cookie name + */ + public function setName($name): void + { + if (!is_string($name)) { + trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a string to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); + } + + $this->data['Name'] = (string) $name; + } + + /** + * Get the cookie value. + * + * @return string|null + */ + public function getValue() + { + return $this->data['Value']; + } + + /** + * Set the cookie value. + * + * @param string $value Cookie value + */ + public function setValue($value): void + { + if (!is_string($value)) { + trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a string to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); + } + + $this->data['Value'] = (string) $value; + } + + /** + * Get the domain. + * + * @return string|null + */ + public function getDomain() + { + return $this->data['Domain']; + } + + /** + * Set the domain of the cookie. + * + * @param string|null $domain + */ + public function setDomain($domain): void + { + if (!is_string($domain) && null !== $domain) { + trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a string or null to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); + } + + $this->data['Domain'] = null === $domain ? null : (string) $domain; + } + + /** + * Get the path. + * + * @return string + */ + public function getPath() + { + return $this->data['Path']; + } + + /** + * Set the path of the cookie. + * + * @param string $path Path of the cookie + */ + public function setPath($path): void + { + if (!is_string($path)) { + trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a string to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); + } + + $this->data['Path'] = (string) $path; + } + + /** + * Maximum lifetime of the cookie in seconds. + * + * @return int|null + */ + public function getMaxAge() + { + return null === $this->data['Max-Age'] ? null : (int) $this->data['Max-Age']; + } + + /** + * Set the max-age of the cookie. + * + * @param int|null $maxAge Max age of the cookie in seconds + */ + public function setMaxAge($maxAge): void + { + if (!is_int($maxAge) && null !== $maxAge) { + trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing an int or null to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); + } + + $this->data['Max-Age'] = $maxAge === null ? null : (int) $maxAge; + } + + /** + * The UNIX timestamp when the cookie Expires. + * + * @return string|int|null + */ + public function getExpires() + { + return $this->data['Expires']; + } + + /** + * Set the unix timestamp for which the cookie will expire. + * + * @param int|string|null $timestamp Unix timestamp or any English textual datetime description. + */ + public function setExpires($timestamp): void + { + if (!is_int($timestamp) && !is_string($timestamp) && null !== $timestamp) { + trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing an int, string or null to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); + } + + $this->data['Expires'] = null === $timestamp ? null : (\is_numeric($timestamp) ? (int) $timestamp : \strtotime((string) $timestamp)); + } + + /** + * Get whether or not this is a secure cookie. + * + * @return bool + */ + public function getSecure() + { + return $this->data['Secure']; + } + + /** + * Set whether or not the cookie is secure. + * + * @param bool $secure Set to true or false if secure + */ + public function setSecure($secure): void + { + if (!is_bool($secure)) { + trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a bool to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); + } + + $this->data['Secure'] = (bool) $secure; + } + + /** + * Get whether or not this is a session cookie. + * + * @return bool|null + */ + public function getDiscard() + { + return $this->data['Discard']; + } + + /** + * Set whether or not this is a session cookie. + * + * @param bool $discard Set to true or false if this is a session cookie + */ + public function setDiscard($discard): void + { + if (!is_bool($discard)) { + trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a bool to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); + } + + $this->data['Discard'] = (bool) $discard; + } + + /** + * Get whether or not this is an HTTP only cookie. + * + * @return bool + */ + public function getHttpOnly() + { + return $this->data['HttpOnly']; + } + + /** + * Set whether or not this is an HTTP only cookie. + * + * @param bool $httpOnly Set to true or false if this is HTTP only + */ + public function setHttpOnly($httpOnly): void + { + if (!is_bool($httpOnly)) { + trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a bool to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); + } + + $this->data['HttpOnly'] = (bool) $httpOnly; + } + + /** + * Check if the cookie matches a path value. + * + * A request-path path-matches a given cookie-path if at least one of + * the following conditions holds: + * + * - The cookie-path and the request-path are identical. + * - The cookie-path is a prefix of the request-path, and the last + * character of the cookie-path is %x2F ("/"). + * - The cookie-path is a prefix of the request-path, and the first + * character of the request-path that is not included in the cookie- + * path is a %x2F ("/") character. + * + * @param string $requestPath Path to check against + */ + public function matchesPath(string $requestPath): bool + { + $cookiePath = $this->getPath(); + + // Match on exact matches or when path is the default empty "/" + if ($cookiePath === '/' || $cookiePath == $requestPath) { + return true; + } + + // Ensure that the cookie-path is a prefix of the request path. + if (0 !== \strpos($requestPath, $cookiePath)) { + return false; + } + + // Match if the last character of the cookie-path is "/" + if (\substr($cookiePath, -1, 1) === '/') { + return true; + } + + // Match if the first character not included in cookie path is "/" + return \substr($requestPath, \strlen($cookiePath), 1) === '/'; + } + + /** + * Check if the cookie matches a domain value. + * + * @param string $domain Domain to check against + */ + public function matchesDomain(string $domain): bool + { + $cookieDomain = $this->getDomain(); + if (null === $cookieDomain) { + return true; + } + + // Remove the leading '.' as per spec in RFC 6265. + // https://datatracker.ietf.org/doc/html/rfc6265#section-5.2.3 + $cookieDomain = \ltrim(\strtolower($cookieDomain), '.'); + + $domain = \strtolower($domain); + + // Domain not set or exact match. + if ('' === $cookieDomain || $domain === $cookieDomain) { + return true; + } + + // Matching the subdomain according to RFC 6265. + // https://datatracker.ietf.org/doc/html/rfc6265#section-5.1.3 + if (\filter_var($domain, \FILTER_VALIDATE_IP)) { + return false; + } + + return (bool) \preg_match('/\.'.\preg_quote($cookieDomain, '/').'$/', $domain); + } + + /** + * Check if the cookie is expired. + */ + public function isExpired(): bool + { + return $this->getExpires() !== null && \time() > $this->getExpires(); + } + + /** + * Check if the cookie is valid according to RFC 6265. + * + * @return bool|string Returns true if valid or an error message if invalid + */ + public function validate() + { + $name = $this->getName(); + if ($name === '') { + return 'The cookie name must not be empty'; + } + + // Check if any of the invalid characters are present in the cookie name + if (\preg_match( + '/[\x00-\x20\x22\x28-\x29\x2c\x2f\x3a-\x40\x5c\x7b\x7d\x7f]/', + $name + )) { + return 'Cookie name must not contain invalid characters: ASCII ' + .'Control characters (0-31;127), space, tab and the ' + .'following characters: ()<>@,;:\"/?={}'; + } + + // Value must not be null. 0 and empty string are valid. Empty strings + // are technically against RFC 6265, but known to happen in the wild. + $value = $this->getValue(); + if ($value === null) { + return 'The cookie value must not be empty'; + } + + // Domains must not be empty, but can be 0. "0" is not a valid internet + // domain, but may be used as server name in a private network. + $domain = $this->getDomain(); + if ($domain === null || $domain === '') { + return 'The cookie domain must not be empty'; + } + + return true; + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php b/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php new file mode 100644 index 0000000..ba67ad4 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php @@ -0,0 +1,39 @@ +request = $request; + $this->handlerContext = $handlerContext; + } + + /** + * Get the request that caused the exception + */ + public function getRequest(): RequestInterface + { + return $this->request; + } + + /** + * Get contextual information about the error from the underlying handler. + * + * The contents of this array will vary depending on which handler you are + * using. It may also be just an empty array. Relying on this data will + * couple you to a specific handler, but can give more debug information + * when needed. + */ + public function getHandlerContext(): array + { + return $this->handlerContext; + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Exception/GuzzleException.php b/vendor/guzzlehttp/guzzle/src/Exception/GuzzleException.php new file mode 100644 index 0000000..fa3ed69 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Exception/GuzzleException.php @@ -0,0 +1,9 @@ +getStatusCode() : 0; + parent::__construct($message, $code, $previous); + $this->request = $request; + $this->response = $response; + $this->handlerContext = $handlerContext; + } + + /** + * Wrap non-RequestExceptions with a RequestException + */ + public static function wrapException(RequestInterface $request, \Throwable $e): RequestException + { + return $e instanceof RequestException ? $e : new RequestException($e->getMessage(), $request, null, $e); + } + + /** + * Factory method to create a new exception with a normalized error message + * + * @param RequestInterface $request Request sent + * @param ResponseInterface $response Response received + * @param \Throwable|null $previous Previous exception + * @param array $handlerContext Optional handler context + * @param BodySummarizerInterface|null $bodySummarizer Optional body summarizer + */ + public static function create( + RequestInterface $request, + ?ResponseInterface $response = null, + ?\Throwable $previous = null, + array $handlerContext = [], + ?BodySummarizerInterface $bodySummarizer = null + ): self { + if (!$response) { + return new self( + 'Error completing request', + $request, + null, + $previous, + $handlerContext + ); + } + + $level = (int) \floor($response->getStatusCode() / 100); + if ($level === 4) { + $label = 'Client error'; + $className = ClientException::class; + } elseif ($level === 5) { + $label = 'Server error'; + $className = ServerException::class; + } else { + $label = 'Unsuccessful request'; + $className = __CLASS__; + } + + $uri = \GuzzleHttp\Psr7\Utils::redactUserInfo($request->getUri()); + + // Client Error: `GET /` resulted in a `404 Not Found` response: + // ... (truncated) + $message = \sprintf( + '%s: `%s %s` resulted in a `%s %s` response', + $label, + $request->getMethod(), + $uri->__toString(), + $response->getStatusCode(), + $response->getReasonPhrase() + ); + + $summary = ($bodySummarizer ?? new BodySummarizer())->summarize($response); + + if ($summary !== null) { + $message .= ":\n{$summary}\n"; + } + + return new $className($message, $request, $response, $previous, $handlerContext); + } + + /** + * Get the request that caused the exception + */ + public function getRequest(): RequestInterface + { + return $this->request; + } + + /** + * Get the associated response + */ + public function getResponse(): ?ResponseInterface + { + return $this->response; + } + + /** + * Check if a response was received + */ + public function hasResponse(): bool + { + return $this->response !== null; + } + + /** + * Get contextual information about the error from the underlying handler. + * + * The contents of this array will vary depending on which handler you are + * using. It may also be just an empty array. Relying on this data will + * couple you to a specific handler, but can give more debug information + * when needed. + */ + public function getHandlerContext(): array + { + return $this->handlerContext; + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php b/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php new file mode 100644 index 0000000..8055e06 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php @@ -0,0 +1,10 @@ +maxHandles = $maxHandles; + } + + public function create(RequestInterface $request, array $options): EasyHandle + { + $protocolVersion = $request->getProtocolVersion(); + + if ('2' === $protocolVersion || '2.0' === $protocolVersion) { + if (!self::supportsHttp2()) { + throw new ConnectException('HTTP/2 is supported by the cURL handler, however libcurl is built without HTTP/2 support.', $request); + } + } elseif ('1.0' !== $protocolVersion && '1.1' !== $protocolVersion) { + throw new ConnectException(sprintf('HTTP/%s is not supported by the cURL handler.', $protocolVersion), $request); + } + + if (isset($options['curl']['body_as_string'])) { + $options['_body_as_string'] = $options['curl']['body_as_string']; + unset($options['curl']['body_as_string']); + } + + $easy = new EasyHandle(); + $easy->request = $request; + $easy->options = $options; + $conf = $this->getDefaultConf($easy); + $this->applyMethod($easy, $conf); + $this->applyHandlerOptions($easy, $conf); + $this->applyHeaders($easy, $conf); + unset($conf['_headers']); + + // Add handler options from the request configuration options + if (isset($options['curl'])) { + $conf = \array_replace($conf, $options['curl']); + } + + $conf[\CURLOPT_HEADERFUNCTION] = $this->createHeaderFn($easy); + $easy->handle = $this->handles ? \array_pop($this->handles) : \curl_init(); + curl_setopt_array($easy->handle, $conf); + + return $easy; + } + + private static function supportsHttp2(): bool + { + static $supportsHttp2 = null; + + if (null === $supportsHttp2) { + $supportsHttp2 = self::supportsTls12() + && defined('CURL_VERSION_HTTP2') + && (\CURL_VERSION_HTTP2 & \curl_version()['features']); + } + + return $supportsHttp2; + } + + private static function supportsTls12(): bool + { + static $supportsTls12 = null; + + if (null === $supportsTls12) { + $supportsTls12 = \CURL_SSLVERSION_TLSv1_2 & \curl_version()['features']; + } + + return $supportsTls12; + } + + private static function supportsTls13(): bool + { + static $supportsTls13 = null; + + if (null === $supportsTls13) { + $supportsTls13 = defined('CURL_SSLVERSION_TLSv1_3') + && (\CURL_SSLVERSION_TLSv1_3 & \curl_version()['features']); + } + + return $supportsTls13; + } + + public function release(EasyHandle $easy): void + { + $resource = $easy->handle; + unset($easy->handle); + + if (\count($this->handles) >= $this->maxHandles) { + \curl_close($resource); + } else { + // Remove all callback functions as they can hold onto references + // and are not cleaned up by curl_reset. Using curl_setopt_array + // does not work for some reason, so removing each one + // individually. + \curl_setopt($resource, \CURLOPT_HEADERFUNCTION, null); + \curl_setopt($resource, \CURLOPT_READFUNCTION, null); + \curl_setopt($resource, \CURLOPT_WRITEFUNCTION, null); + \curl_setopt($resource, \CURLOPT_PROGRESSFUNCTION, null); + \curl_reset($resource); + $this->handles[] = $resource; + } + } + + /** + * Completes a cURL transaction, either returning a response promise or a + * rejected promise. + * + * @param callable(RequestInterface, array): PromiseInterface $handler + * @param CurlFactoryInterface $factory Dictates how the handle is released + */ + public static function finish(callable $handler, EasyHandle $easy, CurlFactoryInterface $factory): PromiseInterface + { + if (isset($easy->options['on_stats'])) { + self::invokeStats($easy); + } + + if (!$easy->response || $easy->errno) { + return self::finishError($handler, $easy, $factory); + } + + // Return the response if it is present and there is no error. + $factory->release($easy); + + // Rewind the body of the response if possible. + $body = $easy->response->getBody(); + if ($body->isSeekable()) { + $body->rewind(); + } + + return new FulfilledPromise($easy->response); + } + + private static function invokeStats(EasyHandle $easy): void + { + $curlStats = \curl_getinfo($easy->handle); + $curlStats['appconnect_time'] = \curl_getinfo($easy->handle, \CURLINFO_APPCONNECT_TIME); + $stats = new TransferStats( + $easy->request, + $easy->response, + $curlStats['total_time'], + $easy->errno, + $curlStats + ); + ($easy->options['on_stats'])($stats); + } + + /** + * @param callable(RequestInterface, array): PromiseInterface $handler + */ + private static function finishError(callable $handler, EasyHandle $easy, CurlFactoryInterface $factory): PromiseInterface + { + // Get error information and release the handle to the factory. + $ctx = [ + 'errno' => $easy->errno, + 'error' => \curl_error($easy->handle), + 'appconnect_time' => \curl_getinfo($easy->handle, \CURLINFO_APPCONNECT_TIME), + ] + \curl_getinfo($easy->handle); + $ctx[self::CURL_VERSION_STR] = self::getCurlVersion(); + $factory->release($easy); + + // Retry when nothing is present or when curl failed to rewind. + if (empty($easy->options['_err_message']) && (!$easy->errno || $easy->errno == 65)) { + return self::retryFailedRewind($handler, $easy, $ctx); + } + + return self::createRejection($easy, $ctx); + } + + private static function getCurlVersion(): string + { + static $curlVersion = null; + + if (null === $curlVersion) { + $curlVersion = \curl_version()['version']; + } + + return $curlVersion; + } + + private static function createRejection(EasyHandle $easy, array $ctx): PromiseInterface + { + static $connectionErrors = [ + \CURLE_OPERATION_TIMEOUTED => true, + \CURLE_COULDNT_RESOLVE_HOST => true, + \CURLE_COULDNT_CONNECT => true, + \CURLE_SSL_CONNECT_ERROR => true, + \CURLE_GOT_NOTHING => true, + ]; + + if ($easy->createResponseException) { + return P\Create::rejectionFor( + new RequestException( + 'An error was encountered while creating the response', + $easy->request, + $easy->response, + $easy->createResponseException, + $ctx + ) + ); + } + + // If an exception was encountered during the onHeaders event, then + // return a rejected promise that wraps that exception. + if ($easy->onHeadersException) { + return P\Create::rejectionFor( + new RequestException( + 'An error was encountered during the on_headers event', + $easy->request, + $easy->response, + $easy->onHeadersException, + $ctx + ) + ); + } + + $uri = $easy->request->getUri(); + + $sanitizedError = self::sanitizeCurlError($ctx['error'] ?? '', $uri); + + $message = \sprintf( + 'cURL error %s: %s (%s)', + $ctx['errno'], + $sanitizedError, + 'see https://curl.haxx.se/libcurl/c/libcurl-errors.html' + ); + + if ('' !== $sanitizedError) { + $redactedUriString = \GuzzleHttp\Psr7\Utils::redactUserInfo($uri)->__toString(); + if ($redactedUriString !== '' && false === \strpos($sanitizedError, $redactedUriString)) { + $message .= \sprintf(' for %s', $redactedUriString); + } + } + + // Create a connection exception if it was a specific error code. + $error = isset($connectionErrors[$easy->errno]) + ? new ConnectException($message, $easy->request, null, $ctx) + : new RequestException($message, $easy->request, $easy->response, null, $ctx); + + return P\Create::rejectionFor($error); + } + + private static function sanitizeCurlError(string $error, UriInterface $uri): string + { + if ('' === $error) { + return $error; + } + + $baseUri = $uri->withQuery('')->withFragment(''); + $baseUriString = $baseUri->__toString(); + + if ('' === $baseUriString) { + return $error; + } + + $redactedUriString = \GuzzleHttp\Psr7\Utils::redactUserInfo($baseUri)->__toString(); + + return str_replace($baseUriString, $redactedUriString, $error); + } + + /** + * @return array + */ + private function getDefaultConf(EasyHandle $easy): array + { + $conf = [ + '_headers' => $easy->request->getHeaders(), + \CURLOPT_CUSTOMREQUEST => $easy->request->getMethod(), + \CURLOPT_URL => (string) $easy->request->getUri()->withFragment(''), + \CURLOPT_RETURNTRANSFER => false, + \CURLOPT_HEADER => false, + \CURLOPT_CONNECTTIMEOUT => 300, + ]; + + if (\defined('CURLOPT_PROTOCOLS')) { + $conf[\CURLOPT_PROTOCOLS] = \CURLPROTO_HTTP | \CURLPROTO_HTTPS; + } + + $version = $easy->request->getProtocolVersion(); + + if ('2' === $version || '2.0' === $version) { + $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_2_0; + } elseif ('1.1' === $version) { + $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_1_1; + } else { + $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_1_0; + } + + return $conf; + } + + private function applyMethod(EasyHandle $easy, array &$conf): void + { + $body = $easy->request->getBody(); + $size = $body->getSize(); + + if ($size === null || $size > 0) { + $this->applyBody($easy->request, $easy->options, $conf); + + return; + } + + $method = $easy->request->getMethod(); + if ($method === 'PUT' || $method === 'POST') { + // See https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.2 + if (!$easy->request->hasHeader('Content-Length')) { + $conf[\CURLOPT_HTTPHEADER][] = 'Content-Length: 0'; + } + } elseif ($method === 'HEAD') { + $conf[\CURLOPT_NOBODY] = true; + unset( + $conf[\CURLOPT_WRITEFUNCTION], + $conf[\CURLOPT_READFUNCTION], + $conf[\CURLOPT_FILE], + $conf[\CURLOPT_INFILE] + ); + } + } + + private function applyBody(RequestInterface $request, array $options, array &$conf): void + { + $size = $request->hasHeader('Content-Length') + ? (int) $request->getHeaderLine('Content-Length') + : null; + + // Send the body as a string if the size is less than 1MB OR if the + // [curl][body_as_string] request value is set. + if (($size !== null && $size < 1000000) || !empty($options['_body_as_string'])) { + $conf[\CURLOPT_POSTFIELDS] = (string) $request->getBody(); + // Don't duplicate the Content-Length header + $this->removeHeader('Content-Length', $conf); + $this->removeHeader('Transfer-Encoding', $conf); + } else { + $conf[\CURLOPT_UPLOAD] = true; + if ($size !== null) { + $conf[\CURLOPT_INFILESIZE] = $size; + $this->removeHeader('Content-Length', $conf); + } + $body = $request->getBody(); + if ($body->isSeekable()) { + $body->rewind(); + } + $conf[\CURLOPT_READFUNCTION] = static function ($ch, $fd, $length) use ($body) { + return $body->read($length); + }; + } + + // If the Expect header is not present, prevent curl from adding it + if (!$request->hasHeader('Expect')) { + $conf[\CURLOPT_HTTPHEADER][] = 'Expect:'; + } + + // cURL sometimes adds a content-type by default. Prevent this. + if (!$request->hasHeader('Content-Type')) { + $conf[\CURLOPT_HTTPHEADER][] = 'Content-Type:'; + } + } + + private function applyHeaders(EasyHandle $easy, array &$conf): void + { + foreach ($conf['_headers'] as $name => $values) { + foreach ($values as $value) { + $value = (string) $value; + if ($value === '') { + // cURL requires a special format for empty headers. + // See https://github.com/guzzle/guzzle/issues/1882 for more details. + $conf[\CURLOPT_HTTPHEADER][] = "$name;"; + } else { + $conf[\CURLOPT_HTTPHEADER][] = "$name: $value"; + } + } + } + + // Remove the Accept header if one was not set + if (!$easy->request->hasHeader('Accept')) { + $conf[\CURLOPT_HTTPHEADER][] = 'Accept:'; + } + } + + /** + * Remove a header from the options array. + * + * @param string $name Case-insensitive header to remove + * @param array $options Array of options to modify + */ + private function removeHeader(string $name, array &$options): void + { + foreach (\array_keys($options['_headers']) as $key) { + if (!\strcasecmp($key, $name)) { + unset($options['_headers'][$key]); + + return; + } + } + } + + private function applyHandlerOptions(EasyHandle $easy, array &$conf): void + { + $options = $easy->options; + if (isset($options['verify'])) { + if ($options['verify'] === false) { + unset($conf[\CURLOPT_CAINFO]); + $conf[\CURLOPT_SSL_VERIFYHOST] = 0; + $conf[\CURLOPT_SSL_VERIFYPEER] = false; + } else { + $conf[\CURLOPT_SSL_VERIFYHOST] = 2; + $conf[\CURLOPT_SSL_VERIFYPEER] = true; + if (\is_string($options['verify'])) { + // Throw an error if the file/folder/link path is not valid or doesn't exist. + if (!\file_exists($options['verify'])) { + throw new \InvalidArgumentException("SSL CA bundle not found: {$options['verify']}"); + } + // If it's a directory or a link to a directory use CURLOPT_CAPATH. + // If not, it's probably a file, or a link to a file, so use CURLOPT_CAINFO. + if ( + \is_dir($options['verify']) + || ( + \is_link($options['verify']) === true + && ($verifyLink = \readlink($options['verify'])) !== false + && \is_dir($verifyLink) + ) + ) { + $conf[\CURLOPT_CAPATH] = $options['verify']; + } else { + $conf[\CURLOPT_CAINFO] = $options['verify']; + } + } + } + } + + if (!isset($options['curl'][\CURLOPT_ENCODING]) && !empty($options['decode_content'])) { + $accept = $easy->request->getHeaderLine('Accept-Encoding'); + if ($accept) { + $conf[\CURLOPT_ENCODING] = $accept; + } else { + // The empty string enables all available decoders and implicitly + // sets a matching 'Accept-Encoding' header. + $conf[\CURLOPT_ENCODING] = ''; + // But as the user did not specify any encoding preference, + // let's leave it up to server by preventing curl from sending + // the header, which will be interpreted as 'Accept-Encoding: *'. + // https://www.rfc-editor.org/rfc/rfc9110#field.accept-encoding + $conf[\CURLOPT_HTTPHEADER][] = 'Accept-Encoding:'; + } + } + + if (!isset($options['sink'])) { + // Use a default temp stream if no sink was set. + $options['sink'] = \GuzzleHttp\Psr7\Utils::tryFopen('php://temp', 'w+'); + } + $sink = $options['sink']; + if (!\is_string($sink)) { + $sink = \GuzzleHttp\Psr7\Utils::streamFor($sink); + } elseif (!\is_dir(\dirname($sink))) { + // Ensure that the directory exists before failing in curl. + throw new \RuntimeException(\sprintf('Directory %s does not exist for sink value of %s', \dirname($sink), $sink)); + } else { + $sink = new LazyOpenStream($sink, 'w+'); + } + $easy->sink = $sink; + $conf[\CURLOPT_WRITEFUNCTION] = static function ($ch, $write) use ($sink): int { + return $sink->write($write); + }; + + $timeoutRequiresNoSignal = false; + if (isset($options['timeout'])) { + $timeoutRequiresNoSignal |= $options['timeout'] < 1; + $conf[\CURLOPT_TIMEOUT_MS] = $options['timeout'] * 1000; + } + + // CURL default value is CURL_IPRESOLVE_WHATEVER + if (isset($options['force_ip_resolve'])) { + if ('v4' === $options['force_ip_resolve']) { + $conf[\CURLOPT_IPRESOLVE] = \CURL_IPRESOLVE_V4; + } elseif ('v6' === $options['force_ip_resolve']) { + $conf[\CURLOPT_IPRESOLVE] = \CURL_IPRESOLVE_V6; + } + } + + if (isset($options['connect_timeout'])) { + $timeoutRequiresNoSignal |= $options['connect_timeout'] < 1; + $conf[\CURLOPT_CONNECTTIMEOUT_MS] = $options['connect_timeout'] * 1000; + } + + if ($timeoutRequiresNoSignal && \strtoupper(\substr(\PHP_OS, 0, 3)) !== 'WIN') { + $conf[\CURLOPT_NOSIGNAL] = true; + } + + if (isset($options['proxy'])) { + if (!\is_array($options['proxy'])) { + $conf[\CURLOPT_PROXY] = $options['proxy']; + } else { + $scheme = $easy->request->getUri()->getScheme(); + if (isset($options['proxy'][$scheme])) { + $host = $easy->request->getUri()->getHost(); + if (isset($options['proxy']['no']) && Utils::isHostInNoProxy($host, $options['proxy']['no'])) { + unset($conf[\CURLOPT_PROXY]); + } else { + $conf[\CURLOPT_PROXY] = $options['proxy'][$scheme]; + } + } + } + } + + if (isset($options['crypto_method'])) { + $protocolVersion = $easy->request->getProtocolVersion(); + + // If HTTP/2, upgrade TLS 1.0 and 1.1 to 1.2 + if ('2' === $protocolVersion || '2.0' === $protocolVersion) { + if ( + \STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT === $options['crypto_method'] + || \STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT === $options['crypto_method'] + || \STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT === $options['crypto_method'] + ) { + $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_2; + } elseif (defined('STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT') && \STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT === $options['crypto_method']) { + if (!self::supportsTls13()) { + throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.3 not supported by your version of cURL'); + } + $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_3; + } else { + throw new \InvalidArgumentException('Invalid crypto_method request option: unknown version provided'); + } + } elseif (\STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT === $options['crypto_method']) { + $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_0; + } elseif (\STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT === $options['crypto_method']) { + $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_1; + } elseif (\STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT === $options['crypto_method']) { + if (!self::supportsTls12()) { + throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.2 not supported by your version of cURL'); + } + $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_2; + } elseif (defined('STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT') && \STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT === $options['crypto_method']) { + if (!self::supportsTls13()) { + throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.3 not supported by your version of cURL'); + } + $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_3; + } else { + throw new \InvalidArgumentException('Invalid crypto_method request option: unknown version provided'); + } + } + + if (isset($options['cert'])) { + $cert = $options['cert']; + if (\is_array($cert)) { + $conf[\CURLOPT_SSLCERTPASSWD] = $cert[1]; + $cert = $cert[0]; + } + if (!\file_exists($cert)) { + throw new \InvalidArgumentException("SSL certificate not found: {$cert}"); + } + // OpenSSL (versions 0.9.3 and later) also support "P12" for PKCS#12-encoded files. + // see https://curl.se/libcurl/c/CURLOPT_SSLCERTTYPE.html + $ext = pathinfo($cert, \PATHINFO_EXTENSION); + if (preg_match('#^(der|p12)$#i', $ext)) { + $conf[\CURLOPT_SSLCERTTYPE] = strtoupper($ext); + } + $conf[\CURLOPT_SSLCERT] = $cert; + } + + if (isset($options['ssl_key'])) { + if (\is_array($options['ssl_key'])) { + if (\count($options['ssl_key']) === 2) { + [$sslKey, $conf[\CURLOPT_SSLKEYPASSWD]] = $options['ssl_key']; + } else { + [$sslKey] = $options['ssl_key']; + } + } + + $sslKey = $sslKey ?? $options['ssl_key']; + + if (!\file_exists($sslKey)) { + throw new \InvalidArgumentException("SSL private key not found: {$sslKey}"); + } + $conf[\CURLOPT_SSLKEY] = $sslKey; + } + + if (isset($options['progress'])) { + $progress = $options['progress']; + if (!\is_callable($progress)) { + throw new \InvalidArgumentException('progress client option must be callable'); + } + $conf[\CURLOPT_NOPROGRESS] = false; + $conf[\CURLOPT_PROGRESSFUNCTION] = static function ($resource, int $downloadSize, int $downloaded, int $uploadSize, int $uploaded) use ($progress) { + $progress($downloadSize, $downloaded, $uploadSize, $uploaded); + }; + } + + if (!empty($options['debug'])) { + $conf[\CURLOPT_STDERR] = Utils::debugResource($options['debug']); + $conf[\CURLOPT_VERBOSE] = true; + } + } + + /** + * This function ensures that a response was set on a transaction. If one + * was not set, then the request is retried if possible. This error + * typically means you are sending a payload, curl encountered a + * "Connection died, retrying a fresh connect" error, tried to rewind the + * stream, and then encountered a "necessary data rewind wasn't possible" + * error, causing the request to be sent through curl_multi_info_read() + * without an error status. + * + * @param callable(RequestInterface, array): PromiseInterface $handler + */ + private static function retryFailedRewind(callable $handler, EasyHandle $easy, array $ctx): PromiseInterface + { + try { + // Only rewind if the body has been read from. + $body = $easy->request->getBody(); + if ($body->tell() > 0) { + $body->rewind(); + } + } catch (\RuntimeException $e) { + $ctx['error'] = 'The connection unexpectedly failed without ' + .'providing an error. The request would have been retried, ' + .'but attempting to rewind the request body failed. ' + .'Exception: '.$e; + + return self::createRejection($easy, $ctx); + } + + // Retry no more than 3 times before giving up. + if (!isset($easy->options['_curl_retries'])) { + $easy->options['_curl_retries'] = 1; + } elseif ($easy->options['_curl_retries'] == 2) { + $ctx['error'] = 'The cURL request was retried 3 times ' + .'and did not succeed. The most likely reason for the failure ' + .'is that cURL was unable to rewind the body of the request ' + .'and subsequent retries resulted in the same error. Turn on ' + .'the debug option to see what went wrong. See ' + .'https://bugs.php.net/bug.php?id=47204 for more information.'; + + return self::createRejection($easy, $ctx); + } else { + ++$easy->options['_curl_retries']; + } + + return $handler($easy->request, $easy->options); + } + + private function createHeaderFn(EasyHandle $easy): callable + { + if (isset($easy->options['on_headers'])) { + $onHeaders = $easy->options['on_headers']; + + if (!\is_callable($onHeaders)) { + throw new \InvalidArgumentException('on_headers must be callable'); + } + } else { + $onHeaders = null; + } + + return static function ($ch, $h) use ( + $onHeaders, + $easy, + &$startingResponse + ) { + $value = \trim($h); + if ($value === '') { + $startingResponse = true; + try { + $easy->createResponse(); + } catch (\Exception $e) { + $easy->createResponseException = $e; + + return -1; + } + if ($onHeaders !== null) { + try { + $onHeaders($easy->response); + } catch (\Exception $e) { + // Associate the exception with the handle and trigger + // a curl header write error by returning 0. + $easy->onHeadersException = $e; + + return -1; + } + } + } elseif ($startingResponse) { + $startingResponse = false; + $easy->headers = [$value]; + } else { + $easy->headers[] = $value; + } + + return \strlen($h); + }; + } + + public function __destruct() + { + foreach ($this->handles as $id => $handle) { + \curl_close($handle); + unset($this->handles[$id]); + } + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php b/vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php new file mode 100644 index 0000000..fe57ed5 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php @@ -0,0 +1,25 @@ +factory = $options['handle_factory'] + ?? new CurlFactory(3); + } + + public function __invoke(RequestInterface $request, array $options): PromiseInterface + { + if (isset($options['delay'])) { + \usleep($options['delay'] * 1000); + } + + $easy = $this->factory->create($request, $options); + \curl_exec($easy->handle); + $easy->errno = \curl_errno($easy->handle); + + return CurlFactory::finish($this, $easy, $this->factory); + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php b/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php new file mode 100644 index 0000000..73a6abe --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php @@ -0,0 +1,284 @@ + An array of delay times, indexed by handle id in `addRequest`. + * + * @see CurlMultiHandler::addRequest + */ + private $delays = []; + + /** + * @var array An associative array of CURLMOPT_* options and corresponding values for curl_multi_setopt() + */ + private $options = []; + + /** @var resource|\CurlMultiHandle */ + private $_mh; + + /** + * This handler accepts the following options: + * + * - handle_factory: An optional factory used to create curl handles + * - select_timeout: Optional timeout (in seconds) to block before timing + * out while selecting curl handles. Defaults to 1 second. + * - options: An associative array of CURLMOPT_* options and + * corresponding values for curl_multi_setopt() + */ + public function __construct(array $options = []) + { + $this->factory = $options['handle_factory'] ?? new CurlFactory(50); + + if (isset($options['select_timeout'])) { + $this->selectTimeout = $options['select_timeout']; + } elseif ($selectTimeout = Utils::getenv('GUZZLE_CURL_SELECT_TIMEOUT')) { + @trigger_error('Since guzzlehttp/guzzle 7.2.0: Using environment variable GUZZLE_CURL_SELECT_TIMEOUT is deprecated. Use option "select_timeout" instead.', \E_USER_DEPRECATED); + $this->selectTimeout = (int) $selectTimeout; + } else { + $this->selectTimeout = 1; + } + + $this->options = $options['options'] ?? []; + + // unsetting the property forces the first access to go through + // __get(). + unset($this->_mh); + } + + /** + * @param string $name + * + * @return resource|\CurlMultiHandle + * + * @throws \BadMethodCallException when another field as `_mh` will be gotten + * @throws \RuntimeException when curl can not initialize a multi handle + */ + public function __get($name) + { + if ($name !== '_mh') { + throw new \BadMethodCallException("Can not get other property as '_mh'."); + } + + $multiHandle = \curl_multi_init(); + + if (false === $multiHandle) { + throw new \RuntimeException('Can not initialize curl multi handle.'); + } + + $this->_mh = $multiHandle; + + foreach ($this->options as $option => $value) { + // A warning is raised in case of a wrong option. + curl_multi_setopt($this->_mh, $option, $value); + } + + return $this->_mh; + } + + public function __destruct() + { + if (isset($this->_mh)) { + \curl_multi_close($this->_mh); + unset($this->_mh); + } + } + + public function __invoke(RequestInterface $request, array $options): PromiseInterface + { + $easy = $this->factory->create($request, $options); + $id = (int) $easy->handle; + + $promise = new Promise( + [$this, 'execute'], + function () use ($id) { + return $this->cancel($id); + } + ); + + $this->addRequest(['easy' => $easy, 'deferred' => $promise]); + + return $promise; + } + + /** + * Ticks the curl event loop. + */ + public function tick(): void + { + // Add any delayed handles if needed. + if ($this->delays) { + $currentTime = Utils::currentTime(); + foreach ($this->delays as $id => $delay) { + if ($currentTime >= $delay) { + unset($this->delays[$id]); + \curl_multi_add_handle( + $this->_mh, + $this->handles[$id]['easy']->handle + ); + } + } + } + + // Run curl_multi_exec in the queue to enable other async tasks to run + P\Utils::queue()->add(Closure::fromCallable([$this, 'tickInQueue'])); + + // Step through the task queue which may add additional requests. + P\Utils::queue()->run(); + + if ($this->active && \curl_multi_select($this->_mh, $this->selectTimeout) === -1) { + // Perform a usleep if a select returns -1. + // See: https://bugs.php.net/bug.php?id=61141 + \usleep(250); + } + + while (\curl_multi_exec($this->_mh, $this->active) === \CURLM_CALL_MULTI_PERFORM) { + // Prevent busy looping for slow HTTP requests. + \curl_multi_select($this->_mh, $this->selectTimeout); + } + + $this->processMessages(); + } + + /** + * Runs \curl_multi_exec() inside the event loop, to prevent busy looping + */ + private function tickInQueue(): void + { + if (\curl_multi_exec($this->_mh, $this->active) === \CURLM_CALL_MULTI_PERFORM) { + \curl_multi_select($this->_mh, 0); + P\Utils::queue()->add(Closure::fromCallable([$this, 'tickInQueue'])); + } + } + + /** + * Runs until all outstanding connections have completed. + */ + public function execute(): void + { + $queue = P\Utils::queue(); + + while ($this->handles || !$queue->isEmpty()) { + // If there are no transfers, then sleep for the next delay + if (!$this->active && $this->delays) { + \usleep($this->timeToNext()); + } + $this->tick(); + } + } + + private function addRequest(array $entry): void + { + $easy = $entry['easy']; + $id = (int) $easy->handle; + $this->handles[$id] = $entry; + if (empty($easy->options['delay'])) { + \curl_multi_add_handle($this->_mh, $easy->handle); + } else { + $this->delays[$id] = Utils::currentTime() + ($easy->options['delay'] / 1000); + } + } + + /** + * Cancels a handle from sending and removes references to it. + * + * @param int $id Handle ID to cancel and remove. + * + * @return bool True on success, false on failure. + */ + private function cancel($id): bool + { + if (!is_int($id)) { + trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing an integer to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); + } + + // Cannot cancel if it has been processed. + if (!isset($this->handles[$id])) { + return false; + } + + $handle = $this->handles[$id]['easy']->handle; + unset($this->delays[$id], $this->handles[$id]); + \curl_multi_remove_handle($this->_mh, $handle); + \curl_close($handle); + + return true; + } + + private function processMessages(): void + { + while ($done = \curl_multi_info_read($this->_mh)) { + if ($done['msg'] !== \CURLMSG_DONE) { + // if it's not done, then it would be premature to remove the handle. ref https://github.com/guzzle/guzzle/pull/2892#issuecomment-945150216 + continue; + } + $id = (int) $done['handle']; + \curl_multi_remove_handle($this->_mh, $done['handle']); + + if (!isset($this->handles[$id])) { + // Probably was cancelled. + continue; + } + + $entry = $this->handles[$id]; + unset($this->handles[$id], $this->delays[$id]); + $entry['easy']->errno = $done['result']; + $entry['deferred']->resolve( + CurlFactory::finish($this, $entry['easy'], $this->factory) + ); + } + } + + private function timeToNext(): int + { + $currentTime = Utils::currentTime(); + $nextTime = \PHP_INT_MAX; + foreach ($this->delays as $time) { + if ($time < $nextTime) { + $nextTime = $time; + } + } + + return ((int) \max(0, $nextTime - $currentTime)) * 1000000; + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php b/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php new file mode 100644 index 0000000..1bc39f4 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php @@ -0,0 +1,112 @@ +headers); + + $normalizedKeys = Utils::normalizeHeaderKeys($headers); + + if (!empty($this->options['decode_content']) && isset($normalizedKeys['content-encoding'])) { + $headers['x-encoded-content-encoding'] = $headers[$normalizedKeys['content-encoding']]; + unset($headers[$normalizedKeys['content-encoding']]); + if (isset($normalizedKeys['content-length'])) { + $headers['x-encoded-content-length'] = $headers[$normalizedKeys['content-length']]; + + $bodyLength = (int) $this->sink->getSize(); + if ($bodyLength) { + $headers[$normalizedKeys['content-length']] = $bodyLength; + } else { + unset($headers[$normalizedKeys['content-length']]); + } + } + } + + // Attach a response to the easy handle with the parsed headers. + $this->response = new Response( + $status, + $headers, + $this->sink, + $ver, + $reason + ); + } + + /** + * @param string $name + * + * @return void + * + * @throws \BadMethodCallException + */ + public function __get($name) + { + $msg = $name === 'handle' ? 'The EasyHandle has been released' : 'Invalid property: '.$name; + throw new \BadMethodCallException($msg); + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Handler/HeaderProcessor.php b/vendor/guzzlehttp/guzzle/src/Handler/HeaderProcessor.php new file mode 100644 index 0000000..5554b8f --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Handler/HeaderProcessor.php @@ -0,0 +1,42 @@ +|null $queue The parameters to be passed to the append function, as an indexed array. + * @param callable|null $onFulfilled Callback to invoke when the return value is fulfilled. + * @param callable|null $onRejected Callback to invoke when the return value is rejected. + */ + public function __construct(?array $queue = null, ?callable $onFulfilled = null, ?callable $onRejected = null) + { + $this->onFulfilled = $onFulfilled; + $this->onRejected = $onRejected; + + if ($queue) { + // array_values included for BC + $this->append(...array_values($queue)); + } + } + + public function __invoke(RequestInterface $request, array $options): PromiseInterface + { + if (!$this->queue) { + throw new \OutOfBoundsException('Mock queue is empty'); + } + + if (isset($options['delay']) && \is_numeric($options['delay'])) { + \usleep((int) $options['delay'] * 1000); + } + + $this->lastRequest = $request; + $this->lastOptions = $options; + $response = \array_shift($this->queue); + + if (isset($options['on_headers'])) { + if (!\is_callable($options['on_headers'])) { + throw new \InvalidArgumentException('on_headers must be callable'); + } + try { + $options['on_headers']($response); + } catch (\Exception $e) { + $msg = 'An error was encountered during the on_headers event'; + $response = new RequestException($msg, $request, $response, $e); + } + } + + if (\is_callable($response)) { + $response = $response($request, $options); + } + + $response = $response instanceof \Throwable + ? P\Create::rejectionFor($response) + : P\Create::promiseFor($response); + + return $response->then( + function (?ResponseInterface $value) use ($request, $options) { + $this->invokeStats($request, $options, $value); + if ($this->onFulfilled) { + ($this->onFulfilled)($value); + } + + if ($value !== null && isset($options['sink'])) { + $contents = (string) $value->getBody(); + $sink = $options['sink']; + + if (\is_resource($sink)) { + \fwrite($sink, $contents); + } elseif (\is_string($sink)) { + \file_put_contents($sink, $contents); + } elseif ($sink instanceof StreamInterface) { + $sink->write($contents); + } + } + + return $value; + }, + function ($reason) use ($request, $options) { + $this->invokeStats($request, $options, null, $reason); + if ($this->onRejected) { + ($this->onRejected)($reason); + } + + return P\Create::rejectionFor($reason); + } + ); + } + + /** + * Adds one or more variadic requests, exceptions, callables, or promises + * to the queue. + * + * @param mixed ...$values + */ + public function append(...$values): void + { + foreach ($values as $value) { + if ($value instanceof ResponseInterface + || $value instanceof \Throwable + || $value instanceof PromiseInterface + || \is_callable($value) + ) { + $this->queue[] = $value; + } else { + throw new \TypeError('Expected a Response, Promise, Throwable or callable. Found '.Utils::describeType($value)); + } + } + } + + /** + * Get the last received request. + */ + public function getLastRequest(): ?RequestInterface + { + return $this->lastRequest; + } + + /** + * Get the last received request options. + */ + public function getLastOptions(): array + { + return $this->lastOptions; + } + + /** + * Returns the number of remaining items in the queue. + */ + public function count(): int + { + return \count($this->queue); + } + + public function reset(): void + { + $this->queue = []; + } + + /** + * @param mixed $reason Promise or reason. + */ + private function invokeStats( + RequestInterface $request, + array $options, + ?ResponseInterface $response = null, + $reason = null + ): void { + if (isset($options['on_stats'])) { + $transferTime = $options['transfer_time'] ?? 0; + $stats = new TransferStats($request, $response, $transferTime, $reason); + ($options['on_stats'])($stats); + } + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php b/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php new file mode 100644 index 0000000..f045b52 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php @@ -0,0 +1,51 @@ +getProtocolVersion(); + + if ('1.0' !== $protocolVersion && '1.1' !== $protocolVersion) { + throw new ConnectException(sprintf('HTTP/%s is not supported by the stream handler.', $protocolVersion), $request); + } + + $startTime = isset($options['on_stats']) ? Utils::currentTime() : null; + + try { + // Does not support the expect header. + $request = $request->withoutHeader('Expect'); + + // Append a content-length header if body size is zero to match + // cURL's behavior. + if (0 === $request->getBody()->getSize()) { + $request = $request->withHeader('Content-Length', '0'); + } + + return $this->createResponse( + $request, + $options, + $this->createStream($request, $options), + $startTime + ); + } catch (\InvalidArgumentException $e) { + throw $e; + } catch (\Exception $e) { + // Determine if the error was a networking error. + $message = $e->getMessage(); + // This list can probably get more comprehensive. + if (false !== \strpos($message, 'getaddrinfo') // DNS lookup failed + || false !== \strpos($message, 'Connection refused') + || false !== \strpos($message, "couldn't connect to host") // error on HHVM + || false !== \strpos($message, 'connection attempt failed') + ) { + $e = new ConnectException($e->getMessage(), $request, $e); + } else { + $e = RequestException::wrapException($request, $e); + } + $this->invokeStats($options, $request, $startTime, null, $e); + + return P\Create::rejectionFor($e); + } + } + + private function invokeStats( + array $options, + RequestInterface $request, + ?float $startTime, + ?ResponseInterface $response = null, + ?\Throwable $error = null + ): void { + if (isset($options['on_stats'])) { + $stats = new TransferStats($request, $response, Utils::currentTime() - $startTime, $error, []); + ($options['on_stats'])($stats); + } + } + + /** + * @param resource $stream + */ + private function createResponse(RequestInterface $request, array $options, $stream, ?float $startTime): PromiseInterface + { + $hdrs = $this->lastHeaders; + $this->lastHeaders = []; + + try { + [$ver, $status, $reason, $headers] = HeaderProcessor::parseHeaders($hdrs); + } catch (\Exception $e) { + return P\Create::rejectionFor( + new RequestException('An error was encountered while creating the response', $request, null, $e) + ); + } + + [$stream, $headers] = $this->checkDecode($options, $headers, $stream); + $stream = Psr7\Utils::streamFor($stream); + $sink = $stream; + + if (\strcasecmp('HEAD', $request->getMethod())) { + $sink = $this->createSink($stream, $options); + } + + try { + $response = new Psr7\Response($status, $headers, $sink, $ver, $reason); + } catch (\Exception $e) { + return P\Create::rejectionFor( + new RequestException('An error was encountered while creating the response', $request, null, $e) + ); + } + + if (isset($options['on_headers'])) { + try { + $options['on_headers']($response); + } catch (\Exception $e) { + return P\Create::rejectionFor( + new RequestException('An error was encountered during the on_headers event', $request, $response, $e) + ); + } + } + + // Do not drain when the request is a HEAD request because they have + // no body. + if ($sink !== $stream) { + $this->drain($stream, $sink, $response->getHeaderLine('Content-Length')); + } + + $this->invokeStats($options, $request, $startTime, $response, null); + + return new FulfilledPromise($response); + } + + private function createSink(StreamInterface $stream, array $options): StreamInterface + { + if (!empty($options['stream'])) { + return $stream; + } + + $sink = $options['sink'] ?? Psr7\Utils::tryFopen('php://temp', 'r+'); + + return \is_string($sink) ? new Psr7\LazyOpenStream($sink, 'w+') : Psr7\Utils::streamFor($sink); + } + + /** + * @param resource $stream + */ + private function checkDecode(array $options, array $headers, $stream): array + { + // Automatically decode responses when instructed. + if (!empty($options['decode_content'])) { + $normalizedKeys = Utils::normalizeHeaderKeys($headers); + if (isset($normalizedKeys['content-encoding'])) { + $encoding = $headers[$normalizedKeys['content-encoding']]; + if ($encoding[0] === 'gzip' || $encoding[0] === 'deflate') { + $stream = new Psr7\InflateStream(Psr7\Utils::streamFor($stream)); + $headers['x-encoded-content-encoding'] = $headers[$normalizedKeys['content-encoding']]; + + // Remove content-encoding header + unset($headers[$normalizedKeys['content-encoding']]); + + // Fix content-length header + if (isset($normalizedKeys['content-length'])) { + $headers['x-encoded-content-length'] = $headers[$normalizedKeys['content-length']]; + $length = (int) $stream->getSize(); + if ($length === 0) { + unset($headers[$normalizedKeys['content-length']]); + } else { + $headers[$normalizedKeys['content-length']] = [$length]; + } + } + } + } + } + + return [$stream, $headers]; + } + + /** + * Drains the source stream into the "sink" client option. + * + * @param string $contentLength Header specifying the amount of + * data to read. + * + * @throws \RuntimeException when the sink option is invalid. + */ + private function drain(StreamInterface $source, StreamInterface $sink, string $contentLength): StreamInterface + { + // If a content-length header is provided, then stop reading once + // that number of bytes has been read. This can prevent infinitely + // reading from a stream when dealing with servers that do not honor + // Connection: Close headers. + Psr7\Utils::copyToStream( + $source, + $sink, + (\strlen($contentLength) > 0 && (int) $contentLength > 0) ? (int) $contentLength : -1 + ); + + $sink->seek(0); + $source->close(); + + return $sink; + } + + /** + * Create a resource and check to ensure it was created successfully + * + * @param callable $callback Callable that returns stream resource + * + * @return resource + * + * @throws \RuntimeException on error + */ + private function createResource(callable $callback) + { + $errors = []; + \set_error_handler(static function ($_, $msg, $file, $line) use (&$errors): bool { + $errors[] = [ + 'message' => $msg, + 'file' => $file, + 'line' => $line, + ]; + + return true; + }); + + try { + $resource = $callback(); + } finally { + \restore_error_handler(); + } + + if (!$resource) { + $message = 'Error creating resource: '; + foreach ($errors as $err) { + foreach ($err as $key => $value) { + $message .= "[$key] $value".\PHP_EOL; + } + } + throw new \RuntimeException(\trim($message)); + } + + return $resource; + } + + /** + * @return resource + */ + private function createStream(RequestInterface $request, array $options) + { + static $methods; + if (!$methods) { + $methods = \array_flip(\get_class_methods(__CLASS__)); + } + + if (!\in_array($request->getUri()->getScheme(), ['http', 'https'])) { + throw new RequestException(\sprintf("The scheme '%s' is not supported.", $request->getUri()->getScheme()), $request); + } + + // HTTP/1.1 streams using the PHP stream wrapper require a + // Connection: close header + if ($request->getProtocolVersion() === '1.1' + && !$request->hasHeader('Connection') + ) { + $request = $request->withHeader('Connection', 'close'); + } + + // Ensure SSL is verified by default + if (!isset($options['verify'])) { + $options['verify'] = true; + } + + $params = []; + $context = $this->getDefaultContext($request); + + if (isset($options['on_headers']) && !\is_callable($options['on_headers'])) { + throw new \InvalidArgumentException('on_headers must be callable'); + } + + if (!empty($options)) { + foreach ($options as $key => $value) { + $method = "add_{$key}"; + if (isset($methods[$method])) { + $this->{$method}($request, $context, $value, $params); + } + } + } + + if (isset($options['stream_context'])) { + if (!\is_array($options['stream_context'])) { + throw new \InvalidArgumentException('stream_context must be an array'); + } + $context = \array_replace_recursive($context, $options['stream_context']); + } + + // Microsoft NTLM authentication only supported with curl handler + if (isset($options['auth'][2]) && 'ntlm' === $options['auth'][2]) { + throw new \InvalidArgumentException('Microsoft NTLM authentication only supported with curl handler'); + } + + $uri = $this->resolveHost($request, $options); + + $contextResource = $this->createResource( + static function () use ($context, $params) { + return \stream_context_create($context, $params); + } + ); + + return $this->createResource( + function () use ($uri, &$http_response_header, $contextResource, $context, $options, $request) { + $resource = @\fopen((string) $uri, 'r', false, $contextResource); + $this->lastHeaders = $http_response_header ?? []; + + if (false === $resource) { + throw new ConnectException(sprintf('Connection refused for URI %s', $uri), $request, null, $context); + } + + if (isset($options['read_timeout'])) { + $readTimeout = $options['read_timeout']; + $sec = (int) $readTimeout; + $usec = ($readTimeout - $sec) * 100000; + \stream_set_timeout($resource, $sec, $usec); + } + + return $resource; + } + ); + } + + private function resolveHost(RequestInterface $request, array $options): UriInterface + { + $uri = $request->getUri(); + + if (isset($options['force_ip_resolve']) && !\filter_var($uri->getHost(), \FILTER_VALIDATE_IP)) { + if ('v4' === $options['force_ip_resolve']) { + $records = \dns_get_record($uri->getHost(), \DNS_A); + if (false === $records || !isset($records[0]['ip'])) { + throw new ConnectException(\sprintf("Could not resolve IPv4 address for host '%s'", $uri->getHost()), $request); + } + + return $uri->withHost($records[0]['ip']); + } + if ('v6' === $options['force_ip_resolve']) { + $records = \dns_get_record($uri->getHost(), \DNS_AAAA); + if (false === $records || !isset($records[0]['ipv6'])) { + throw new ConnectException(\sprintf("Could not resolve IPv6 address for host '%s'", $uri->getHost()), $request); + } + + return $uri->withHost('['.$records[0]['ipv6'].']'); + } + } + + return $uri; + } + + private function getDefaultContext(RequestInterface $request): array + { + $headers = ''; + foreach ($request->getHeaders() as $name => $value) { + foreach ($value as $val) { + $headers .= "$name: $val\r\n"; + } + } + + $context = [ + 'http' => [ + 'method' => $request->getMethod(), + 'header' => $headers, + 'protocol_version' => $request->getProtocolVersion(), + 'ignore_errors' => true, + 'follow_location' => 0, + ], + 'ssl' => [ + 'peer_name' => $request->getUri()->getHost(), + ], + ]; + + $body = (string) $request->getBody(); + + if ('' !== $body) { + $context['http']['content'] = $body; + // Prevent the HTTP handler from adding a Content-Type header. + if (!$request->hasHeader('Content-Type')) { + $context['http']['header'] .= "Content-Type:\r\n"; + } + } + + $context['http']['header'] = \rtrim($context['http']['header']); + + return $context; + } + + /** + * @param mixed $value as passed via Request transfer options. + */ + private function add_proxy(RequestInterface $request, array &$options, $value, array &$params): void + { + $uri = null; + + if (!\is_array($value)) { + $uri = $value; + } else { + $scheme = $request->getUri()->getScheme(); + if (isset($value[$scheme])) { + if (!isset($value['no']) || !Utils::isHostInNoProxy($request->getUri()->getHost(), $value['no'])) { + $uri = $value[$scheme]; + } + } + } + + if (!$uri) { + return; + } + + $parsed = $this->parse_proxy($uri); + $options['http']['proxy'] = $parsed['proxy']; + + if ($parsed['auth']) { + if (!isset($options['http']['header'])) { + $options['http']['header'] = []; + } + $options['http']['header'] .= "\r\nProxy-Authorization: {$parsed['auth']}"; + } + } + + /** + * Parses the given proxy URL to make it compatible with the format PHP's stream context expects. + */ + private function parse_proxy(string $url): array + { + $parsed = \parse_url($url); + + if ($parsed !== false && isset($parsed['scheme']) && $parsed['scheme'] === 'http') { + if (isset($parsed['host']) && isset($parsed['port'])) { + $auth = null; + if (isset($parsed['user']) && isset($parsed['pass'])) { + $auth = \base64_encode("{$parsed['user']}:{$parsed['pass']}"); + } + + return [ + 'proxy' => "tcp://{$parsed['host']}:{$parsed['port']}", + 'auth' => $auth ? "Basic {$auth}" : null, + ]; + } + } + + // Return proxy as-is. + return [ + 'proxy' => $url, + 'auth' => null, + ]; + } + + /** + * @param mixed $value as passed via Request transfer options. + */ + private function add_timeout(RequestInterface $request, array &$options, $value, array &$params): void + { + if ($value > 0) { + $options['http']['timeout'] = $value; + } + } + + /** + * @param mixed $value as passed via Request transfer options. + */ + private function add_crypto_method(RequestInterface $request, array &$options, $value, array &$params): void + { + if ( + $value === \STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT + || $value === \STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT + || $value === \STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT + || (defined('STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT') && $value === \STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT) + ) { + $options['http']['crypto_method'] = $value; + + return; + } + + throw new \InvalidArgumentException('Invalid crypto_method request option: unknown version provided'); + } + + /** + * @param mixed $value as passed via Request transfer options. + */ + private function add_verify(RequestInterface $request, array &$options, $value, array &$params): void + { + if ($value === false) { + $options['ssl']['verify_peer'] = false; + $options['ssl']['verify_peer_name'] = false; + + return; + } + + if (\is_string($value)) { + $options['ssl']['cafile'] = $value; + if (!\file_exists($value)) { + throw new \RuntimeException("SSL CA bundle not found: $value"); + } + } elseif ($value !== true) { + throw new \InvalidArgumentException('Invalid verify request option'); + } + + $options['ssl']['verify_peer'] = true; + $options['ssl']['verify_peer_name'] = true; + $options['ssl']['allow_self_signed'] = false; + } + + /** + * @param mixed $value as passed via Request transfer options. + */ + private function add_cert(RequestInterface $request, array &$options, $value, array &$params): void + { + if (\is_array($value)) { + $options['ssl']['passphrase'] = $value[1]; + $value = $value[0]; + } + + if (!\file_exists($value)) { + throw new \RuntimeException("SSL certificate not found: {$value}"); + } + + $options['ssl']['local_cert'] = $value; + } + + /** + * @param mixed $value as passed via Request transfer options. + */ + private function add_progress(RequestInterface $request, array &$options, $value, array &$params): void + { + self::addNotification( + $params, + static function ($code, $a, $b, $c, $transferred, $total) use ($value) { + if ($code == \STREAM_NOTIFY_PROGRESS) { + // The upload progress cannot be determined. Use 0 for cURL compatibility: + // https://curl.se/libcurl/c/CURLOPT_PROGRESSFUNCTION.html + $value($total, $transferred, 0, 0); + } + } + ); + } + + /** + * @param mixed $value as passed via Request transfer options. + */ + private function add_debug(RequestInterface $request, array &$options, $value, array &$params): void + { + if ($value === false) { + return; + } + + static $map = [ + \STREAM_NOTIFY_CONNECT => 'CONNECT', + \STREAM_NOTIFY_AUTH_REQUIRED => 'AUTH_REQUIRED', + \STREAM_NOTIFY_AUTH_RESULT => 'AUTH_RESULT', + \STREAM_NOTIFY_MIME_TYPE_IS => 'MIME_TYPE_IS', + \STREAM_NOTIFY_FILE_SIZE_IS => 'FILE_SIZE_IS', + \STREAM_NOTIFY_REDIRECTED => 'REDIRECTED', + \STREAM_NOTIFY_PROGRESS => 'PROGRESS', + \STREAM_NOTIFY_FAILURE => 'FAILURE', + \STREAM_NOTIFY_COMPLETED => 'COMPLETED', + \STREAM_NOTIFY_RESOLVE => 'RESOLVE', + ]; + static $args = ['severity', 'message', 'message_code', 'bytes_transferred', 'bytes_max']; + + $value = Utils::debugResource($value); + $ident = $request->getMethod().' '.$request->getUri()->withFragment(''); + self::addNotification( + $params, + static function (int $code, ...$passed) use ($ident, $value, $map, $args): void { + \fprintf($value, '<%s> [%s] ', $ident, $map[$code]); + foreach (\array_filter($passed) as $i => $v) { + \fwrite($value, $args[$i].': "'.$v.'" '); + } + \fwrite($value, "\n"); + } + ); + } + + private static function addNotification(array &$params, callable $notify): void + { + // Wrap the existing function if needed. + if (!isset($params['notification'])) { + $params['notification'] = $notify; + } else { + $params['notification'] = self::callArray([ + $params['notification'], + $notify, + ]); + } + } + + private static function callArray(array $functions): callable + { + return static function (...$args) use ($functions) { + foreach ($functions as $fn) { + $fn(...$args); + } + }; + } +} diff --git a/vendor/guzzlehttp/guzzle/src/HandlerStack.php b/vendor/guzzlehttp/guzzle/src/HandlerStack.php new file mode 100644 index 0000000..03f9a18 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/HandlerStack.php @@ -0,0 +1,275 @@ +push(Middleware::httpErrors(), 'http_errors'); + $stack->push(Middleware::redirect(), 'allow_redirects'); + $stack->push(Middleware::cookies(), 'cookies'); + $stack->push(Middleware::prepareBody(), 'prepare_body'); + + return $stack; + } + + /** + * @param (callable(RequestInterface, array): PromiseInterface)|null $handler Underlying HTTP handler. + */ + public function __construct(?callable $handler = null) + { + $this->handler = $handler; + } + + /** + * Invokes the handler stack as a composed handler + * + * @return ResponseInterface|PromiseInterface + */ + public function __invoke(RequestInterface $request, array $options) + { + $handler = $this->resolve(); + + return $handler($request, $options); + } + + /** + * Dumps a string representation of the stack. + * + * @return string + */ + public function __toString() + { + $depth = 0; + $stack = []; + + if ($this->handler !== null) { + $stack[] = '0) Handler: '.$this->debugCallable($this->handler); + } + + $result = ''; + foreach (\array_reverse($this->stack) as $tuple) { + ++$depth; + $str = "{$depth}) Name: '{$tuple[1]}', "; + $str .= 'Function: '.$this->debugCallable($tuple[0]); + $result = "> {$str}\n{$result}"; + $stack[] = $str; + } + + foreach (\array_keys($stack) as $k) { + $result .= "< {$stack[$k]}\n"; + } + + return $result; + } + + /** + * Set the HTTP handler that actually returns a promise. + * + * @param callable(RequestInterface, array): PromiseInterface $handler Accepts a request and array of options and + * returns a Promise. + */ + public function setHandler(callable $handler): void + { + $this->handler = $handler; + $this->cached = null; + } + + /** + * Returns true if the builder has a handler. + */ + public function hasHandler(): bool + { + return $this->handler !== null; + } + + /** + * Unshift a middleware to the bottom of the stack. + * + * @param callable(callable): callable $middleware Middleware function + * @param string $name Name to register for this middleware. + */ + public function unshift(callable $middleware, ?string $name = null): void + { + \array_unshift($this->stack, [$middleware, $name]); + $this->cached = null; + } + + /** + * Push a middleware to the top of the stack. + * + * @param callable(callable): callable $middleware Middleware function + * @param string $name Name to register for this middleware. + */ + public function push(callable $middleware, string $name = ''): void + { + $this->stack[] = [$middleware, $name]; + $this->cached = null; + } + + /** + * Add a middleware before another middleware by name. + * + * @param string $findName Middleware to find + * @param callable(callable): callable $middleware Middleware function + * @param string $withName Name to register for this middleware. + */ + public function before(string $findName, callable $middleware, string $withName = ''): void + { + $this->splice($findName, $withName, $middleware, true); + } + + /** + * Add a middleware after another middleware by name. + * + * @param string $findName Middleware to find + * @param callable(callable): callable $middleware Middleware function + * @param string $withName Name to register for this middleware. + */ + public function after(string $findName, callable $middleware, string $withName = ''): void + { + $this->splice($findName, $withName, $middleware, false); + } + + /** + * Remove a middleware by instance or name from the stack. + * + * @param callable|string $remove Middleware to remove by instance or name. + */ + public function remove($remove): void + { + if (!is_string($remove) && !is_callable($remove)) { + trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a callable or string to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); + } + + $this->cached = null; + $idx = \is_callable($remove) ? 0 : 1; + $this->stack = \array_values(\array_filter( + $this->stack, + static function ($tuple) use ($idx, $remove) { + return $tuple[$idx] !== $remove; + } + )); + } + + /** + * Compose the middleware and handler into a single callable function. + * + * @return callable(RequestInterface, array): PromiseInterface + */ + public function resolve(): callable + { + if ($this->cached === null) { + if (($prev = $this->handler) === null) { + throw new \LogicException('No handler has been specified'); + } + + foreach (\array_reverse($this->stack) as $fn) { + /** @var callable(RequestInterface, array): PromiseInterface $prev */ + $prev = $fn[0]($prev); + } + + $this->cached = $prev; + } + + return $this->cached; + } + + private function findByName(string $name): int + { + foreach ($this->stack as $k => $v) { + if ($v[1] === $name) { + return $k; + } + } + + throw new \InvalidArgumentException("Middleware not found: $name"); + } + + /** + * Splices a function into the middleware list at a specific position. + */ + private function splice(string $findName, string $withName, callable $middleware, bool $before): void + { + $this->cached = null; + $idx = $this->findByName($findName); + $tuple = [$middleware, $withName]; + + if ($before) { + if ($idx === 0) { + \array_unshift($this->stack, $tuple); + } else { + $replacement = [$tuple, $this->stack[$idx]]; + \array_splice($this->stack, $idx, 1, $replacement); + } + } elseif ($idx === \count($this->stack) - 1) { + $this->stack[] = $tuple; + } else { + $replacement = [$this->stack[$idx], $tuple]; + \array_splice($this->stack, $idx, 1, $replacement); + } + } + + /** + * Provides a debug string for a given callable. + * + * @param callable|string $fn Function to write as a string. + */ + private function debugCallable($fn): string + { + if (\is_string($fn)) { + return "callable({$fn})"; + } + + if (\is_array($fn)) { + return \is_string($fn[0]) + ? "callable({$fn[0]}::{$fn[1]})" + : "callable(['".\get_class($fn[0])."', '{$fn[1]}'])"; + } + + /** @var object $fn */ + return 'callable('.\spl_object_hash($fn).')'; + } +} diff --git a/vendor/guzzlehttp/guzzle/src/MessageFormatter.php b/vendor/guzzlehttp/guzzle/src/MessageFormatter.php new file mode 100644 index 0000000..9b77eee --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/MessageFormatter.php @@ -0,0 +1,199 @@ +>>>>>>>\n{request}\n<<<<<<<<\n{response}\n--------\n{error}"; + public const SHORT = '[{ts}] "{method} {target} HTTP/{version}" {code}'; + + /** + * @var string Template used to format log messages + */ + private $template; + + /** + * @param string $template Log message template + */ + public function __construct(?string $template = self::CLF) + { + $this->template = $template ?: self::CLF; + } + + /** + * Returns a formatted message string. + * + * @param RequestInterface $request Request that was sent + * @param ResponseInterface|null $response Response that was received + * @param \Throwable|null $error Exception that was received + */ + public function format(RequestInterface $request, ?ResponseInterface $response = null, ?\Throwable $error = null): string + { + $cache = []; + + /** @var string */ + return \preg_replace_callback( + '/{\s*([A-Za-z_\-\.0-9]+)\s*}/', + function (array $matches) use ($request, $response, $error, &$cache) { + if (isset($cache[$matches[1]])) { + return $cache[$matches[1]]; + } + + $result = ''; + switch ($matches[1]) { + case 'request': + $result = Psr7\Message::toString($request); + break; + case 'response': + $result = $response ? Psr7\Message::toString($response) : ''; + break; + case 'req_headers': + $result = \trim($request->getMethod() + .' '.$request->getRequestTarget()) + .' HTTP/'.$request->getProtocolVersion()."\r\n" + .$this->headers($request); + break; + case 'res_headers': + $result = $response ? + \sprintf( + 'HTTP/%s %d %s', + $response->getProtocolVersion(), + $response->getStatusCode(), + $response->getReasonPhrase() + )."\r\n".$this->headers($response) + : 'NULL'; + break; + case 'req_body': + $result = $request->getBody()->__toString(); + break; + case 'res_body': + if (!$response instanceof ResponseInterface) { + $result = 'NULL'; + break; + } + + $body = $response->getBody(); + + if (!$body->isSeekable()) { + $result = 'RESPONSE_NOT_LOGGEABLE'; + break; + } + + $result = $response->getBody()->__toString(); + break; + case 'ts': + case 'date_iso_8601': + $result = \gmdate('c'); + break; + case 'date_common_log': + $result = \date('d/M/Y:H:i:s O'); + break; + case 'method': + $result = $request->getMethod(); + break; + case 'version': + $result = $request->getProtocolVersion(); + break; + case 'uri': + case 'url': + $result = $request->getUri()->__toString(); + break; + case 'target': + $result = $request->getRequestTarget(); + break; + case 'req_version': + $result = $request->getProtocolVersion(); + break; + case 'res_version': + $result = $response + ? $response->getProtocolVersion() + : 'NULL'; + break; + case 'host': + $result = $request->getHeaderLine('Host'); + break; + case 'hostname': + $result = \gethostname(); + break; + case 'code': + $result = $response ? $response->getStatusCode() : 'NULL'; + break; + case 'phrase': + $result = $response ? $response->getReasonPhrase() : 'NULL'; + break; + case 'error': + $result = $error ? $error->getMessage() : 'NULL'; + break; + default: + // handle prefixed dynamic headers + if (\strpos($matches[1], 'req_header_') === 0) { + $result = $request->getHeaderLine(\substr($matches[1], 11)); + } elseif (\strpos($matches[1], 'res_header_') === 0) { + $result = $response + ? $response->getHeaderLine(\substr($matches[1], 11)) + : 'NULL'; + } + } + + $cache[$matches[1]] = $result; + + return $result; + }, + $this->template + ); + } + + /** + * Get headers from message as string + */ + private function headers(MessageInterface $message): string + { + $result = ''; + foreach ($message->getHeaders() as $name => $values) { + $result .= $name.': '.\implode(', ', $values)."\r\n"; + } + + return \trim($result); + } +} diff --git a/vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php b/vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php new file mode 100644 index 0000000..a39ac24 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php @@ -0,0 +1,18 @@ +withCookieHeader($request); + + return $handler($request, $options) + ->then( + static function (ResponseInterface $response) use ($cookieJar, $request): ResponseInterface { + $cookieJar->extractCookies($request, $response); + + return $response; + } + ); + }; + }; + } + + /** + * Middleware that throws exceptions for 4xx or 5xx responses when the + * "http_errors" request option is set to true. + * + * @param BodySummarizerInterface|null $bodySummarizer The body summarizer to use in exception messages. + * + * @return callable(callable): callable Returns a function that accepts the next handler. + */ + public static function httpErrors(?BodySummarizerInterface $bodySummarizer = null): callable + { + return static function (callable $handler) use ($bodySummarizer): callable { + return static function ($request, array $options) use ($handler, $bodySummarizer) { + if (empty($options['http_errors'])) { + return $handler($request, $options); + } + + return $handler($request, $options)->then( + static function (ResponseInterface $response) use ($request, $bodySummarizer) { + $code = $response->getStatusCode(); + if ($code < 400) { + return $response; + } + throw RequestException::create($request, $response, null, [], $bodySummarizer); + } + ); + }; + }; + } + + /** + * Middleware that pushes history data to an ArrayAccess container. + * + * @param array|\ArrayAccess $container Container to hold the history (by reference). + * + * @return callable(callable): callable Returns a function that accepts the next handler. + * + * @throws \InvalidArgumentException if container is not an array or ArrayAccess. + */ + public static function history(&$container): callable + { + if (!\is_array($container) && !$container instanceof \ArrayAccess) { + throw new \InvalidArgumentException('history container must be an array or object implementing ArrayAccess'); + } + + return static function (callable $handler) use (&$container): callable { + return static function (RequestInterface $request, array $options) use ($handler, &$container) { + return $handler($request, $options)->then( + static function ($value) use ($request, &$container, $options) { + $container[] = [ + 'request' => $request, + 'response' => $value, + 'error' => null, + 'options' => $options, + ]; + + return $value; + }, + static function ($reason) use ($request, &$container, $options) { + $container[] = [ + 'request' => $request, + 'response' => null, + 'error' => $reason, + 'options' => $options, + ]; + + return P\Create::rejectionFor($reason); + } + ); + }; + }; + } + + /** + * Middleware that invokes a callback before and after sending a request. + * + * The provided listener cannot modify or alter the response. It simply + * "taps" into the chain to be notified before returning the promise. The + * before listener accepts a request and options array, and the after + * listener accepts a request, options array, and response promise. + * + * @param callable $before Function to invoke before forwarding the request. + * @param callable $after Function invoked after forwarding. + * + * @return callable Returns a function that accepts the next handler. + */ + public static function tap(?callable $before = null, ?callable $after = null): callable + { + return static function (callable $handler) use ($before, $after): callable { + return static function (RequestInterface $request, array $options) use ($handler, $before, $after) { + if ($before) { + $before($request, $options); + } + $response = $handler($request, $options); + if ($after) { + $after($request, $options, $response); + } + + return $response; + }; + }; + } + + /** + * Middleware that handles request redirects. + * + * @return callable Returns a function that accepts the next handler. + */ + public static function redirect(): callable + { + return static function (callable $handler): RedirectMiddleware { + return new RedirectMiddleware($handler); + }; + } + + /** + * Middleware that retries requests based on the boolean result of + * invoking the provided "decider" function. + * + * If no delay function is provided, a simple implementation of exponential + * backoff will be utilized. + * + * @param callable $decider Function that accepts the number of retries, + * a request, [response], and [exception] and + * returns true if the request is to be retried. + * @param callable $delay Function that accepts the number of retries and + * returns the number of milliseconds to delay. + * + * @return callable Returns a function that accepts the next handler. + */ + public static function retry(callable $decider, ?callable $delay = null): callable + { + return static function (callable $handler) use ($decider, $delay): RetryMiddleware { + return new RetryMiddleware($decider, $handler, $delay); + }; + } + + /** + * Middleware that logs requests, responses, and errors using a message + * formatter. + * + * @phpstan-param \Psr\Log\LogLevel::* $logLevel Level at which to log requests. + * + * @param LoggerInterface $logger Logs messages. + * @param MessageFormatterInterface|MessageFormatter $formatter Formatter used to create message strings. + * @param string $logLevel Level at which to log requests. + * + * @return callable Returns a function that accepts the next handler. + */ + public static function log(LoggerInterface $logger, $formatter, string $logLevel = 'info'): callable + { + // To be compatible with Guzzle 7.1.x we need to allow users to pass a MessageFormatter + if (!$formatter instanceof MessageFormatter && !$formatter instanceof MessageFormatterInterface) { + throw new \LogicException(sprintf('Argument 2 to %s::log() must be of type %s', self::class, MessageFormatterInterface::class)); + } + + return static function (callable $handler) use ($logger, $formatter, $logLevel): callable { + return static function (RequestInterface $request, array $options = []) use ($handler, $logger, $formatter, $logLevel) { + return $handler($request, $options)->then( + static function ($response) use ($logger, $request, $formatter, $logLevel): ResponseInterface { + $message = $formatter->format($request, $response); + $logger->log($logLevel, $message); + + return $response; + }, + static function ($reason) use ($logger, $request, $formatter): PromiseInterface { + $response = $reason instanceof RequestException ? $reason->getResponse() : null; + $message = $formatter->format($request, $response, P\Create::exceptionFor($reason)); + $logger->error($message); + + return P\Create::rejectionFor($reason); + } + ); + }; + }; + } + + /** + * This middleware adds a default content-type if possible, a default + * content-length or transfer-encoding header, and the expect header. + */ + public static function prepareBody(): callable + { + return static function (callable $handler): PrepareBodyMiddleware { + return new PrepareBodyMiddleware($handler); + }; + } + + /** + * Middleware that applies a map function to the request before passing to + * the next handler. + * + * @param callable $fn Function that accepts a RequestInterface and returns + * a RequestInterface. + */ + public static function mapRequest(callable $fn): callable + { + return static function (callable $handler) use ($fn): callable { + return static function (RequestInterface $request, array $options) use ($handler, $fn) { + return $handler($fn($request), $options); + }; + }; + } + + /** + * Middleware that applies a map function to the resolved promise's + * response. + * + * @param callable $fn Function that accepts a ResponseInterface and + * returns a ResponseInterface. + */ + public static function mapResponse(callable $fn): callable + { + return static function (callable $handler) use ($fn): callable { + return static function (RequestInterface $request, array $options) use ($handler, $fn) { + return $handler($request, $options)->then($fn); + }; + }; + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Pool.php b/vendor/guzzlehttp/guzzle/src/Pool.php new file mode 100644 index 0000000..6277c61 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Pool.php @@ -0,0 +1,125 @@ + $rfn) { + if ($rfn instanceof RequestInterface) { + yield $key => $client->sendAsync($rfn, $opts); + } elseif (\is_callable($rfn)) { + yield $key => $rfn($opts); + } else { + throw new \InvalidArgumentException('Each value yielded by the iterator must be a Psr7\Http\Message\RequestInterface or a callable that returns a promise that fulfills with a Psr7\Message\Http\ResponseInterface object.'); + } + } + }; + + $this->each = new EachPromise($requests(), $config); + } + + /** + * Get promise + */ + public function promise(): PromiseInterface + { + return $this->each->promise(); + } + + /** + * Sends multiple requests concurrently and returns an array of responses + * and exceptions that uses the same ordering as the provided requests. + * + * IMPORTANT: This method keeps every request and response in memory, and + * as such, is NOT recommended when sending a large number or an + * indeterminate number of requests concurrently. + * + * @param ClientInterface $client Client used to send the requests + * @param array|\Iterator $requests Requests to send concurrently. + * @param array $options Passes through the options available in + * {@see \GuzzleHttp\Pool::__construct} + * + * @return array Returns an array containing the response or an exception + * in the same order that the requests were sent. + * + * @throws \InvalidArgumentException if the event format is incorrect. + */ + public static function batch(ClientInterface $client, $requests, array $options = []): array + { + $res = []; + self::cmpCallback($options, 'fulfilled', $res); + self::cmpCallback($options, 'rejected', $res); + $pool = new static($client, $requests, $options); + $pool->promise()->wait(); + \ksort($res); + + return $res; + } + + /** + * Execute callback(s) + */ + private static function cmpCallback(array &$options, string $name, array &$results): void + { + if (!isset($options[$name])) { + $options[$name] = static function ($v, $k) use (&$results) { + $results[$k] = $v; + }; + } else { + $currentFn = $options[$name]; + $options[$name] = static function ($v, $k) use (&$results, $currentFn) { + $currentFn($v, $k); + $results[$k] = $v; + }; + } + } +} diff --git a/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php b/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php new file mode 100644 index 0000000..7dde6c5 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php @@ -0,0 +1,105 @@ +nextHandler = $nextHandler; + } + + public function __invoke(RequestInterface $request, array $options): PromiseInterface + { + $fn = $this->nextHandler; + + // Don't do anything if the request has no body. + if ($request->getBody()->getSize() === 0) { + return $fn($request, $options); + } + + $modify = []; + + // Add a default content-type if possible. + if (!$request->hasHeader('Content-Type')) { + if ($uri = $request->getBody()->getMetadata('uri')) { + if (is_string($uri) && $type = Psr7\MimeType::fromFilename($uri)) { + $modify['set_headers']['Content-Type'] = $type; + } + } + } + + // Add a default content-length or transfer-encoding header. + if (!$request->hasHeader('Content-Length') + && !$request->hasHeader('Transfer-Encoding') + ) { + $size = $request->getBody()->getSize(); + if ($size !== null) { + $modify['set_headers']['Content-Length'] = $size; + } else { + $modify['set_headers']['Transfer-Encoding'] = 'chunked'; + } + } + + // Add the expect header if needed. + $this->addExpectHeader($request, $options, $modify); + + return $fn(Psr7\Utils::modifyRequest($request, $modify), $options); + } + + /** + * Add expect header + */ + private function addExpectHeader(RequestInterface $request, array $options, array &$modify): void + { + // Determine if the Expect header should be used + if ($request->hasHeader('Expect')) { + return; + } + + $expect = $options['expect'] ?? null; + + // Return if disabled or using HTTP/1.0 + if ($expect === false || $request->getProtocolVersion() === '1.0') { + return; + } + + // The expect header is unconditionally enabled + if ($expect === true) { + $modify['set_headers']['Expect'] = '100-Continue'; + + return; + } + + // By default, send the expect header when the payload is > 1mb + if ($expect === null) { + $expect = 1048576; + } + + // Always add if the body cannot be rewound, the size cannot be + // determined, or the size is greater than the cutoff threshold + $body = $request->getBody(); + $size = $body->getSize(); + + if ($size === null || $size >= (int) $expect || !$body->isSeekable()) { + $modify['set_headers']['Expect'] = '100-Continue'; + } + } +} diff --git a/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php b/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php new file mode 100644 index 0000000..7aa21a6 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php @@ -0,0 +1,228 @@ + 5, + 'protocols' => ['http', 'https'], + 'strict' => false, + 'referer' => false, + 'track_redirects' => false, + ]; + + /** + * @var callable(RequestInterface, array): PromiseInterface + */ + private $nextHandler; + + /** + * @param callable(RequestInterface, array): PromiseInterface $nextHandler Next handler to invoke. + */ + public function __construct(callable $nextHandler) + { + $this->nextHandler = $nextHandler; + } + + public function __invoke(RequestInterface $request, array $options): PromiseInterface + { + $fn = $this->nextHandler; + + if (empty($options['allow_redirects'])) { + return $fn($request, $options); + } + + if ($options['allow_redirects'] === true) { + $options['allow_redirects'] = self::$defaultSettings; + } elseif (!\is_array($options['allow_redirects'])) { + throw new \InvalidArgumentException('allow_redirects must be true, false, or array'); + } else { + // Merge the default settings with the provided settings + $options['allow_redirects'] += self::$defaultSettings; + } + + if (empty($options['allow_redirects']['max'])) { + return $fn($request, $options); + } + + return $fn($request, $options) + ->then(function (ResponseInterface $response) use ($request, $options) { + return $this->checkRedirect($request, $options, $response); + }); + } + + /** + * @return ResponseInterface|PromiseInterface + */ + public function checkRedirect(RequestInterface $request, array $options, ResponseInterface $response) + { + if (\strpos((string) $response->getStatusCode(), '3') !== 0 + || !$response->hasHeader('Location') + ) { + return $response; + } + + $this->guardMax($request, $response, $options); + $nextRequest = $this->modifyRequest($request, $options, $response); + + // If authorization is handled by curl, unset it if URI is cross-origin. + if (Psr7\UriComparator::isCrossOrigin($request->getUri(), $nextRequest->getUri()) && defined('\CURLOPT_HTTPAUTH')) { + unset( + $options['curl'][\CURLOPT_HTTPAUTH], + $options['curl'][\CURLOPT_USERPWD] + ); + } + + if (isset($options['allow_redirects']['on_redirect'])) { + ($options['allow_redirects']['on_redirect'])( + $request, + $response, + $nextRequest->getUri() + ); + } + + $promise = $this($nextRequest, $options); + + // Add headers to be able to track history of redirects. + if (!empty($options['allow_redirects']['track_redirects'])) { + return $this->withTracking( + $promise, + (string) $nextRequest->getUri(), + $response->getStatusCode() + ); + } + + return $promise; + } + + /** + * Enable tracking on promise. + */ + private function withTracking(PromiseInterface $promise, string $uri, int $statusCode): PromiseInterface + { + return $promise->then( + static function (ResponseInterface $response) use ($uri, $statusCode) { + // Note that we are pushing to the front of the list as this + // would be an earlier response than what is currently present + // in the history header. + $historyHeader = $response->getHeader(self::HISTORY_HEADER); + $statusHeader = $response->getHeader(self::STATUS_HISTORY_HEADER); + \array_unshift($historyHeader, $uri); + \array_unshift($statusHeader, (string) $statusCode); + + return $response->withHeader(self::HISTORY_HEADER, $historyHeader) + ->withHeader(self::STATUS_HISTORY_HEADER, $statusHeader); + } + ); + } + + /** + * Check for too many redirects. + * + * @throws TooManyRedirectsException Too many redirects. + */ + private function guardMax(RequestInterface $request, ResponseInterface $response, array &$options): void + { + $current = $options['__redirect_count'] + ?? 0; + $options['__redirect_count'] = $current + 1; + $max = $options['allow_redirects']['max']; + + if ($options['__redirect_count'] > $max) { + throw new TooManyRedirectsException("Will not follow more than {$max} redirects", $request, $response); + } + } + + public function modifyRequest(RequestInterface $request, array $options, ResponseInterface $response): RequestInterface + { + // Request modifications to apply. + $modify = []; + $protocols = $options['allow_redirects']['protocols']; + + // Use a GET request if this is an entity enclosing request and we are + // not forcing RFC compliance, but rather emulating what all browsers + // would do. + $statusCode = $response->getStatusCode(); + if ($statusCode == 303 + || ($statusCode <= 302 && !$options['allow_redirects']['strict']) + ) { + $safeMethods = ['GET', 'HEAD', 'OPTIONS']; + $requestMethod = $request->getMethod(); + + $modify['method'] = in_array($requestMethod, $safeMethods) ? $requestMethod : 'GET'; + $modify['body'] = ''; + } + + $uri = self::redirectUri($request, $response, $protocols); + if (isset($options['idn_conversion']) && ($options['idn_conversion'] !== false)) { + $idnOptions = ($options['idn_conversion'] === true) ? \IDNA_DEFAULT : $options['idn_conversion']; + $uri = Utils::idnUriConvert($uri, $idnOptions); + } + + $modify['uri'] = $uri; + Psr7\Message::rewindBody($request); + + // Add the Referer header if it is told to do so and only + // add the header if we are not redirecting from https to http. + if ($options['allow_redirects']['referer'] + && $modify['uri']->getScheme() === $request->getUri()->getScheme() + ) { + $uri = $request->getUri()->withUserInfo(''); + $modify['set_headers']['Referer'] = (string) $uri; + } else { + $modify['remove_headers'][] = 'Referer'; + } + + // Remove Authorization and Cookie headers if URI is cross-origin. + if (Psr7\UriComparator::isCrossOrigin($request->getUri(), $modify['uri'])) { + $modify['remove_headers'][] = 'Authorization'; + $modify['remove_headers'][] = 'Cookie'; + } + + return Psr7\Utils::modifyRequest($request, $modify); + } + + /** + * Set the appropriate URL on the request based on the location header. + */ + private static function redirectUri( + RequestInterface $request, + ResponseInterface $response, + array $protocols + ): UriInterface { + $location = Psr7\UriResolver::resolve( + $request->getUri(), + new Psr7\Uri($response->getHeaderLine('Location')) + ); + + // Ensure that the redirect URI is allowed based on the protocols. + if (!\in_array($location->getScheme(), $protocols)) { + throw new BadResponseException(\sprintf('Redirect URI, %s, does not use one of the allowed redirect protocols: %s', $location, \implode(', ', $protocols)), $request, $response); + } + + return $location; + } +} diff --git a/vendor/guzzlehttp/guzzle/src/RequestOptions.php b/vendor/guzzlehttp/guzzle/src/RequestOptions.php new file mode 100644 index 0000000..84a3500 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/RequestOptions.php @@ -0,0 +1,274 @@ +decider = $decider; + $this->nextHandler = $nextHandler; + $this->delay = $delay ?: __CLASS__.'::exponentialDelay'; + } + + /** + * Default exponential backoff delay function. + * + * @return int milliseconds. + */ + public static function exponentialDelay(int $retries): int + { + return (int) 2 ** ($retries - 1) * 1000; + } + + public function __invoke(RequestInterface $request, array $options): PromiseInterface + { + if (!isset($options['retries'])) { + $options['retries'] = 0; + } + + $fn = $this->nextHandler; + + return $fn($request, $options) + ->then( + $this->onFulfilled($request, $options), + $this->onRejected($request, $options) + ); + } + + /** + * Execute fulfilled closure + */ + private function onFulfilled(RequestInterface $request, array $options): callable + { + return function ($value) use ($request, $options) { + if (!($this->decider)( + $options['retries'], + $request, + $value, + null + )) { + return $value; + } + + return $this->doRetry($request, $options, $value); + }; + } + + /** + * Execute rejected closure + */ + private function onRejected(RequestInterface $req, array $options): callable + { + return function ($reason) use ($req, $options) { + if (!($this->decider)( + $options['retries'], + $req, + null, + $reason + )) { + return P\Create::rejectionFor($reason); + } + + return $this->doRetry($req, $options); + }; + } + + private function doRetry(RequestInterface $request, array $options, ?ResponseInterface $response = null): PromiseInterface + { + $options['delay'] = ($this->delay)(++$options['retries'], $response, $request); + + return $this($request, $options); + } +} diff --git a/vendor/guzzlehttp/guzzle/src/TransferStats.php b/vendor/guzzlehttp/guzzle/src/TransferStats.php new file mode 100644 index 0000000..93fa334 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/TransferStats.php @@ -0,0 +1,133 @@ +request = $request; + $this->response = $response; + $this->transferTime = $transferTime; + $this->handlerErrorData = $handlerErrorData; + $this->handlerStats = $handlerStats; + } + + public function getRequest(): RequestInterface + { + return $this->request; + } + + /** + * Returns the response that was received (if any). + */ + public function getResponse(): ?ResponseInterface + { + return $this->response; + } + + /** + * Returns true if a response was received. + */ + public function hasResponse(): bool + { + return $this->response !== null; + } + + /** + * Gets handler specific error data. + * + * This might be an exception, a integer representing an error code, or + * anything else. Relying on this value assumes that you know what handler + * you are using. + * + * @return mixed + */ + public function getHandlerErrorData() + { + return $this->handlerErrorData; + } + + /** + * Get the effective URI the request was sent to. + */ + public function getEffectiveUri(): UriInterface + { + return $this->request->getUri(); + } + + /** + * Get the estimated time the request was being transferred by the handler. + * + * @return float|null Time in seconds. + */ + public function getTransferTime(): ?float + { + return $this->transferTime; + } + + /** + * Gets an array of all of the handler specific transfer data. + */ + public function getHandlerStats(): array + { + return $this->handlerStats; + } + + /** + * Get a specific handler statistic from the handler by name. + * + * @param string $stat Handler specific transfer stat to retrieve. + * + * @return mixed|null + */ + public function getHandlerStat(string $stat) + { + return $this->handlerStats[$stat] ?? null; + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Utils.php b/vendor/guzzlehttp/guzzle/src/Utils.php new file mode 100644 index 0000000..df52927 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Utils.php @@ -0,0 +1,384 @@ += 0) { + if (\function_exists('curl_multi_exec') && \function_exists('curl_exec')) { + $handler = Proxy::wrapSync(new CurlMultiHandler(), new CurlHandler()); + } elseif (\function_exists('curl_exec')) { + $handler = new CurlHandler(); + } elseif (\function_exists('curl_multi_exec')) { + $handler = new CurlMultiHandler(); + } + } + + if (\ini_get('allow_url_fopen')) { + $handler = $handler + ? Proxy::wrapStreaming($handler, new StreamHandler()) + : new StreamHandler(); + } elseif (!$handler) { + throw new \RuntimeException('GuzzleHttp requires cURL, the allow_url_fopen ini setting, or a custom HTTP handler.'); + } + + return $handler; + } + + /** + * Get the default User-Agent string to use with Guzzle. + */ + public static function defaultUserAgent(): string + { + return sprintf('GuzzleHttp/%d', ClientInterface::MAJOR_VERSION); + } + + /** + * Returns the default cacert bundle for the current system. + * + * First, the openssl.cafile and curl.cainfo php.ini settings are checked. + * If those settings are not configured, then the common locations for + * bundles found on Red Hat, CentOS, Fedora, Ubuntu, Debian, FreeBSD, OS X + * and Windows are checked. If any of these file locations are found on + * disk, they will be utilized. + * + * Note: the result of this function is cached for subsequent calls. + * + * @throws \RuntimeException if no bundle can be found. + * + * @deprecated Utils::defaultCaBundle will be removed in guzzlehttp/guzzle:8.0. This method is not needed in PHP 5.6+. + */ + public static function defaultCaBundle(): string + { + static $cached = null; + static $cafiles = [ + // Red Hat, CentOS, Fedora (provided by the ca-certificates package) + '/etc/pki/tls/certs/ca-bundle.crt', + // Ubuntu, Debian (provided by the ca-certificates package) + '/etc/ssl/certs/ca-certificates.crt', + // FreeBSD (provided by the ca_root_nss package) + '/usr/local/share/certs/ca-root-nss.crt', + // SLES 12 (provided by the ca-certificates package) + '/var/lib/ca-certificates/ca-bundle.pem', + // OS X provided by homebrew (using the default path) + '/usr/local/etc/openssl/cert.pem', + // Google app engine + '/etc/ca-certificates.crt', + // Windows? + 'C:\\windows\\system32\\curl-ca-bundle.crt', + 'C:\\windows\\curl-ca-bundle.crt', + ]; + + if ($cached) { + return $cached; + } + + if ($ca = \ini_get('openssl.cafile')) { + return $cached = $ca; + } + + if ($ca = \ini_get('curl.cainfo')) { + return $cached = $ca; + } + + foreach ($cafiles as $filename) { + if (\file_exists($filename)) { + return $cached = $filename; + } + } + + throw new \RuntimeException( + <<< EOT +No system CA bundle could be found in any of the the common system locations. +PHP versions earlier than 5.6 are not properly configured to use the system's +CA bundle by default. In order to verify peer certificates, you will need to +supply the path on disk to a certificate bundle to the 'verify' request +option: https://docs.guzzlephp.org/en/latest/request-options.html#verify. If +you do not need a specific certificate bundle, then Mozilla provides a commonly +used CA bundle which can be downloaded here (provided by the maintainer of +cURL): https://curl.haxx.se/ca/cacert.pem. Once you have a CA bundle available +on disk, you can set the 'openssl.cafile' PHP ini setting to point to the path +to the file, allowing you to omit the 'verify' request option. See +https://curl.haxx.se/docs/sslcerts.html for more information. +EOT + ); + } + + /** + * Creates an associative array of lowercase header names to the actual + * header casing. + */ + public static function normalizeHeaderKeys(array $headers): array + { + $result = []; + foreach (\array_keys($headers) as $key) { + $result[\strtolower($key)] = $key; + } + + return $result; + } + + /** + * Returns true if the provided host matches any of the no proxy areas. + * + * This method will strip a port from the host if it is present. Each pattern + * can be matched with an exact match (e.g., "foo.com" == "foo.com") or a + * partial match: (e.g., "foo.com" == "baz.foo.com" and ".foo.com" == + * "baz.foo.com", but ".foo.com" != "foo.com"). + * + * Areas are matched in the following cases: + * 1. "*" (without quotes) always matches any hosts. + * 2. An exact match. + * 3. The area starts with "." and the area is the last part of the host. e.g. + * '.mit.edu' will match any host that ends with '.mit.edu'. + * + * @param string $host Host to check against the patterns. + * @param string[] $noProxyArray An array of host patterns. + * + * @throws InvalidArgumentException + */ + public static function isHostInNoProxy(string $host, array $noProxyArray): bool + { + if (\strlen($host) === 0) { + throw new InvalidArgumentException('Empty host provided'); + } + + // Strip port if present. + [$host] = \explode(':', $host, 2); + + foreach ($noProxyArray as $area) { + // Always match on wildcards. + if ($area === '*') { + return true; + } + + if (empty($area)) { + // Don't match on empty values. + continue; + } + + if ($area === $host) { + // Exact matches. + return true; + } + // Special match if the area when prefixed with ".". Remove any + // existing leading "." and add a new leading ".". + $area = '.'.\ltrim($area, '.'); + if (\substr($host, -\strlen($area)) === $area) { + return true; + } + } + + return false; + } + + /** + * Wrapper for json_decode that throws when an error occurs. + * + * @param string $json JSON data to parse + * @param bool $assoc When true, returned objects will be converted + * into associative arrays. + * @param int $depth User specified recursion depth. + * @param int $options Bitmask of JSON decode options. + * + * @return object|array|string|int|float|bool|null + * + * @throws InvalidArgumentException if the JSON cannot be decoded. + * + * @see https://www.php.net/manual/en/function.json-decode.php + */ + public static function jsonDecode(string $json, bool $assoc = false, int $depth = 512, int $options = 0) + { + $data = \json_decode($json, $assoc, $depth, $options); + if (\JSON_ERROR_NONE !== \json_last_error()) { + throw new InvalidArgumentException('json_decode error: '.\json_last_error_msg()); + } + + return $data; + } + + /** + * Wrapper for JSON encoding that throws when an error occurs. + * + * @param mixed $value The value being encoded + * @param int $options JSON encode option bitmask + * @param int $depth Set the maximum depth. Must be greater than zero. + * + * @throws InvalidArgumentException if the JSON cannot be encoded. + * + * @see https://www.php.net/manual/en/function.json-encode.php + */ + public static function jsonEncode($value, int $options = 0, int $depth = 512): string + { + $json = \json_encode($value, $options, $depth); + if (\JSON_ERROR_NONE !== \json_last_error()) { + throw new InvalidArgumentException('json_encode error: '.\json_last_error_msg()); + } + + /** @var string */ + return $json; + } + + /** + * Wrapper for the hrtime() or microtime() functions + * (depending on the PHP version, one of the two is used) + * + * @return float UNIX timestamp + * + * @internal + */ + public static function currentTime(): float + { + return (float) \function_exists('hrtime') ? \hrtime(true) / 1e9 : \microtime(true); + } + + /** + * @throws InvalidArgumentException + * + * @internal + */ + public static function idnUriConvert(UriInterface $uri, int $options = 0): UriInterface + { + if ($uri->getHost()) { + $asciiHost = self::idnToAsci($uri->getHost(), $options, $info); + if ($asciiHost === false) { + $errorBitSet = $info['errors'] ?? 0; + + $errorConstants = array_filter(array_keys(get_defined_constants()), static function (string $name): bool { + return substr($name, 0, 11) === 'IDNA_ERROR_'; + }); + + $errors = []; + foreach ($errorConstants as $errorConstant) { + if ($errorBitSet & constant($errorConstant)) { + $errors[] = $errorConstant; + } + } + + $errorMessage = 'IDN conversion failed'; + if ($errors) { + $errorMessage .= ' (errors: '.implode(', ', $errors).')'; + } + + throw new InvalidArgumentException($errorMessage); + } + if ($uri->getHost() !== $asciiHost) { + // Replace URI only if the ASCII version is different + $uri = $uri->withHost($asciiHost); + } + } + + return $uri; + } + + /** + * @internal + */ + public static function getenv(string $name): ?string + { + if (isset($_SERVER[$name])) { + return (string) $_SERVER[$name]; + } + + if (\PHP_SAPI === 'cli' && ($value = \getenv($name)) !== false && $value !== null) { + return (string) $value; + } + + return null; + } + + /** + * @return string|false + */ + private static function idnToAsci(string $domain, int $options, ?array &$info = []) + { + if (\function_exists('idn_to_ascii') && \defined('INTL_IDNA_VARIANT_UTS46')) { + return \idn_to_ascii($domain, $options, \INTL_IDNA_VARIANT_UTS46, $info); + } + + throw new \Error('ext-idn or symfony/polyfill-intl-idn not loaded or too old'); + } +} diff --git a/vendor/guzzlehttp/guzzle/src/functions.php b/vendor/guzzlehttp/guzzle/src/functions.php new file mode 100644 index 0000000..5edc66a --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/functions.php @@ -0,0 +1,167 @@ + +Copyright (c) 2015 Graham Campbell +Copyright (c) 2017 Tobias Schultze +Copyright (c) 2020 Tobias Nyholm + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/guzzlehttp/promises/README.md b/vendor/guzzlehttp/promises/README.md new file mode 100644 index 0000000..d1c814f --- /dev/null +++ b/vendor/guzzlehttp/promises/README.md @@ -0,0 +1,559 @@ +# Guzzle Promises + +[Promises/A+](https://promisesaplus.com/) implementation that handles promise +chaining and resolution iteratively, allowing for "infinite" promise chaining +while keeping the stack size constant. Read [this blog post](https://blog.domenic.me/youre-missing-the-point-of-promises/) +for a general introduction to promises. + +- [Features](#features) +- [Quick start](#quick-start) +- [Synchronous wait](#synchronous-wait) +- [Cancellation](#cancellation) +- [API](#api) + - [Promise](#promise) + - [FulfilledPromise](#fulfilledpromise) + - [RejectedPromise](#rejectedpromise) +- [Promise interop](#promise-interop) +- [Implementation notes](#implementation-notes) + + +## Features + +- [Promises/A+](https://promisesaplus.com/) implementation. +- Promise resolution and chaining is handled iteratively, allowing for + "infinite" promise chaining. +- Promises have a synchronous `wait` method. +- Promises can be cancelled. +- Works with any object that has a `then` function. +- C# style async/await coroutine promises using + `GuzzleHttp\Promise\Coroutine::of()`. + + +## Installation + +```shell +composer require guzzlehttp/promises +``` + + +## Version Guidance + +| Version | Status | PHP Version | +|---------|---------------------|--------------| +| 1.x | Security fixes only | >=5.5,<8.3 | +| 2.x | Latest | >=7.2.5,<8.5 | + + +## Quick Start + +A *promise* represents the eventual result of an asynchronous operation. The +primary way of interacting with a promise is through its `then` method, which +registers callbacks to receive either a promise's eventual value or the reason +why the promise cannot be fulfilled. + +### Callbacks + +Callbacks are registered with the `then` method by providing an optional +`$onFulfilled` followed by an optional `$onRejected` function. + + +```php +use GuzzleHttp\Promise\Promise; + +$promise = new Promise(); +$promise->then( + // $onFulfilled + function ($value) { + echo 'The promise was fulfilled.'; + }, + // $onRejected + function ($reason) { + echo 'The promise was rejected.'; + } +); +``` + +*Resolving* a promise means that you either fulfill a promise with a *value* or +reject a promise with a *reason*. Resolving a promise triggers callbacks +registered with the promise's `then` method. These callbacks are triggered +only once and in the order in which they were added. + +### Resolving a Promise + +Promises are fulfilled using the `resolve($value)` method. Resolving a promise +with any value other than a `GuzzleHttp\Promise\RejectedPromise` will trigger +all of the onFulfilled callbacks (resolving a promise with a rejected promise +will reject the promise and trigger the `$onRejected` callbacks). + +```php +use GuzzleHttp\Promise\Promise; + +$promise = new Promise(); +$promise + ->then(function ($value) { + // Return a value and don't break the chain + return "Hello, " . $value; + }) + // This then is executed after the first then and receives the value + // returned from the first then. + ->then(function ($value) { + echo $value; + }); + +// Resolving the promise triggers the $onFulfilled callbacks and outputs +// "Hello, reader." +$promise->resolve('reader.'); +``` + +### Promise Forwarding + +Promises can be chained one after the other. Each then in the chain is a new +promise. The return value of a promise is what's forwarded to the next +promise in the chain. Returning a promise in a `then` callback will cause the +subsequent promises in the chain to only be fulfilled when the returned promise +has been fulfilled. The next promise in the chain will be invoked with the +resolved value of the promise. + +```php +use GuzzleHttp\Promise\Promise; + +$promise = new Promise(); +$nextPromise = new Promise(); + +$promise + ->then(function ($value) use ($nextPromise) { + echo $value; + return $nextPromise; + }) + ->then(function ($value) { + echo $value; + }); + +// Triggers the first callback and outputs "A" +$promise->resolve('A'); +// Triggers the second callback and outputs "B" +$nextPromise->resolve('B'); +``` + +### Promise Rejection + +When a promise is rejected, the `$onRejected` callbacks are invoked with the +rejection reason. + +```php +use GuzzleHttp\Promise\Promise; + +$promise = new Promise(); +$promise->then(null, function ($reason) { + echo $reason; +}); + +$promise->reject('Error!'); +// Outputs "Error!" +``` + +### Rejection Forwarding + +If an exception is thrown in an `$onRejected` callback, subsequent +`$onRejected` callbacks are invoked with the thrown exception as the reason. + +```php +use GuzzleHttp\Promise\Promise; + +$promise = new Promise(); +$promise->then(null, function ($reason) { + throw new Exception($reason); +})->then(null, function ($reason) { + assert($reason->getMessage() === 'Error!'); +}); + +$promise->reject('Error!'); +``` + +You can also forward a rejection down the promise chain by returning a +`GuzzleHttp\Promise\RejectedPromise` in either an `$onFulfilled` or +`$onRejected` callback. + +```php +use GuzzleHttp\Promise\Promise; +use GuzzleHttp\Promise\RejectedPromise; + +$promise = new Promise(); +$promise->then(null, function ($reason) { + return new RejectedPromise($reason); +})->then(null, function ($reason) { + assert($reason === 'Error!'); +}); + +$promise->reject('Error!'); +``` + +If an exception is not thrown in a `$onRejected` callback and the callback +does not return a rejected promise, downstream `$onFulfilled` callbacks are +invoked using the value returned from the `$onRejected` callback. + +```php +use GuzzleHttp\Promise\Promise; + +$promise = new Promise(); +$promise + ->then(null, function ($reason) { + return "It's ok"; + }) + ->then(function ($value) { + assert($value === "It's ok"); + }); + +$promise->reject('Error!'); +``` + + +## Synchronous Wait + +You can synchronously force promises to complete using a promise's `wait` +method. When creating a promise, you can provide a wait function that is used +to synchronously force a promise to complete. When a wait function is invoked +it is expected to deliver a value to the promise or reject the promise. If the +wait function does not deliver a value, then an exception is thrown. The wait +function provided to a promise constructor is invoked when the `wait` function +of the promise is called. + +```php +$promise = new Promise(function () use (&$promise) { + $promise->resolve('foo'); +}); + +// Calling wait will return the value of the promise. +echo $promise->wait(); // outputs "foo" +``` + +If an exception is encountered while invoking the wait function of a promise, +the promise is rejected with the exception and the exception is thrown. + +```php +$promise = new Promise(function () use (&$promise) { + throw new Exception('foo'); +}); + +$promise->wait(); // throws the exception. +``` + +Calling `wait` on a promise that has been fulfilled will not trigger the wait +function. It will simply return the previously resolved value. + +```php +$promise = new Promise(function () { die('this is not called!'); }); +$promise->resolve('foo'); +echo $promise->wait(); // outputs "foo" +``` + +Calling `wait` on a promise that has been rejected will throw an exception. If +the rejection reason is an instance of `\Exception` the reason is thrown. +Otherwise, a `GuzzleHttp\Promise\RejectionException` is thrown and the reason +can be obtained by calling the `getReason` method of the exception. + +```php +$promise = new Promise(); +$promise->reject('foo'); +$promise->wait(); +``` + +> PHP Fatal error: Uncaught exception 'GuzzleHttp\Promise\RejectionException' with message 'The promise was rejected with value: foo' + +### Unwrapping a Promise + +When synchronously waiting on a promise, you are joining the state of the +promise into the current state of execution (i.e., return the value of the +promise if it was fulfilled or throw an exception if it was rejected). This is +called "unwrapping" the promise. Waiting on a promise will by default unwrap +the promise state. + +You can force a promise to resolve and *not* unwrap the state of the promise +by passing `false` to the first argument of the `wait` function: + +```php +$promise = new Promise(); +$promise->reject('foo'); +// This will not throw an exception. It simply ensures the promise has +// been resolved. +$promise->wait(false); +``` + +When unwrapping a promise, the resolved value of the promise will be waited +upon until the unwrapped value is not a promise. This means that if you resolve +promise A with a promise B and unwrap promise A, the value returned by the +wait function will be the value delivered to promise B. + +**Note**: when you do not unwrap the promise, no value is returned. + + +## Cancellation + +You can cancel a promise that has not yet been fulfilled using the `cancel()` +method of a promise. When creating a promise you can provide an optional +cancel function that when invoked cancels the action of computing a resolution +of the promise. + + +## API + +### Promise + +When creating a promise object, you can provide an optional `$waitFn` and +`$cancelFn`. `$waitFn` is a function that is invoked with no arguments and is +expected to resolve the promise. `$cancelFn` is a function with no arguments +that is expected to cancel the computation of a promise. It is invoked when the +`cancel()` method of a promise is called. + +```php +use GuzzleHttp\Promise\Promise; + +$promise = new Promise( + function () use (&$promise) { + $promise->resolve('waited'); + }, + function () { + // do something that will cancel the promise computation (e.g., close + // a socket, cancel a database query, etc...) + } +); + +assert('waited' === $promise->wait()); +``` + +A promise has the following methods: + +- `then(callable $onFulfilled, callable $onRejected) : PromiseInterface` + + Appends fulfillment and rejection handlers to the promise, and returns a new promise resolving to the return value of the called handler. + +- `otherwise(callable $onRejected) : PromiseInterface` + + Appends a rejection handler callback to the promise, and returns a new promise resolving to the return value of the callback if it is called, or to its original fulfillment value if the promise is instead fulfilled. + +- `wait($unwrap = true) : mixed` + + Synchronously waits on the promise to complete. + + `$unwrap` controls whether or not the value of the promise is returned for a + fulfilled promise or if an exception is thrown if the promise is rejected. + This is set to `true` by default. + +- `cancel()` + + Attempts to cancel the promise if possible. The promise being cancelled and + the parent most ancestor that has not yet been resolved will also be + cancelled. Any promises waiting on the cancelled promise to resolve will also + be cancelled. + +- `getState() : string` + + Returns the state of the promise. One of `pending`, `fulfilled`, or + `rejected`. + +- `resolve($value)` + + Fulfills the promise with the given `$value`. + +- `reject($reason)` + + Rejects the promise with the given `$reason`. + + +### FulfilledPromise + +A fulfilled promise can be created to represent a promise that has been +fulfilled. + +```php +use GuzzleHttp\Promise\FulfilledPromise; + +$promise = new FulfilledPromise('value'); + +// Fulfilled callbacks are immediately invoked. +$promise->then(function ($value) { + echo $value; +}); +``` + + +### RejectedPromise + +A rejected promise can be created to represent a promise that has been +rejected. + +```php +use GuzzleHttp\Promise\RejectedPromise; + +$promise = new RejectedPromise('Error'); + +// Rejected callbacks are immediately invoked. +$promise->then(null, function ($reason) { + echo $reason; +}); +``` + + +## Promise Interoperability + +This library works with foreign promises that have a `then` method. This means +you can use Guzzle promises with [React promises](https://github.com/reactphp/promise) +for example. When a foreign promise is returned inside of a then method +callback, promise resolution will occur recursively. + +```php +// Create a React promise +$deferred = new React\Promise\Deferred(); +$reactPromise = $deferred->promise(); + +// Create a Guzzle promise that is fulfilled with a React promise. +$guzzlePromise = new GuzzleHttp\Promise\Promise(); +$guzzlePromise->then(function ($value) use ($reactPromise) { + // Do something something with the value... + // Return the React promise + return $reactPromise; +}); +``` + +Please note that wait and cancel chaining is no longer possible when forwarding +a foreign promise. You will need to wrap a third-party promise with a Guzzle +promise in order to utilize wait and cancel functions with foreign promises. + + +### Event Loop Integration + +In order to keep the stack size constant, Guzzle promises are resolved +asynchronously using a task queue. When waiting on promises synchronously, the +task queue will be automatically run to ensure that the blocking promise and +any forwarded promises are resolved. When using promises asynchronously in an +event loop, you will need to run the task queue on each tick of the loop. If +you do not run the task queue, then promises will not be resolved. + +You can run the task queue using the `run()` method of the global task queue +instance. + +```php +// Get the global task queue +$queue = GuzzleHttp\Promise\Utils::queue(); +$queue->run(); +``` + +For example, you could use Guzzle promises with React using a periodic timer: + +```php +$loop = React\EventLoop\Factory::create(); +$loop->addPeriodicTimer(0, [$queue, 'run']); +``` + + +## Implementation Notes + +### Promise Resolution and Chaining is Handled Iteratively + +By shuffling pending handlers from one owner to another, promises are +resolved iteratively, allowing for "infinite" then chaining. + +```php +then(function ($v) { + // The stack size remains constant (a good thing) + echo xdebug_get_stack_depth() . ', '; + return $v + 1; + }); +} + +$parent->resolve(0); +var_dump($p->wait()); // int(1000) + +``` + +When a promise is fulfilled or rejected with a non-promise value, the promise +then takes ownership of the handlers of each child promise and delivers values +down the chain without using recursion. + +When a promise is resolved with another promise, the original promise transfers +all of its pending handlers to the new promise. When the new promise is +eventually resolved, all of the pending handlers are delivered the forwarded +value. + +### A Promise is the Deferred + +Some promise libraries implement promises using a deferred object to represent +a computation and a promise object to represent the delivery of the result of +the computation. This is a nice separation of computation and delivery because +consumers of the promise cannot modify the value that will be eventually +delivered. + +One side effect of being able to implement promise resolution and chaining +iteratively is that you need to be able for one promise to reach into the state +of another promise to shuffle around ownership of handlers. In order to achieve +this without making the handlers of a promise publicly mutable, a promise is +also the deferred value, allowing promises of the same parent class to reach +into and modify the private properties of promises of the same type. While this +does allow consumers of the value to modify the resolution or rejection of the +deferred, it is a small price to pay for keeping the stack size constant. + +```php +$promise = new Promise(); +$promise->then(function ($value) { echo $value; }); +// The promise is the deferred value, so you can deliver a value to it. +$promise->resolve('foo'); +// prints "foo" +``` + + +## Upgrading from Function API + +A static API was first introduced in 1.4.0, in order to mitigate problems with +functions conflicting between global and local copies of the package. The +function API was removed in 2.0.0. A migration table has been provided here for +your convenience: + +| Original Function | Replacement Method | +|----------------|----------------| +| `queue` | `Utils::queue` | +| `task` | `Utils::task` | +| `promise_for` | `Create::promiseFor` | +| `rejection_for` | `Create::rejectionFor` | +| `exception_for` | `Create::exceptionFor` | +| `iter_for` | `Create::iterFor` | +| `inspect` | `Utils::inspect` | +| `inspect_all` | `Utils::inspectAll` | +| `unwrap` | `Utils::unwrap` | +| `all` | `Utils::all` | +| `some` | `Utils::some` | +| `any` | `Utils::any` | +| `settle` | `Utils::settle` | +| `each` | `Each::of` | +| `each_limit` | `Each::ofLimit` | +| `each_limit_all` | `Each::ofLimitAll` | +| `!is_fulfilled` | `Is::pending` | +| `is_fulfilled` | `Is::fulfilled` | +| `is_rejected` | `Is::rejected` | +| `is_settled` | `Is::settled` | +| `coroutine` | `Coroutine::of` | + + +## Security + +If you discover a security vulnerability within this package, please send an email to security@tidelift.com. All security vulnerabilities will be promptly addressed. Please do not disclose security-related issues publicly until a fix has been announced. Please see [Security Policy](https://github.com/guzzle/promises/security/policy) for more information. + + +## License + +Guzzle is made available under the MIT License (MIT). Please see [License File](LICENSE) for more information. + + +## For Enterprise + +Available as part of the Tidelift Subscription + +The maintainers of Guzzle and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/packagist-guzzlehttp-promises?utm_source=packagist-guzzlehttp-promises&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) diff --git a/vendor/guzzlehttp/promises/composer.json b/vendor/guzzlehttp/promises/composer.json new file mode 100644 index 0000000..f64ed77 --- /dev/null +++ b/vendor/guzzlehttp/promises/composer.json @@ -0,0 +1,58 @@ +{ + "name": "guzzlehttp/promises", + "description": "Guzzle promises library", + "keywords": ["promise"], + "license": "MIT", + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "require": { + "php": "^7.2.5 || ^8.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.39 || ^9.6.20" + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "GuzzleHttp\\Promise\\Tests\\": "tests/" + } + }, + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "config": { + "allow-plugins": { + "bamarni/composer-bin-plugin": true + }, + "preferred-install": "dist", + "sort-packages": true + } +} diff --git a/vendor/guzzlehttp/promises/src/AggregateException.php b/vendor/guzzlehttp/promises/src/AggregateException.php new file mode 100644 index 0000000..40ffdbc --- /dev/null +++ b/vendor/guzzlehttp/promises/src/AggregateException.php @@ -0,0 +1,19 @@ +then(function ($v) { echo $v; }); + * + * @param callable $generatorFn Generator function to wrap into a promise. + * + * @return Promise + * + * @see https://github.com/petkaantonov/bluebird/blob/master/API.md#generators inspiration + */ +final class Coroutine implements PromiseInterface +{ + /** + * @var PromiseInterface|null + */ + private $currentPromise; + + /** + * @var Generator + */ + private $generator; + + /** + * @var Promise + */ + private $result; + + public function __construct(callable $generatorFn) + { + $this->generator = $generatorFn(); + $this->result = new Promise(function (): void { + while (isset($this->currentPromise)) { + $this->currentPromise->wait(); + } + }); + try { + $this->nextCoroutine($this->generator->current()); + } catch (Throwable $throwable) { + $this->result->reject($throwable); + } + } + + /** + * Create a new coroutine. + */ + public static function of(callable $generatorFn): self + { + return new self($generatorFn); + } + + public function then( + ?callable $onFulfilled = null, + ?callable $onRejected = null + ): PromiseInterface { + return $this->result->then($onFulfilled, $onRejected); + } + + public function otherwise(callable $onRejected): PromiseInterface + { + return $this->result->otherwise($onRejected); + } + + public function wait(bool $unwrap = true) + { + return $this->result->wait($unwrap); + } + + public function getState(): string + { + return $this->result->getState(); + } + + public function resolve($value): void + { + $this->result->resolve($value); + } + + public function reject($reason): void + { + $this->result->reject($reason); + } + + public function cancel(): void + { + $this->currentPromise->cancel(); + $this->result->cancel(); + } + + private function nextCoroutine($yielded): void + { + $this->currentPromise = Create::promiseFor($yielded) + ->then([$this, '_handleSuccess'], [$this, '_handleFailure']); + } + + /** + * @internal + */ + public function _handleSuccess($value): void + { + unset($this->currentPromise); + try { + $next = $this->generator->send($value); + if ($this->generator->valid()) { + $this->nextCoroutine($next); + } else { + $this->result->resolve($value); + } + } catch (Throwable $throwable) { + $this->result->reject($throwable); + } + } + + /** + * @internal + */ + public function _handleFailure($reason): void + { + unset($this->currentPromise); + try { + $nextYield = $this->generator->throw(Create::exceptionFor($reason)); + // The throw was caught, so keep iterating on the coroutine + $this->nextCoroutine($nextYield); + } catch (Throwable $throwable) { + $this->result->reject($throwable); + } + } +} diff --git a/vendor/guzzlehttp/promises/src/Create.php b/vendor/guzzlehttp/promises/src/Create.php new file mode 100644 index 0000000..9d3fc4a --- /dev/null +++ b/vendor/guzzlehttp/promises/src/Create.php @@ -0,0 +1,79 @@ +then([$promise, 'resolve'], [$promise, 'reject']); + + return $promise; + } + + return new FulfilledPromise($value); + } + + /** + * Creates a rejected promise for a reason if the reason is not a promise. + * If the provided reason is a promise, then it is returned as-is. + * + * @param mixed $reason Promise or reason. + */ + public static function rejectionFor($reason): PromiseInterface + { + if ($reason instanceof PromiseInterface) { + return $reason; + } + + return new RejectedPromise($reason); + } + + /** + * Create an exception for a rejected promise value. + * + * @param mixed $reason + */ + public static function exceptionFor($reason): \Throwable + { + if ($reason instanceof \Throwable) { + return $reason; + } + + return new RejectionException($reason); + } + + /** + * Returns an iterator for the given value. + * + * @param mixed $value + */ + public static function iterFor($value): \Iterator + { + if ($value instanceof \Iterator) { + return $value; + } + + if (is_array($value)) { + return new \ArrayIterator($value); + } + + return new \ArrayIterator([$value]); + } +} diff --git a/vendor/guzzlehttp/promises/src/Each.php b/vendor/guzzlehttp/promises/src/Each.php new file mode 100644 index 0000000..dd72c83 --- /dev/null +++ b/vendor/guzzlehttp/promises/src/Each.php @@ -0,0 +1,81 @@ + $onFulfilled, + 'rejected' => $onRejected, + ]))->promise(); + } + + /** + * Like of, but only allows a certain number of outstanding promises at any + * given time. + * + * $concurrency may be an integer or a function that accepts the number of + * pending promises and returns a numeric concurrency limit value to allow + * for dynamic a concurrency size. + * + * @param mixed $iterable + * @param int|callable $concurrency + */ + public static function ofLimit( + $iterable, + $concurrency, + ?callable $onFulfilled = null, + ?callable $onRejected = null + ): PromiseInterface { + return (new EachPromise($iterable, [ + 'fulfilled' => $onFulfilled, + 'rejected' => $onRejected, + 'concurrency' => $concurrency, + ]))->promise(); + } + + /** + * Like limit, but ensures that no promise in the given $iterable argument + * is rejected. If any promise is rejected, then the aggregate promise is + * rejected with the encountered rejection. + * + * @param mixed $iterable + * @param int|callable $concurrency + */ + public static function ofLimitAll( + $iterable, + $concurrency, + ?callable $onFulfilled = null + ): PromiseInterface { + return self::ofLimit( + $iterable, + $concurrency, + $onFulfilled, + function ($reason, $idx, PromiseInterface $aggregate): void { + $aggregate->reject($reason); + } + ); + } +} diff --git a/vendor/guzzlehttp/promises/src/EachPromise.php b/vendor/guzzlehttp/promises/src/EachPromise.php new file mode 100644 index 0000000..e123898 --- /dev/null +++ b/vendor/guzzlehttp/promises/src/EachPromise.php @@ -0,0 +1,248 @@ +iterable = Create::iterFor($iterable); + + if (isset($config['concurrency'])) { + $this->concurrency = $config['concurrency']; + } + + if (isset($config['fulfilled'])) { + $this->onFulfilled = $config['fulfilled']; + } + + if (isset($config['rejected'])) { + $this->onRejected = $config['rejected']; + } + } + + /** @psalm-suppress InvalidNullableReturnType */ + public function promise(): PromiseInterface + { + if ($this->aggregate) { + return $this->aggregate; + } + + try { + $this->createPromise(); + /** @psalm-assert Promise $this->aggregate */ + $this->iterable->rewind(); + $this->refillPending(); + } catch (\Throwable $e) { + $this->aggregate->reject($e); + } + + /** + * @psalm-suppress NullableReturnStatement + */ + return $this->aggregate; + } + + private function createPromise(): void + { + $this->mutex = false; + $this->aggregate = new Promise(function (): void { + if ($this->checkIfFinished()) { + return; + } + reset($this->pending); + // Consume a potentially fluctuating list of promises while + // ensuring that indexes are maintained (precluding array_shift). + while ($promise = current($this->pending)) { + next($this->pending); + $promise->wait(); + if (Is::settled($this->aggregate)) { + return; + } + } + }); + + // Clear the references when the promise is resolved. + $clearFn = function (): void { + $this->iterable = $this->concurrency = $this->pending = null; + $this->onFulfilled = $this->onRejected = null; + $this->nextPendingIndex = 0; + }; + + $this->aggregate->then($clearFn, $clearFn); + } + + private function refillPending(): void + { + if (!$this->concurrency) { + // Add all pending promises. + while ($this->addPending() && $this->advanceIterator()) { + } + + return; + } + + // Add only up to N pending promises. + $concurrency = is_callable($this->concurrency) + ? ($this->concurrency)(count($this->pending)) + : $this->concurrency; + $concurrency = max($concurrency - count($this->pending), 0); + // Concurrency may be set to 0 to disallow new promises. + if (!$concurrency) { + return; + } + // Add the first pending promise. + $this->addPending(); + // Note this is special handling for concurrency=1 so that we do + // not advance the iterator after adding the first promise. This + // helps work around issues with generators that might not have the + // next value to yield until promise callbacks are called. + while (--$concurrency + && $this->advanceIterator() + && $this->addPending()) { + } + } + + private function addPending(): bool + { + if (!$this->iterable || !$this->iterable->valid()) { + return false; + } + + $promise = Create::promiseFor($this->iterable->current()); + $key = $this->iterable->key(); + + // Iterable keys may not be unique, so we use a counter to + // guarantee uniqueness + $idx = $this->nextPendingIndex++; + + $this->pending[$idx] = $promise->then( + function ($value) use ($idx, $key): void { + if ($this->onFulfilled) { + ($this->onFulfilled)( + $value, + $key, + $this->aggregate + ); + } + $this->step($idx); + }, + function ($reason) use ($idx, $key): void { + if ($this->onRejected) { + ($this->onRejected)( + $reason, + $key, + $this->aggregate + ); + } + $this->step($idx); + } + ); + + return true; + } + + private function advanceIterator(): bool + { + // Place a lock on the iterator so that we ensure to not recurse, + // preventing fatal generator errors. + if ($this->mutex) { + return false; + } + + $this->mutex = true; + + try { + $this->iterable->next(); + $this->mutex = false; + + return true; + } catch (\Throwable $e) { + $this->aggregate->reject($e); + $this->mutex = false; + + return false; + } + } + + private function step(int $idx): void + { + // If the promise was already resolved, then ignore this step. + if (Is::settled($this->aggregate)) { + return; + } + + unset($this->pending[$idx]); + + // Only refill pending promises if we are not locked, preventing the + // EachPromise to recursively invoke the provided iterator, which + // cause a fatal error: "Cannot resume an already running generator" + if ($this->advanceIterator() && !$this->checkIfFinished()) { + // Add more pending promises if possible. + $this->refillPending(); + } + } + + private function checkIfFinished(): bool + { + if (!$this->pending && !$this->iterable->valid()) { + // Resolve the promise if there's nothing left to do. + $this->aggregate->resolve(null); + + return true; + } + + return false; + } +} diff --git a/vendor/guzzlehttp/promises/src/FulfilledPromise.php b/vendor/guzzlehttp/promises/src/FulfilledPromise.php new file mode 100644 index 0000000..727ec31 --- /dev/null +++ b/vendor/guzzlehttp/promises/src/FulfilledPromise.php @@ -0,0 +1,89 @@ +value = $value; + } + + public function then( + ?callable $onFulfilled = null, + ?callable $onRejected = null + ): PromiseInterface { + // Return itself if there is no onFulfilled function. + if (!$onFulfilled) { + return $this; + } + + $queue = Utils::queue(); + $p = new Promise([$queue, 'run']); + $value = $this->value; + $queue->add(static function () use ($p, $value, $onFulfilled): void { + if (Is::pending($p)) { + try { + $p->resolve($onFulfilled($value)); + } catch (\Throwable $e) { + $p->reject($e); + } + } + }); + + return $p; + } + + public function otherwise(callable $onRejected): PromiseInterface + { + return $this->then(null, $onRejected); + } + + public function wait(bool $unwrap = true) + { + return $unwrap ? $this->value : null; + } + + public function getState(): string + { + return self::FULFILLED; + } + + public function resolve($value): void + { + if ($value !== $this->value) { + throw new \LogicException('Cannot resolve a fulfilled promise'); + } + } + + public function reject($reason): void + { + throw new \LogicException('Cannot reject a fulfilled promise'); + } + + public function cancel(): void + { + // pass + } +} diff --git a/vendor/guzzlehttp/promises/src/Is.php b/vendor/guzzlehttp/promises/src/Is.php new file mode 100644 index 0000000..f3f0503 --- /dev/null +++ b/vendor/guzzlehttp/promises/src/Is.php @@ -0,0 +1,40 @@ +getState() === PromiseInterface::PENDING; + } + + /** + * Returns true if a promise is fulfilled or rejected. + */ + public static function settled(PromiseInterface $promise): bool + { + return $promise->getState() !== PromiseInterface::PENDING; + } + + /** + * Returns true if a promise is fulfilled. + */ + public static function fulfilled(PromiseInterface $promise): bool + { + return $promise->getState() === PromiseInterface::FULFILLED; + } + + /** + * Returns true if a promise is rejected. + */ + public static function rejected(PromiseInterface $promise): bool + { + return $promise->getState() === PromiseInterface::REJECTED; + } +} diff --git a/vendor/guzzlehttp/promises/src/Promise.php b/vendor/guzzlehttp/promises/src/Promise.php new file mode 100644 index 0000000..c0c5be2 --- /dev/null +++ b/vendor/guzzlehttp/promises/src/Promise.php @@ -0,0 +1,281 @@ +waitFn = $waitFn; + $this->cancelFn = $cancelFn; + } + + public function then( + ?callable $onFulfilled = null, + ?callable $onRejected = null + ): PromiseInterface { + if ($this->state === self::PENDING) { + $p = new Promise(null, [$this, 'cancel']); + $this->handlers[] = [$p, $onFulfilled, $onRejected]; + $p->waitList = $this->waitList; + $p->waitList[] = $this; + + return $p; + } + + // Return a fulfilled promise and immediately invoke any callbacks. + if ($this->state === self::FULFILLED) { + $promise = Create::promiseFor($this->result); + + return $onFulfilled ? $promise->then($onFulfilled) : $promise; + } + + // It's either cancelled or rejected, so return a rejected promise + // and immediately invoke any callbacks. + $rejection = Create::rejectionFor($this->result); + + return $onRejected ? $rejection->then(null, $onRejected) : $rejection; + } + + public function otherwise(callable $onRejected): PromiseInterface + { + return $this->then(null, $onRejected); + } + + public function wait(bool $unwrap = true) + { + $this->waitIfPending(); + + if ($this->result instanceof PromiseInterface) { + return $this->result->wait($unwrap); + } + if ($unwrap) { + if ($this->state === self::FULFILLED) { + return $this->result; + } + // It's rejected so "unwrap" and throw an exception. + throw Create::exceptionFor($this->result); + } + } + + public function getState(): string + { + return $this->state; + } + + public function cancel(): void + { + if ($this->state !== self::PENDING) { + return; + } + + $this->waitFn = $this->waitList = null; + + if ($this->cancelFn) { + $fn = $this->cancelFn; + $this->cancelFn = null; + try { + $fn(); + } catch (\Throwable $e) { + $this->reject($e); + } + } + + // Reject the promise only if it wasn't rejected in a then callback. + /** @psalm-suppress RedundantCondition */ + if ($this->state === self::PENDING) { + $this->reject(new CancellationException('Promise has been cancelled')); + } + } + + public function resolve($value): void + { + $this->settle(self::FULFILLED, $value); + } + + public function reject($reason): void + { + $this->settle(self::REJECTED, $reason); + } + + private function settle(string $state, $value): void + { + if ($this->state !== self::PENDING) { + // Ignore calls with the same resolution. + if ($state === $this->state && $value === $this->result) { + return; + } + throw $this->state === $state + ? new \LogicException("The promise is already {$state}.") + : new \LogicException("Cannot change a {$this->state} promise to {$state}"); + } + + if ($value === $this) { + throw new \LogicException('Cannot fulfill or reject a promise with itself'); + } + + // Clear out the state of the promise but stash the handlers. + $this->state = $state; + $this->result = $value; + $handlers = $this->handlers; + $this->handlers = null; + $this->waitList = $this->waitFn = null; + $this->cancelFn = null; + + if (!$handlers) { + return; + } + + // If the value was not a settled promise or a thenable, then resolve + // it in the task queue using the correct ID. + if (!is_object($value) || !method_exists($value, 'then')) { + $id = $state === self::FULFILLED ? 1 : 2; + // It's a success, so resolve the handlers in the queue. + Utils::queue()->add(static function () use ($id, $value, $handlers): void { + foreach ($handlers as $handler) { + self::callHandler($id, $value, $handler); + } + }); + } elseif ($value instanceof Promise && Is::pending($value)) { + // We can just merge our handlers onto the next promise. + $value->handlers = array_merge($value->handlers, $handlers); + } else { + // Resolve the handlers when the forwarded promise is resolved. + $value->then( + static function ($value) use ($handlers): void { + foreach ($handlers as $handler) { + self::callHandler(1, $value, $handler); + } + }, + static function ($reason) use ($handlers): void { + foreach ($handlers as $handler) { + self::callHandler(2, $reason, $handler); + } + } + ); + } + } + + /** + * Call a stack of handlers using a specific callback index and value. + * + * @param int $index 1 (resolve) or 2 (reject). + * @param mixed $value Value to pass to the callback. + * @param array $handler Array of handler data (promise and callbacks). + */ + private static function callHandler(int $index, $value, array $handler): void + { + /** @var PromiseInterface $promise */ + $promise = $handler[0]; + + // The promise may have been cancelled or resolved before placing + // this thunk in the queue. + if (Is::settled($promise)) { + return; + } + + try { + if (isset($handler[$index])) { + /* + * If $f throws an exception, then $handler will be in the exception + * stack trace. Since $handler contains a reference to the callable + * itself we get a circular reference. We clear the $handler + * here to avoid that memory leak. + */ + $f = $handler[$index]; + unset($handler); + $promise->resolve($f($value)); + } elseif ($index === 1) { + // Forward resolution values as-is. + $promise->resolve($value); + } else { + // Forward rejections down the chain. + $promise->reject($value); + } + } catch (\Throwable $reason) { + $promise->reject($reason); + } + } + + private function waitIfPending(): void + { + if ($this->state !== self::PENDING) { + return; + } elseif ($this->waitFn) { + $this->invokeWaitFn(); + } elseif ($this->waitList) { + $this->invokeWaitList(); + } else { + // If there's no wait function, then reject the promise. + $this->reject('Cannot wait on a promise that has ' + .'no internal wait function. You must provide a wait ' + .'function when constructing the promise to be able to ' + .'wait on a promise.'); + } + + Utils::queue()->run(); + + /** @psalm-suppress RedundantCondition */ + if ($this->state === self::PENDING) { + $this->reject('Invoking the wait callback did not resolve the promise'); + } + } + + private function invokeWaitFn(): void + { + try { + $wfn = $this->waitFn; + $this->waitFn = null; + $wfn(true); + } catch (\Throwable $reason) { + if ($this->state === self::PENDING) { + // The promise has not been resolved yet, so reject the promise + // with the exception. + $this->reject($reason); + } else { + // The promise was already resolved, so there's a problem in + // the application. + throw $reason; + } + } + } + + private function invokeWaitList(): void + { + $waitList = $this->waitList; + $this->waitList = null; + + foreach ($waitList as $result) { + do { + $result->waitIfPending(); + $result = $result->result; + } while ($result instanceof Promise); + + if ($result instanceof PromiseInterface) { + $result->wait(false); + } + } + } +} diff --git a/vendor/guzzlehttp/promises/src/PromiseInterface.php b/vendor/guzzlehttp/promises/src/PromiseInterface.php new file mode 100644 index 0000000..c11721e --- /dev/null +++ b/vendor/guzzlehttp/promises/src/PromiseInterface.php @@ -0,0 +1,91 @@ +reason = $reason; + } + + public function then( + ?callable $onFulfilled = null, + ?callable $onRejected = null + ): PromiseInterface { + // If there's no onRejected callback then just return self. + if (!$onRejected) { + return $this; + } + + $queue = Utils::queue(); + $reason = $this->reason; + $p = new Promise([$queue, 'run']); + $queue->add(static function () use ($p, $reason, $onRejected): void { + if (Is::pending($p)) { + try { + // Return a resolved promise if onRejected does not throw. + $p->resolve($onRejected($reason)); + } catch (\Throwable $e) { + // onRejected threw, so return a rejected promise. + $p->reject($e); + } + } + }); + + return $p; + } + + public function otherwise(callable $onRejected): PromiseInterface + { + return $this->then(null, $onRejected); + } + + public function wait(bool $unwrap = true) + { + if ($unwrap) { + throw Create::exceptionFor($this->reason); + } + + return null; + } + + public function getState(): string + { + return self::REJECTED; + } + + public function resolve($value): void + { + throw new \LogicException('Cannot resolve a rejected promise'); + } + + public function reject($reason): void + { + if ($reason !== $this->reason) { + throw new \LogicException('Cannot reject a rejected promise'); + } + } + + public function cancel(): void + { + // pass + } +} diff --git a/vendor/guzzlehttp/promises/src/RejectionException.php b/vendor/guzzlehttp/promises/src/RejectionException.php new file mode 100644 index 0000000..47dca86 --- /dev/null +++ b/vendor/guzzlehttp/promises/src/RejectionException.php @@ -0,0 +1,49 @@ +reason = $reason; + + $message = 'The promise was rejected'; + + if ($description) { + $message .= ' with reason: '.$description; + } elseif (is_string($reason) + || (is_object($reason) && method_exists($reason, '__toString')) + ) { + $message .= ' with reason: '.$this->reason; + } elseif ($reason instanceof \JsonSerializable) { + $message .= ' with reason: '.json_encode($this->reason, JSON_PRETTY_PRINT); + } + + parent::__construct($message); + } + + /** + * Returns the rejection reason. + * + * @return mixed + */ + public function getReason() + { + return $this->reason; + } +} diff --git a/vendor/guzzlehttp/promises/src/TaskQueue.php b/vendor/guzzlehttp/promises/src/TaskQueue.php new file mode 100644 index 0000000..503e0b2 --- /dev/null +++ b/vendor/guzzlehttp/promises/src/TaskQueue.php @@ -0,0 +1,71 @@ +run(); + * + * @final + */ +class TaskQueue implements TaskQueueInterface +{ + private $enableShutdown = true; + private $queue = []; + + public function __construct(bool $withShutdown = true) + { + if ($withShutdown) { + register_shutdown_function(function (): void { + if ($this->enableShutdown) { + // Only run the tasks if an E_ERROR didn't occur. + $err = error_get_last(); + if (!$err || ($err['type'] ^ E_ERROR)) { + $this->run(); + } + } + }); + } + } + + public function isEmpty(): bool + { + return !$this->queue; + } + + public function add(callable $task): void + { + $this->queue[] = $task; + } + + public function run(): void + { + while ($task = array_shift($this->queue)) { + /** @var callable $task */ + $task(); + } + } + + /** + * The task queue will be run and exhausted by default when the process + * exits IFF the exit is not the result of a PHP E_ERROR error. + * + * You can disable running the automatic shutdown of the queue by calling + * this function. If you disable the task queue shutdown process, then you + * MUST either run the task queue (as a result of running your event loop + * or manually using the run() method) or wait on each outstanding promise. + * + * Note: This shutdown will occur before any destructors are triggered. + */ + public function disableShutdown(): void + { + $this->enableShutdown = false; + } +} diff --git a/vendor/guzzlehttp/promises/src/TaskQueueInterface.php b/vendor/guzzlehttp/promises/src/TaskQueueInterface.php new file mode 100644 index 0000000..34c561a --- /dev/null +++ b/vendor/guzzlehttp/promises/src/TaskQueueInterface.php @@ -0,0 +1,24 @@ + + * while ($eventLoop->isRunning()) { + * GuzzleHttp\Promise\Utils::queue()->run(); + * } + * + * + * @param TaskQueueInterface|null $assign Optionally specify a new queue instance. + */ + public static function queue(?TaskQueueInterface $assign = null): TaskQueueInterface + { + static $queue; + + if ($assign) { + $queue = $assign; + } elseif (!$queue) { + $queue = new TaskQueue(); + } + + return $queue; + } + + /** + * Adds a function to run in the task queue when it is next `run()` and + * returns a promise that is fulfilled or rejected with the result. + * + * @param callable $task Task function to run. + */ + public static function task(callable $task): PromiseInterface + { + $queue = self::queue(); + $promise = new Promise([$queue, 'run']); + $queue->add(function () use ($task, $promise): void { + try { + if (Is::pending($promise)) { + $promise->resolve($task()); + } + } catch (\Throwable $e) { + $promise->reject($e); + } + }); + + return $promise; + } + + /** + * Synchronously waits on a promise to resolve and returns an inspection + * state array. + * + * Returns a state associative array containing a "state" key mapping to a + * valid promise state. If the state of the promise is "fulfilled", the + * array will contain a "value" key mapping to the fulfilled value of the + * promise. If the promise is rejected, the array will contain a "reason" + * key mapping to the rejection reason of the promise. + * + * @param PromiseInterface $promise Promise or value. + */ + public static function inspect(PromiseInterface $promise): array + { + try { + return [ + 'state' => PromiseInterface::FULFILLED, + 'value' => $promise->wait(), + ]; + } catch (RejectionException $e) { + return ['state' => PromiseInterface::REJECTED, 'reason' => $e->getReason()]; + } catch (\Throwable $e) { + return ['state' => PromiseInterface::REJECTED, 'reason' => $e]; + } + } + + /** + * Waits on all of the provided promises, but does not unwrap rejected + * promises as thrown exception. + * + * Returns an array of inspection state arrays. + * + * @see inspect for the inspection state array format. + * + * @param PromiseInterface[] $promises Traversable of promises to wait upon. + */ + public static function inspectAll($promises): array + { + $results = []; + foreach ($promises as $key => $promise) { + $results[$key] = self::inspect($promise); + } + + return $results; + } + + /** + * Waits on all of the provided promises and returns the fulfilled values. + * + * Returns an array that contains the value of each promise (in the same + * order the promises were provided). An exception is thrown if any of the + * promises are rejected. + * + * @param iterable $promises Iterable of PromiseInterface objects to wait on. + * + * @throws \Throwable on error + */ + public static function unwrap($promises): array + { + $results = []; + foreach ($promises as $key => $promise) { + $results[$key] = $promise->wait(); + } + + return $results; + } + + /** + * Given an array of promises, return a promise that is fulfilled when all + * the items in the array are fulfilled. + * + * The promise's fulfillment value is an array with fulfillment values at + * respective positions to the original array. If any promise in the array + * rejects, the returned promise is rejected with the rejection reason. + * + * @param mixed $promises Promises or values. + * @param bool $recursive If true, resolves new promises that might have been added to the stack during its own resolution. + */ + public static function all($promises, bool $recursive = false): PromiseInterface + { + $results = []; + $promise = Each::of( + $promises, + function ($value, $idx) use (&$results): void { + $results[$idx] = $value; + }, + function ($reason, $idx, Promise $aggregate): void { + $aggregate->reject($reason); + } + )->then(function () use (&$results) { + ksort($results); + + return $results; + }); + + if (true === $recursive) { + $promise = $promise->then(function ($results) use ($recursive, &$promises) { + foreach ($promises as $promise) { + if (Is::pending($promise)) { + return self::all($promises, $recursive); + } + } + + return $results; + }); + } + + return $promise; + } + + /** + * Initiate a competitive race between multiple promises or values (values + * will become immediately fulfilled promises). + * + * When count amount of promises have been fulfilled, the returned promise + * is fulfilled with an array that contains the fulfillment values of the + * winners in order of resolution. + * + * This promise is rejected with a {@see AggregateException} if the number + * of fulfilled promises is less than the desired $count. + * + * @param int $count Total number of promises. + * @param mixed $promises Promises or values. + */ + public static function some(int $count, $promises): PromiseInterface + { + $results = []; + $rejections = []; + + return Each::of( + $promises, + function ($value, $idx, PromiseInterface $p) use (&$results, $count): void { + if (Is::settled($p)) { + return; + } + $results[$idx] = $value; + if (count($results) >= $count) { + $p->resolve(null); + } + }, + function ($reason) use (&$rejections): void { + $rejections[] = $reason; + } + )->then( + function () use (&$results, &$rejections, $count) { + if (count($results) !== $count) { + throw new AggregateException( + 'Not enough promises to fulfill count', + $rejections + ); + } + ksort($results); + + return array_values($results); + } + ); + } + + /** + * Like some(), with 1 as count. However, if the promise fulfills, the + * fulfillment value is not an array of 1 but the value directly. + * + * @param mixed $promises Promises or values. + */ + public static function any($promises): PromiseInterface + { + return self::some(1, $promises)->then(function ($values) { + return $values[0]; + }); + } + + /** + * Returns a promise that is fulfilled when all of the provided promises have + * been fulfilled or rejected. + * + * The returned promise is fulfilled with an array of inspection state arrays. + * + * @see inspect for the inspection state array format. + * + * @param mixed $promises Promises or values. + */ + public static function settle($promises): PromiseInterface + { + $results = []; + + return Each::of( + $promises, + function ($value, $idx) use (&$results): void { + $results[$idx] = ['state' => PromiseInterface::FULFILLED, 'value' => $value]; + }, + function ($reason, $idx) use (&$results): void { + $results[$idx] = ['state' => PromiseInterface::REJECTED, 'reason' => $reason]; + } + )->then(function () use (&$results) { + ksort($results); + + return $results; + }); + } +} diff --git a/vendor/guzzlehttp/psr7/CHANGELOG.md b/vendor/guzzlehttp/psr7/CHANGELOG.md new file mode 100644 index 0000000..75aabfb --- /dev/null +++ b/vendor/guzzlehttp/psr7/CHANGELOG.md @@ -0,0 +1,465 @@ +# Change Log + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## 2.7.0 - 2024-07-18 + +### Added + +- Add `Utils::redactUserInfo()` method +- Add ability to encode bools as ints in `Query::build` + +## 2.6.3 - 2024-07-18 + +### Fixed + +- Make `StreamWrapper::stream_stat()` return `false` if inner stream's size is `null` + +### Changed + +- PHP 8.4 support + +## 2.6.2 - 2023-12-03 + +### Fixed + +- Fixed another issue with the fact that PHP transforms numeric strings in array keys to ints + +### Changed + +- Updated links in docs to their canonical versions +- Replaced `call_user_func*` with native calls + +## 2.6.1 - 2023-08-27 + +### Fixed + +- Properly handle the fact that PHP transforms numeric strings in array keys to ints + +## 2.6.0 - 2023-08-03 + +### Changed + +- Updated the mime type map to add some new entries, fix a couple of invalid entries, and remove an invalid entry +- Fallback to `application/octet-stream` if we are unable to guess the content type for a multipart file upload + +## 2.5.1 - 2023-08-03 + +### Fixed + +- Corrected mime type for `.acc` files to `audio/aac` + +### Changed + +- PHP 8.3 support + +## 2.5.0 - 2023-04-17 + +### Changed + +- Adjusted `psr/http-message` version constraint to `^1.1 || ^2.0` + +## 2.4.5 - 2023-04-17 + +### Fixed + +- Prevent possible warnings on unset variables in `ServerRequest::normalizeNestedFileSpec` +- Fixed `Message::bodySummary` when `preg_match` fails +- Fixed header validation issue + +## 2.4.4 - 2023-03-09 + +### Changed + +- Removed the need for `AllowDynamicProperties` in `LazyOpenStream` + +## 2.4.3 - 2022-10-26 + +### Changed + +- Replaced `sha1(uniqid())` by `bin2hex(random_bytes(20))` + +## 2.4.2 - 2022-10-25 + +### Fixed + +- Fixed erroneous behaviour when combining host and relative path + +## 2.4.1 - 2022-08-28 + +### Fixed + +- Rewind body before reading in `Message::bodySummary` + +## 2.4.0 - 2022-06-20 + +### Added + +- Added provisional PHP 8.2 support +- Added `UriComparator::isCrossOrigin` method + +## 2.3.0 - 2022-06-09 + +### Fixed + +- Added `Header::splitList` method +- Added `Utils::tryGetContents` method +- Improved `Stream::getContents` method +- Updated mimetype mappings + +## 2.2.2 - 2022-06-08 + +### Fixed + +- Fix `Message::parseRequestUri` for numeric headers +- Re-wrap exceptions thrown in `fread` into runtime exceptions +- Throw an exception when multipart options is misformatted + +## 2.2.1 - 2022-03-20 + +### Fixed + +- Correct header value validation + +## 2.2.0 - 2022-03-20 + +### Added + +- A more compressive list of mime types +- Add JsonSerializable to Uri +- Missing return types + +### Fixed + +- Bug MultipartStream no `uri` metadata +- Bug MultipartStream with filename for `data://` streams +- Fixed new line handling in MultipartStream +- Reduced RAM usage when copying streams +- Updated parsing in `Header::normalize()` + +## 2.1.1 - 2022-03-20 + +### Fixed + +- Validate header values properly + +## 2.1.0 - 2021-10-06 + +### Changed + +- Attempting to create a `Uri` object from a malformed URI will no longer throw a generic + `InvalidArgumentException`, but rather a `MalformedUriException`, which inherits from the former + for backwards compatibility. Callers relying on the exception being thrown to detect invalid + URIs should catch the new exception. + +### Fixed + +- Return `null` in caching stream size if remote size is `null` + +## 2.0.0 - 2021-06-30 + +Identical to the RC release. + +## 2.0.0@RC-1 - 2021-04-29 + +### Fixed + +- Handle possibly unset `url` in `stream_get_meta_data` + +## 2.0.0@beta-1 - 2021-03-21 + +### Added + +- PSR-17 factories +- Made classes final +- PHP7 type hints + +### Changed + +- When building a query string, booleans are represented as 1 and 0. + +### Removed + +- PHP < 7.2 support +- All functions in the `GuzzleHttp\Psr7` namespace + +## 1.8.1 - 2021-03-21 + +### Fixed + +- Issue parsing IPv6 URLs +- Issue modifying ServerRequest lost all its attributes + +## 1.8.0 - 2021-03-21 + +### Added + +- Locale independent URL parsing +- Most classes got a `@final` annotation to prepare for 2.0 + +### Fixed + +- Issue when creating stream from `php://input` and curl-ext is not installed +- Broken `Utils::tryFopen()` on PHP 8 + +## 1.7.0 - 2020-09-30 + +### Added + +- Replaced functions by static methods + +### Fixed + +- Converting a non-seekable stream to a string +- Handle multiple Set-Cookie correctly +- Ignore array keys in header values when merging +- Allow multibyte characters to be parsed in `Message:bodySummary()` + +### Changed + +- Restored partial HHVM 3 support + + +## [1.6.1] - 2019-07-02 + +### Fixed + +- Accept null and bool header values again + + +## [1.6.0] - 2019-06-30 + +### Added + +- Allowed version `^3.0` of `ralouphie/getallheaders` dependency (#244) +- Added MIME type for WEBP image format (#246) +- Added more validation of values according to PSR-7 and RFC standards, e.g. status code range (#250, #272) + +### Changed + +- Tests don't pass with HHVM 4.0, so HHVM support got dropped. Other libraries like composer have done the same. (#262) +- Accept port number 0 to be valid (#270) + +### Fixed + +- Fixed subsequent reads from `php://input` in ServerRequest (#247) +- Fixed readable/writable detection for certain stream modes (#248) +- Fixed encoding of special characters in the `userInfo` component of an URI (#253) + + +## [1.5.2] - 2018-12-04 + +### Fixed + +- Check body size when getting the message summary + + +## [1.5.1] - 2018-12-04 + +### Fixed + +- Get the summary of a body only if it is readable + + +## [1.5.0] - 2018-12-03 + +### Added + +- Response first-line to response string exception (fixes #145) +- A test for #129 behavior +- `get_message_body_summary` function in order to get the message summary +- `3gp` and `mkv` mime types + +### Changed + +- Clarify exception message when stream is detached + +### Deprecated + +- Deprecated parsing folded header lines as per RFC 7230 + +### Fixed + +- Fix `AppendStream::detach` to not close streams +- `InflateStream` preserves `isSeekable` attribute of the underlying stream +- `ServerRequest::getUriFromGlobals` to support URLs in query parameters + + +Several other fixes and improvements. + + +## [1.4.2] - 2017-03-20 + +### Fixed + +- Reverted BC break to `Uri::resolve` and `Uri::removeDotSegments` by removing + calls to `trigger_error` when deprecated methods are invoked. + + +## [1.4.1] - 2017-02-27 + +### Added + +- Rriggering of silenced deprecation warnings. + +### Fixed + +- Reverted BC break by reintroducing behavior to automagically fix a URI with a + relative path and an authority by adding a leading slash to the path. It's only + deprecated now. + + +## [1.4.0] - 2017-02-21 + +### Added + +- Added common URI utility methods based on RFC 3986 (see documentation in the readme): + - `Uri::isDefaultPort` + - `Uri::isAbsolute` + - `Uri::isNetworkPathReference` + - `Uri::isAbsolutePathReference` + - `Uri::isRelativePathReference` + - `Uri::isSameDocumentReference` + - `Uri::composeComponents` + - `UriNormalizer::normalize` + - `UriNormalizer::isEquivalent` + - `UriResolver::relativize` + +### Changed + +- Ensure `ServerRequest::getUriFromGlobals` returns a URI in absolute form. +- Allow `parse_response` to parse a response without delimiting space and reason. +- Ensure each URI modification results in a valid URI according to PSR-7 discussions. + Invalid modifications will throw an exception instead of returning a wrong URI or + doing some magic. + - `(new Uri)->withPath('foo')->withHost('example.com')` will throw an exception + because the path of a URI with an authority must start with a slash "/" or be empty + - `(new Uri())->withScheme('http')` will return `'http://localhost'` + +### Deprecated + +- `Uri::resolve` in favor of `UriResolver::resolve` +- `Uri::removeDotSegments` in favor of `UriResolver::removeDotSegments` + +### Fixed + +- `Stream::read` when length parameter <= 0. +- `copy_to_stream` reads bytes in chunks instead of `maxLen` into memory. +- `ServerRequest::getUriFromGlobals` when `Host` header contains port. +- Compatibility of URIs with `file` scheme and empty host. + + +## [1.3.1] - 2016-06-25 + +### Fixed + +- `Uri::__toString` for network path references, e.g. `//example.org`. +- Missing lowercase normalization for host. +- Handling of URI components in case they are `'0'` in a lot of places, + e.g. as a user info password. +- `Uri::withAddedHeader` to correctly merge headers with different case. +- Trimming of header values in `Uri::withAddedHeader`. Header values may + be surrounded by whitespace which should be ignored according to RFC 7230 + Section 3.2.4. This does not apply to header names. +- `Uri::withAddedHeader` with an array of header values. +- `Uri::resolve` when base path has no slash and handling of fragment. +- Handling of encoding in `Uri::with(out)QueryValue` so one can pass the + key/value both in encoded as well as decoded form to those methods. This is + consistent with withPath, withQuery etc. +- `ServerRequest::withoutAttribute` when attribute value is null. + + +## [1.3.0] - 2016-04-13 + +### Added + +- Remaining interfaces needed for full PSR7 compatibility + (ServerRequestInterface, UploadedFileInterface, etc.). +- Support for stream_for from scalars. + +### Changed + +- Can now extend Uri. + +### Fixed +- A bug in validating request methods by making it more permissive. + + +## [1.2.3] - 2016-02-18 + +### Fixed + +- Support in `GuzzleHttp\Psr7\CachingStream` for seeking forward on remote + streams, which can sometimes return fewer bytes than requested with `fread`. +- Handling of gzipped responses with FNAME headers. + + +## [1.2.2] - 2016-01-22 + +### Added + +- Support for URIs without any authority. +- Support for HTTP 451 'Unavailable For Legal Reasons.' +- Support for using '0' as a filename. +- Support for including non-standard ports in Host headers. + + +## [1.2.1] - 2015-11-02 + +### Changes + +- Now supporting negative offsets when seeking to SEEK_END. + + +## [1.2.0] - 2015-08-15 + +### Changed + +- Body as `"0"` is now properly added to a response. +- Now allowing forward seeking in CachingStream. +- Now properly parsing HTTP requests that contain proxy targets in + `parse_request`. +- functions.php is now conditionally required. +- user-info is no longer dropped when resolving URIs. + + +## [1.1.0] - 2015-06-24 + +### Changed + +- URIs can now be relative. +- `multipart/form-data` headers are now overridden case-insensitively. +- URI paths no longer encode the following characters because they are allowed + in URIs: "(", ")", "*", "!", "'" +- A port is no longer added to a URI when the scheme is missing and no port is + present. + + +## 1.0.0 - 2015-05-19 + +Initial release. + +Currently unsupported: + +- `Psr\Http\Message\ServerRequestInterface` +- `Psr\Http\Message\UploadedFileInterface` + + + +[1.6.0]: https://github.com/guzzle/psr7/compare/1.5.2...1.6.0 +[1.5.2]: https://github.com/guzzle/psr7/compare/1.5.1...1.5.2 +[1.5.1]: https://github.com/guzzle/psr7/compare/1.5.0...1.5.1 +[1.5.0]: https://github.com/guzzle/psr7/compare/1.4.2...1.5.0 +[1.4.2]: https://github.com/guzzle/psr7/compare/1.4.1...1.4.2 +[1.4.1]: https://github.com/guzzle/psr7/compare/1.4.0...1.4.1 +[1.4.0]: https://github.com/guzzle/psr7/compare/1.3.1...1.4.0 +[1.3.1]: https://github.com/guzzle/psr7/compare/1.3.0...1.3.1 +[1.3.0]: https://github.com/guzzle/psr7/compare/1.2.3...1.3.0 +[1.2.3]: https://github.com/guzzle/psr7/compare/1.2.2...1.2.3 +[1.2.2]: https://github.com/guzzle/psr7/compare/1.2.1...1.2.2 +[1.2.1]: https://github.com/guzzle/psr7/compare/1.2.0...1.2.1 +[1.2.0]: https://github.com/guzzle/psr7/compare/1.1.0...1.2.0 +[1.1.0]: https://github.com/guzzle/psr7/compare/1.0.0...1.1.0 diff --git a/vendor/guzzlehttp/psr7/LICENSE b/vendor/guzzlehttp/psr7/LICENSE new file mode 100644 index 0000000..51c7ec8 --- /dev/null +++ b/vendor/guzzlehttp/psr7/LICENSE @@ -0,0 +1,26 @@ +The MIT License (MIT) + +Copyright (c) 2015 Michael Dowling +Copyright (c) 2015 Márk Sági-Kazár +Copyright (c) 2015 Graham Campbell +Copyright (c) 2016 Tobias Schultze +Copyright (c) 2016 George Mponos +Copyright (c) 2018 Tobias Nyholm + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/guzzlehttp/psr7/README.md b/vendor/guzzlehttp/psr7/README.md new file mode 100644 index 0000000..2e9bb0b --- /dev/null +++ b/vendor/guzzlehttp/psr7/README.md @@ -0,0 +1,887 @@ +# PSR-7 Message Implementation + +This repository contains a full [PSR-7](https://www.php-fig.org/psr/psr-7/) +message implementation, several stream decorators, and some helpful +functionality like query string parsing. + +![CI](https://github.com/guzzle/psr7/workflows/CI/badge.svg) +![Static analysis](https://github.com/guzzle/psr7/workflows/Static%20analysis/badge.svg) + + +## Features + +This package comes with a number of stream implementations and stream +decorators. + + +## Installation + +```shell +composer require guzzlehttp/psr7 +``` + +## Version Guidance + +| Version | Status | PHP Version | +|---------|---------------------|--------------| +| 1.x | EOL (2024-06-30) | >=5.4,<8.2 | +| 2.x | Latest | >=7.2.5,<8.5 | + + +## AppendStream + +`GuzzleHttp\Psr7\AppendStream` + +Reads from multiple streams, one after the other. + +```php +use GuzzleHttp\Psr7; + +$a = Psr7\Utils::streamFor('abc, '); +$b = Psr7\Utils::streamFor('123.'); +$composed = new Psr7\AppendStream([$a, $b]); + +$composed->addStream(Psr7\Utils::streamFor(' Above all listen to me')); + +echo $composed; // abc, 123. Above all listen to me. +``` + + +## BufferStream + +`GuzzleHttp\Psr7\BufferStream` + +Provides a buffer stream that can be written to fill a buffer, and read +from to remove bytes from the buffer. + +This stream returns a "hwm" metadata value that tells upstream consumers +what the configured high water mark of the stream is, or the maximum +preferred size of the buffer. + +```php +use GuzzleHttp\Psr7; + +// When more than 1024 bytes are in the buffer, it will begin returning +// false to writes. This is an indication that writers should slow down. +$buffer = new Psr7\BufferStream(1024); +``` + + +## CachingStream + +The CachingStream is used to allow seeking over previously read bytes on +non-seekable streams. This can be useful when transferring a non-seekable +entity body fails due to needing to rewind the stream (for example, resulting +from a redirect). Data that is read from the remote stream will be buffered in +a PHP temp stream so that previously read bytes are cached first in memory, +then on disk. + +```php +use GuzzleHttp\Psr7; + +$original = Psr7\Utils::streamFor(fopen('http://www.google.com', 'r')); +$stream = new Psr7\CachingStream($original); + +$stream->read(1024); +echo $stream->tell(); +// 1024 + +$stream->seek(0); +echo $stream->tell(); +// 0 +``` + + +## DroppingStream + +`GuzzleHttp\Psr7\DroppingStream` + +Stream decorator that begins dropping data once the size of the underlying +stream becomes too full. + +```php +use GuzzleHttp\Psr7; + +// Create an empty stream +$stream = Psr7\Utils::streamFor(); + +// Start dropping data when the stream has more than 10 bytes +$dropping = new Psr7\DroppingStream($stream, 10); + +$dropping->write('01234567890123456789'); +echo $stream; // 0123456789 +``` + + +## FnStream + +`GuzzleHttp\Psr7\FnStream` + +Compose stream implementations based on a hash of functions. + +Allows for easy testing and extension of a provided stream without needing +to create a concrete class for a simple extension point. + +```php + +use GuzzleHttp\Psr7; + +$stream = Psr7\Utils::streamFor('hi'); +$fnStream = Psr7\FnStream::decorate($stream, [ + 'rewind' => function () use ($stream) { + echo 'About to rewind - '; + $stream->rewind(); + echo 'rewound!'; + } +]); + +$fnStream->rewind(); +// Outputs: About to rewind - rewound! +``` + + +## InflateStream + +`GuzzleHttp\Psr7\InflateStream` + +Uses PHP's zlib.inflate filter to inflate zlib (HTTP deflate, RFC1950) or gzipped (RFC1952) content. + +This stream decorator converts the provided stream to a PHP stream resource, +then appends the zlib.inflate filter. The stream is then converted back +to a Guzzle stream resource to be used as a Guzzle stream. + + +## LazyOpenStream + +`GuzzleHttp\Psr7\LazyOpenStream` + +Lazily reads or writes to a file that is opened only after an IO operation +take place on the stream. + +```php +use GuzzleHttp\Psr7; + +$stream = new Psr7\LazyOpenStream('/path/to/file', 'r'); +// The file has not yet been opened... + +echo $stream->read(10); +// The file is opened and read from only when needed. +``` + + +## LimitStream + +`GuzzleHttp\Psr7\LimitStream` + +LimitStream can be used to read a subset or slice of an existing stream object. +This can be useful for breaking a large file into smaller pieces to be sent in +chunks (e.g. Amazon S3's multipart upload API). + +```php +use GuzzleHttp\Psr7; + +$original = Psr7\Utils::streamFor(fopen('/tmp/test.txt', 'r+')); +echo $original->getSize(); +// >>> 1048576 + +// Limit the size of the body to 1024 bytes and start reading from byte 2048 +$stream = new Psr7\LimitStream($original, 1024, 2048); +echo $stream->getSize(); +// >>> 1024 +echo $stream->tell(); +// >>> 0 +``` + + +## MultipartStream + +`GuzzleHttp\Psr7\MultipartStream` + +Stream that when read returns bytes for a streaming multipart or +multipart/form-data stream. + + +## NoSeekStream + +`GuzzleHttp\Psr7\NoSeekStream` + +NoSeekStream wraps a stream and does not allow seeking. + +```php +use GuzzleHttp\Psr7; + +$original = Psr7\Utils::streamFor('foo'); +$noSeek = new Psr7\NoSeekStream($original); + +echo $noSeek->read(3); +// foo +var_export($noSeek->isSeekable()); +// false +$noSeek->seek(0); +var_export($noSeek->read(3)); +// NULL +``` + + +## PumpStream + +`GuzzleHttp\Psr7\PumpStream` + +Provides a read only stream that pumps data from a PHP callable. + +When invoking the provided callable, the PumpStream will pass the amount of +data requested to read to the callable. The callable can choose to ignore +this value and return fewer or more bytes than requested. Any extra data +returned by the provided callable is buffered internally until drained using +the read() function of the PumpStream. The provided callable MUST return +false when there is no more data to read. + + +## Implementing stream decorators + +Creating a stream decorator is very easy thanks to the +`GuzzleHttp\Psr7\StreamDecoratorTrait`. This trait provides methods that +implement `Psr\Http\Message\StreamInterface` by proxying to an underlying +stream. Just `use` the `StreamDecoratorTrait` and implement your custom +methods. + +For example, let's say we wanted to call a specific function each time the last +byte is read from a stream. This could be implemented by overriding the +`read()` method. + +```php +use Psr\Http\Message\StreamInterface; +use GuzzleHttp\Psr7\StreamDecoratorTrait; + +class EofCallbackStream implements StreamInterface +{ + use StreamDecoratorTrait; + + private $callback; + + private $stream; + + public function __construct(StreamInterface $stream, callable $cb) + { + $this->stream = $stream; + $this->callback = $cb; + } + + public function read($length) + { + $result = $this->stream->read($length); + + // Invoke the callback when EOF is hit. + if ($this->eof()) { + ($this->callback)(); + } + + return $result; + } +} +``` + +This decorator could be added to any existing stream and used like so: + +```php +use GuzzleHttp\Psr7; + +$original = Psr7\Utils::streamFor('foo'); + +$eofStream = new EofCallbackStream($original, function () { + echo 'EOF!'; +}); + +$eofStream->read(2); +$eofStream->read(1); +// echoes "EOF!" +$eofStream->seek(0); +$eofStream->read(3); +// echoes "EOF!" +``` + + +## PHP StreamWrapper + +You can use the `GuzzleHttp\Psr7\StreamWrapper` class if you need to use a +PSR-7 stream as a PHP stream resource. + +Use the `GuzzleHttp\Psr7\StreamWrapper::getResource()` method to create a PHP +stream from a PSR-7 stream. + +```php +use GuzzleHttp\Psr7\StreamWrapper; + +$stream = GuzzleHttp\Psr7\Utils::streamFor('hello!'); +$resource = StreamWrapper::getResource($stream); +echo fread($resource, 6); // outputs hello! +``` + + +# Static API + +There are various static methods available under the `GuzzleHttp\Psr7` namespace. + + +## `GuzzleHttp\Psr7\Message::toString` + +`public static function toString(MessageInterface $message): string` + +Returns the string representation of an HTTP message. + +```php +$request = new GuzzleHttp\Psr7\Request('GET', 'http://example.com'); +echo GuzzleHttp\Psr7\Message::toString($request); +``` + + +## `GuzzleHttp\Psr7\Message::bodySummary` + +`public static function bodySummary(MessageInterface $message, int $truncateAt = 120): string|null` + +Get a short summary of the message body. + +Will return `null` if the response is not printable. + + +## `GuzzleHttp\Psr7\Message::rewindBody` + +`public static function rewindBody(MessageInterface $message): void` + +Attempts to rewind a message body and throws an exception on failure. + +The body of the message will only be rewound if a call to `tell()` +returns a value other than `0`. + + +## `GuzzleHttp\Psr7\Message::parseMessage` + +`public static function parseMessage(string $message): array` + +Parses an HTTP message into an associative array. + +The array contains the "start-line" key containing the start line of +the message, "headers" key containing an associative array of header +array values, and a "body" key containing the body of the message. + + +## `GuzzleHttp\Psr7\Message::parseRequestUri` + +`public static function parseRequestUri(string $path, array $headers): string` + +Constructs a URI for an HTTP request message. + + +## `GuzzleHttp\Psr7\Message::parseRequest` + +`public static function parseRequest(string $message): Request` + +Parses a request message string into a request object. + + +## `GuzzleHttp\Psr7\Message::parseResponse` + +`public static function parseResponse(string $message): Response` + +Parses a response message string into a response object. + + +## `GuzzleHttp\Psr7\Header::parse` + +`public static function parse(string|array $header): array` + +Parse an array of header values containing ";" separated data into an +array of associative arrays representing the header key value pair data +of the header. When a parameter does not contain a value, but just +contains a key, this function will inject a key with a '' string value. + + +## `GuzzleHttp\Psr7\Header::splitList` + +`public static function splitList(string|string[] $header): string[]` + +Splits a HTTP header defined to contain a comma-separated list into +each individual value: + +``` +$knownEtags = Header::splitList($request->getHeader('if-none-match')); +``` + +Example headers include `accept`, `cache-control` and `if-none-match`. + + +## `GuzzleHttp\Psr7\Header::normalize` (deprecated) + +`public static function normalize(string|array $header): array` + +`Header::normalize()` is deprecated in favor of [`Header::splitList()`](README.md#guzzlehttppsr7headersplitlist) +which performs the same operation with a cleaned up API and improved +documentation. + +Converts an array of header values that may contain comma separated +headers into an array of headers with no comma separated values. + + +## `GuzzleHttp\Psr7\Query::parse` + +`public static function parse(string $str, int|bool $urlEncoding = true): array` + +Parse a query string into an associative array. + +If multiple values are found for the same key, the value of that key +value pair will become an array. This function does not parse nested +PHP style arrays into an associative array (e.g., `foo[a]=1&foo[b]=2` +will be parsed into `['foo[a]' => '1', 'foo[b]' => '2'])`. + + +## `GuzzleHttp\Psr7\Query::build` + +`public static function build(array $params, int|false $encoding = PHP_QUERY_RFC3986, bool $treatBoolsAsInts = true): string` + +Build a query string from an array of key value pairs. + +This function can use the return value of `parse()` to build a query +string. This function does not modify the provided keys when an array is +encountered (like `http_build_query()` would). + + +## `GuzzleHttp\Psr7\Utils::caselessRemove` + +`public static function caselessRemove(iterable $keys, $keys, array $data): array` + +Remove the items given by the keys, case insensitively from the data. + + +## `GuzzleHttp\Psr7\Utils::copyToStream` + +`public static function copyToStream(StreamInterface $source, StreamInterface $dest, int $maxLen = -1): void` + +Copy the contents of a stream into another stream until the given number +of bytes have been read. + + +## `GuzzleHttp\Psr7\Utils::copyToString` + +`public static function copyToString(StreamInterface $stream, int $maxLen = -1): string` + +Copy the contents of a stream into a string until the given number of +bytes have been read. + + +## `GuzzleHttp\Psr7\Utils::hash` + +`public static function hash(StreamInterface $stream, string $algo, bool $rawOutput = false): string` + +Calculate a hash of a stream. + +This method reads the entire stream to calculate a rolling hash, based on +PHP's `hash_init` functions. + + +## `GuzzleHttp\Psr7\Utils::modifyRequest` + +`public static function modifyRequest(RequestInterface $request, array $changes): RequestInterface` + +Clone and modify a request with the given changes. + +This method is useful for reducing the number of clones needed to mutate +a message. + +- method: (string) Changes the HTTP method. +- set_headers: (array) Sets the given headers. +- remove_headers: (array) Remove the given headers. +- body: (mixed) Sets the given body. +- uri: (UriInterface) Set the URI. +- query: (string) Set the query string value of the URI. +- version: (string) Set the protocol version. + + +## `GuzzleHttp\Psr7\Utils::readLine` + +`public static function readLine(StreamInterface $stream, ?int $maxLength = null): string` + +Read a line from the stream up to the maximum allowed buffer length. + + +## `GuzzleHttp\Psr7\Utils::redactUserInfo` + +`public static function redactUserInfo(UriInterface $uri): UriInterface` + +Redact the password in the user info part of a URI. + + +## `GuzzleHttp\Psr7\Utils::streamFor` + +`public static function streamFor(resource|string|null|int|float|bool|StreamInterface|callable|\Iterator $resource = '', array $options = []): StreamInterface` + +Create a new stream based on the input type. + +Options is an associative array that can contain the following keys: + +- metadata: Array of custom metadata. +- size: Size of the stream. + +This method accepts the following `$resource` types: + +- `Psr\Http\Message\StreamInterface`: Returns the value as-is. +- `string`: Creates a stream object that uses the given string as the contents. +- `resource`: Creates a stream object that wraps the given PHP stream resource. +- `Iterator`: If the provided value implements `Iterator`, then a read-only + stream object will be created that wraps the given iterable. Each time the + stream is read from, data from the iterator will fill a buffer and will be + continuously called until the buffer is equal to the requested read size. + Subsequent read calls will first read from the buffer and then call `next` + on the underlying iterator until it is exhausted. +- `object` with `__toString()`: If the object has the `__toString()` method, + the object will be cast to a string and then a stream will be returned that + uses the string value. +- `NULL`: When `null` is passed, an empty stream object is returned. +- `callable` When a callable is passed, a read-only stream object will be + created that invokes the given callable. The callable is invoked with the + number of suggested bytes to read. The callable can return any number of + bytes, but MUST return `false` when there is no more data to return. The + stream object that wraps the callable will invoke the callable until the + number of requested bytes are available. Any additional bytes will be + buffered and used in subsequent reads. + +```php +$stream = GuzzleHttp\Psr7\Utils::streamFor('foo'); +$stream = GuzzleHttp\Psr7\Utils::streamFor(fopen('/path/to/file', 'r')); + +$generator = function ($bytes) { + for ($i = 0; $i < $bytes; $i++) { + yield ' '; + } +} + +$stream = GuzzleHttp\Psr7\Utils::streamFor($generator(100)); +``` + + +## `GuzzleHttp\Psr7\Utils::tryFopen` + +`public static function tryFopen(string $filename, string $mode): resource` + +Safely opens a PHP stream resource using a filename. + +When fopen fails, PHP normally raises a warning. This function adds an +error handler that checks for errors and throws an exception instead. + + +## `GuzzleHttp\Psr7\Utils::tryGetContents` + +`public static function tryGetContents(resource $stream): string` + +Safely gets the contents of a given stream. + +When stream_get_contents fails, PHP normally raises a warning. This +function adds an error handler that checks for errors and throws an +exception instead. + + +## `GuzzleHttp\Psr7\Utils::uriFor` + +`public static function uriFor(string|UriInterface $uri): UriInterface` + +Returns a UriInterface for the given value. + +This function accepts a string or UriInterface and returns a +UriInterface for the given value. If the value is already a +UriInterface, it is returned as-is. + + +## `GuzzleHttp\Psr7\MimeType::fromFilename` + +`public static function fromFilename(string $filename): string|null` + +Determines the mimetype of a file by looking at its extension. + + +## `GuzzleHttp\Psr7\MimeType::fromExtension` + +`public static function fromExtension(string $extension): string|null` + +Maps a file extensions to a mimetype. + + +## Upgrading from Function API + +The static API was first introduced in 1.7.0, in order to mitigate problems with functions conflicting between global and local copies of the package. The function API was removed in 2.0.0. A migration table has been provided here for your convenience: + +| Original Function | Replacement Method | +|----------------|----------------| +| `str` | `Message::toString` | +| `uri_for` | `Utils::uriFor` | +| `stream_for` | `Utils::streamFor` | +| `parse_header` | `Header::parse` | +| `normalize_header` | `Header::normalize` | +| `modify_request` | `Utils::modifyRequest` | +| `rewind_body` | `Message::rewindBody` | +| `try_fopen` | `Utils::tryFopen` | +| `copy_to_string` | `Utils::copyToString` | +| `copy_to_stream` | `Utils::copyToStream` | +| `hash` | `Utils::hash` | +| `readline` | `Utils::readLine` | +| `parse_request` | `Message::parseRequest` | +| `parse_response` | `Message::parseResponse` | +| `parse_query` | `Query::parse` | +| `build_query` | `Query::build` | +| `mimetype_from_filename` | `MimeType::fromFilename` | +| `mimetype_from_extension` | `MimeType::fromExtension` | +| `_parse_message` | `Message::parseMessage` | +| `_parse_request_uri` | `Message::parseRequestUri` | +| `get_message_body_summary` | `Message::bodySummary` | +| `_caseless_remove` | `Utils::caselessRemove` | + + +# Additional URI Methods + +Aside from the standard `Psr\Http\Message\UriInterface` implementation in form of the `GuzzleHttp\Psr7\Uri` class, +this library also provides additional functionality when working with URIs as static methods. + +## URI Types + +An instance of `Psr\Http\Message\UriInterface` can either be an absolute URI or a relative reference. +An absolute URI has a scheme. A relative reference is used to express a URI relative to another URI, +the base URI. Relative references can be divided into several forms according to +[RFC 3986 Section 4.2](https://datatracker.ietf.org/doc/html/rfc3986#section-4.2): + +- network-path references, e.g. `//example.com/path` +- absolute-path references, e.g. `/path` +- relative-path references, e.g. `subpath` + +The following methods can be used to identify the type of the URI. + +### `GuzzleHttp\Psr7\Uri::isAbsolute` + +`public static function isAbsolute(UriInterface $uri): bool` + +Whether the URI is absolute, i.e. it has a scheme. + +### `GuzzleHttp\Psr7\Uri::isNetworkPathReference` + +`public static function isNetworkPathReference(UriInterface $uri): bool` + +Whether the URI is a network-path reference. A relative reference that begins with two slash characters is +termed an network-path reference. + +### `GuzzleHttp\Psr7\Uri::isAbsolutePathReference` + +`public static function isAbsolutePathReference(UriInterface $uri): bool` + +Whether the URI is a absolute-path reference. A relative reference that begins with a single slash character is +termed an absolute-path reference. + +### `GuzzleHttp\Psr7\Uri::isRelativePathReference` + +`public static function isRelativePathReference(UriInterface $uri): bool` + +Whether the URI is a relative-path reference. A relative reference that does not begin with a slash character is +termed a relative-path reference. + +### `GuzzleHttp\Psr7\Uri::isSameDocumentReference` + +`public static function isSameDocumentReference(UriInterface $uri, ?UriInterface $base = null): bool` + +Whether the URI is a same-document reference. A same-document reference refers to a URI that is, aside from its +fragment component, identical to the base URI. When no base URI is given, only an empty URI reference +(apart from its fragment) is considered a same-document reference. + +## URI Components + +Additional methods to work with URI components. + +### `GuzzleHttp\Psr7\Uri::isDefaultPort` + +`public static function isDefaultPort(UriInterface $uri): bool` + +Whether the URI has the default port of the current scheme. `Psr\Http\Message\UriInterface::getPort` may return null +or the standard port. This method can be used independently of the implementation. + +### `GuzzleHttp\Psr7\Uri::composeComponents` + +`public static function composeComponents($scheme, $authority, $path, $query, $fragment): string` + +Composes a URI reference string from its various components according to +[RFC 3986 Section 5.3](https://datatracker.ietf.org/doc/html/rfc3986#section-5.3). Usually this method does not need +to be called manually but instead is used indirectly via `Psr\Http\Message\UriInterface::__toString`. + +### `GuzzleHttp\Psr7\Uri::fromParts` + +`public static function fromParts(array $parts): UriInterface` + +Creates a URI from a hash of [`parse_url`](https://www.php.net/manual/en/function.parse-url.php) components. + + +### `GuzzleHttp\Psr7\Uri::withQueryValue` + +`public static function withQueryValue(UriInterface $uri, $key, $value): UriInterface` + +Creates a new URI with a specific query string value. Any existing query string values that exactly match the +provided key are removed and replaced with the given key value pair. A value of null will set the query string +key without a value, e.g. "key" instead of "key=value". + +### `GuzzleHttp\Psr7\Uri::withQueryValues` + +`public static function withQueryValues(UriInterface $uri, array $keyValueArray): UriInterface` + +Creates a new URI with multiple query string values. It has the same behavior as `withQueryValue()` but for an +associative array of key => value. + +### `GuzzleHttp\Psr7\Uri::withoutQueryValue` + +`public static function withoutQueryValue(UriInterface $uri, $key): UriInterface` + +Creates a new URI with a specific query string value removed. Any existing query string values that exactly match the +provided key are removed. + +## Cross-Origin Detection + +`GuzzleHttp\Psr7\UriComparator` provides methods to determine if a modified URL should be considered cross-origin. + +### `GuzzleHttp\Psr7\UriComparator::isCrossOrigin` + +`public static function isCrossOrigin(UriInterface $original, UriInterface $modified): bool` + +Determines if a modified URL should be considered cross-origin with respect to an original URL. + +## Reference Resolution + +`GuzzleHttp\Psr7\UriResolver` provides methods to resolve a URI reference in the context of a base URI according +to [RFC 3986 Section 5](https://datatracker.ietf.org/doc/html/rfc3986#section-5). This is for example also what web +browsers do when resolving a link in a website based on the current request URI. + +### `GuzzleHttp\Psr7\UriResolver::resolve` + +`public static function resolve(UriInterface $base, UriInterface $rel): UriInterface` + +Converts the relative URI into a new URI that is resolved against the base URI. + +### `GuzzleHttp\Psr7\UriResolver::removeDotSegments` + +`public static function removeDotSegments(string $path): string` + +Removes dot segments from a path and returns the new path according to +[RFC 3986 Section 5.2.4](https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.4). + +### `GuzzleHttp\Psr7\UriResolver::relativize` + +`public static function relativize(UriInterface $base, UriInterface $target): UriInterface` + +Returns the target URI as a relative reference from the base URI. This method is the counterpart to resolve(): + +```php +(string) $target === (string) UriResolver::resolve($base, UriResolver::relativize($base, $target)) +``` + +One use-case is to use the current request URI as base URI and then generate relative links in your documents +to reduce the document size or offer self-contained downloadable document archives. + +```php +$base = new Uri('http://example.com/a/b/'); +echo UriResolver::relativize($base, new Uri('http://example.com/a/b/c')); // prints 'c'. +echo UriResolver::relativize($base, new Uri('http://example.com/a/x/y')); // prints '../x/y'. +echo UriResolver::relativize($base, new Uri('http://example.com/a/b/?q')); // prints '?q'. +echo UriResolver::relativize($base, new Uri('http://example.org/a/b/')); // prints '//example.org/a/b/'. +``` + +## Normalization and Comparison + +`GuzzleHttp\Psr7\UriNormalizer` provides methods to normalize and compare URIs according to +[RFC 3986 Section 6](https://datatracker.ietf.org/doc/html/rfc3986#section-6). + +### `GuzzleHttp\Psr7\UriNormalizer::normalize` + +`public static function normalize(UriInterface $uri, $flags = self::PRESERVING_NORMALIZATIONS): UriInterface` + +Returns a normalized URI. The scheme and host component are already normalized to lowercase per PSR-7 UriInterface. +This methods adds additional normalizations that can be configured with the `$flags` parameter which is a bitmask +of normalizations to apply. The following normalizations are available: + +- `UriNormalizer::PRESERVING_NORMALIZATIONS` + + Default normalizations which only include the ones that preserve semantics. + +- `UriNormalizer::CAPITALIZE_PERCENT_ENCODING` + + All letters within a percent-encoding triplet (e.g., "%3A") are case-insensitive, and should be capitalized. + + Example: `http://example.org/a%c2%b1b` → `http://example.org/a%C2%B1b` + +- `UriNormalizer::DECODE_UNRESERVED_CHARACTERS` + + Decodes percent-encoded octets of unreserved characters. For consistency, percent-encoded octets in the ranges of + ALPHA (%41–%5A and %61–%7A), DIGIT (%30–%39), hyphen (%2D), period (%2E), underscore (%5F), or tilde (%7E) should + not be created by URI producers and, when found in a URI, should be decoded to their corresponding unreserved + characters by URI normalizers. + + Example: `http://example.org/%7Eusern%61me/` → `http://example.org/~username/` + +- `UriNormalizer::CONVERT_EMPTY_PATH` + + Converts the empty path to "/" for http and https URIs. + + Example: `http://example.org` → `http://example.org/` + +- `UriNormalizer::REMOVE_DEFAULT_HOST` + + Removes the default host of the given URI scheme from the URI. Only the "file" scheme defines the default host + "localhost". All of `file:/myfile`, `file:///myfile`, and `file://localhost/myfile` are equivalent according to + RFC 3986. + + Example: `file://localhost/myfile` → `file:///myfile` + +- `UriNormalizer::REMOVE_DEFAULT_PORT` + + Removes the default port of the given URI scheme from the URI. + + Example: `http://example.org:80/` → `http://example.org/` + +- `UriNormalizer::REMOVE_DOT_SEGMENTS` + + Removes unnecessary dot-segments. Dot-segments in relative-path references are not removed as it would + change the semantics of the URI reference. + + Example: `http://example.org/../a/b/../c/./d.html` → `http://example.org/a/c/d.html` + +- `UriNormalizer::REMOVE_DUPLICATE_SLASHES` + + Paths which include two or more adjacent slashes are converted to one. Webservers usually ignore duplicate slashes + and treat those URIs equivalent. But in theory those URIs do not need to be equivalent. So this normalization + may change the semantics. Encoded slashes (%2F) are not removed. + + Example: `http://example.org//foo///bar.html` → `http://example.org/foo/bar.html` + +- `UriNormalizer::SORT_QUERY_PARAMETERS` + + Sort query parameters with their values in alphabetical order. However, the order of parameters in a URI may be + significant (this is not defined by the standard). So this normalization is not safe and may change the semantics + of the URI. + + Example: `?lang=en&article=fred` → `?article=fred&lang=en` + +### `GuzzleHttp\Psr7\UriNormalizer::isEquivalent` + +`public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, $normalizations = self::PRESERVING_NORMALIZATIONS): bool` + +Whether two URIs can be considered equivalent. Both URIs are normalized automatically before comparison with the given +`$normalizations` bitmask. The method also accepts relative URI references and returns true when they are equivalent. +This of course assumes they will be resolved against the same base URI. If this is not the case, determination of +equivalence or difference of relative references does not mean anything. + + +## Security + +If you discover a security vulnerability within this package, please send an email to security@tidelift.com. All security vulnerabilities will be promptly addressed. Please do not disclose security-related issues publicly until a fix has been announced. Please see [Security Policy](https://github.com/guzzle/psr7/security/policy) for more information. + + +## License + +Guzzle is made available under the MIT License (MIT). Please see [License File](LICENSE) for more information. + + +## For Enterprise + +Available as part of the Tidelift Subscription + +The maintainers of Guzzle and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/packagist-guzzlehttp-psr7?utm_source=packagist-guzzlehttp-psr7&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) diff --git a/vendor/guzzlehttp/psr7/composer.json b/vendor/guzzlehttp/psr7/composer.json new file mode 100644 index 0000000..28d15f5 --- /dev/null +++ b/vendor/guzzlehttp/psr7/composer.json @@ -0,0 +1,93 @@ +{ + "name": "guzzlehttp/psr7", + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "request", + "response", + "message", + "stream", + "http", + "uri", + "url", + "psr-7" + ], + "license": "MIT", + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" + } + ], + "require": { + "php": "^7.2.5 || ^8.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.1 || ^2.0", + "ralouphie/getallheaders": "^3.0" + }, + "provide": { + "psr/http-factory-implementation": "1.0", + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "http-interop/http-factory-tests": "0.9.0", + "phpunit/phpunit": "^8.5.39 || ^9.6.20" + }, + "suggest": { + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "GuzzleHttp\\Tests\\Psr7\\": "tests/" + } + }, + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "config": { + "allow-plugins": { + "bamarni/composer-bin-plugin": true + }, + "preferred-install": "dist", + "sort-packages": true + } +} diff --git a/vendor/guzzlehttp/psr7/src/AppendStream.php b/vendor/guzzlehttp/psr7/src/AppendStream.php new file mode 100644 index 0000000..ee8f378 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/AppendStream.php @@ -0,0 +1,248 @@ +addStream($stream); + } + } + + public function __toString(): string + { + try { + $this->rewind(); + + return $this->getContents(); + } catch (\Throwable $e) { + if (\PHP_VERSION_ID >= 70400) { + throw $e; + } + trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR); + + return ''; + } + } + + /** + * Add a stream to the AppendStream + * + * @param StreamInterface $stream Stream to append. Must be readable. + * + * @throws \InvalidArgumentException if the stream is not readable + */ + public function addStream(StreamInterface $stream): void + { + if (!$stream->isReadable()) { + throw new \InvalidArgumentException('Each stream must be readable'); + } + + // The stream is only seekable if all streams are seekable + if (!$stream->isSeekable()) { + $this->seekable = false; + } + + $this->streams[] = $stream; + } + + public function getContents(): string + { + return Utils::copyToString($this); + } + + /** + * Closes each attached stream. + */ + public function close(): void + { + $this->pos = $this->current = 0; + $this->seekable = true; + + foreach ($this->streams as $stream) { + $stream->close(); + } + + $this->streams = []; + } + + /** + * Detaches each attached stream. + * + * Returns null as it's not clear which underlying stream resource to return. + */ + public function detach() + { + $this->pos = $this->current = 0; + $this->seekable = true; + + foreach ($this->streams as $stream) { + $stream->detach(); + } + + $this->streams = []; + + return null; + } + + public function tell(): int + { + return $this->pos; + } + + /** + * Tries to calculate the size by adding the size of each stream. + * + * If any of the streams do not return a valid number, then the size of the + * append stream cannot be determined and null is returned. + */ + public function getSize(): ?int + { + $size = 0; + + foreach ($this->streams as $stream) { + $s = $stream->getSize(); + if ($s === null) { + return null; + } + $size += $s; + } + + return $size; + } + + public function eof(): bool + { + return !$this->streams + || ($this->current >= count($this->streams) - 1 + && $this->streams[$this->current]->eof()); + } + + public function rewind(): void + { + $this->seek(0); + } + + /** + * Attempts to seek to the given position. Only supports SEEK_SET. + */ + public function seek($offset, $whence = SEEK_SET): void + { + if (!$this->seekable) { + throw new \RuntimeException('This AppendStream is not seekable'); + } elseif ($whence !== SEEK_SET) { + throw new \RuntimeException('The AppendStream can only seek with SEEK_SET'); + } + + $this->pos = $this->current = 0; + + // Rewind each stream + foreach ($this->streams as $i => $stream) { + try { + $stream->rewind(); + } catch (\Exception $e) { + throw new \RuntimeException('Unable to seek stream ' + .$i.' of the AppendStream', 0, $e); + } + } + + // Seek to the actual position by reading from each stream + while ($this->pos < $offset && !$this->eof()) { + $result = $this->read(min(8096, $offset - $this->pos)); + if ($result === '') { + break; + } + } + } + + /** + * Reads from all of the appended streams until the length is met or EOF. + */ + public function read($length): string + { + $buffer = ''; + $total = count($this->streams) - 1; + $remaining = $length; + $progressToNext = false; + + while ($remaining > 0) { + // Progress to the next stream if needed. + if ($progressToNext || $this->streams[$this->current]->eof()) { + $progressToNext = false; + if ($this->current === $total) { + break; + } + ++$this->current; + } + + $result = $this->streams[$this->current]->read($remaining); + + if ($result === '') { + $progressToNext = true; + continue; + } + + $buffer .= $result; + $remaining = $length - strlen($buffer); + } + + $this->pos += strlen($buffer); + + return $buffer; + } + + public function isReadable(): bool + { + return true; + } + + public function isWritable(): bool + { + return false; + } + + public function isSeekable(): bool + { + return $this->seekable; + } + + public function write($string): int + { + throw new \RuntimeException('Cannot write to an AppendStream'); + } + + /** + * @return mixed + */ + public function getMetadata($key = null) + { + return $key ? null : []; + } +} diff --git a/vendor/guzzlehttp/psr7/src/BufferStream.php b/vendor/guzzlehttp/psr7/src/BufferStream.php new file mode 100644 index 0000000..2b0eb77 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/BufferStream.php @@ -0,0 +1,147 @@ +hwm = $hwm; + } + + public function __toString(): string + { + return $this->getContents(); + } + + public function getContents(): string + { + $buffer = $this->buffer; + $this->buffer = ''; + + return $buffer; + } + + public function close(): void + { + $this->buffer = ''; + } + + public function detach() + { + $this->close(); + + return null; + } + + public function getSize(): ?int + { + return strlen($this->buffer); + } + + public function isReadable(): bool + { + return true; + } + + public function isWritable(): bool + { + return true; + } + + public function isSeekable(): bool + { + return false; + } + + public function rewind(): void + { + $this->seek(0); + } + + public function seek($offset, $whence = SEEK_SET): void + { + throw new \RuntimeException('Cannot seek a BufferStream'); + } + + public function eof(): bool + { + return strlen($this->buffer) === 0; + } + + public function tell(): int + { + throw new \RuntimeException('Cannot determine the position of a BufferStream'); + } + + /** + * Reads data from the buffer. + */ + public function read($length): string + { + $currentLength = strlen($this->buffer); + + if ($length >= $currentLength) { + // No need to slice the buffer because we don't have enough data. + $result = $this->buffer; + $this->buffer = ''; + } else { + // Slice up the result to provide a subset of the buffer. + $result = substr($this->buffer, 0, $length); + $this->buffer = substr($this->buffer, $length); + } + + return $result; + } + + /** + * Writes data to the buffer. + */ + public function write($string): int + { + $this->buffer .= $string; + + if (strlen($this->buffer) >= $this->hwm) { + return 0; + } + + return strlen($string); + } + + /** + * @return mixed + */ + public function getMetadata($key = null) + { + if ($key === 'hwm') { + return $this->hwm; + } + + return $key ? null : []; + } +} diff --git a/vendor/guzzlehttp/psr7/src/CachingStream.php b/vendor/guzzlehttp/psr7/src/CachingStream.php new file mode 100644 index 0000000..7e4554d --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/CachingStream.php @@ -0,0 +1,153 @@ +remoteStream = $stream; + $this->stream = $target ?: new Stream(Utils::tryFopen('php://temp', 'r+')); + } + + public function getSize(): ?int + { + $remoteSize = $this->remoteStream->getSize(); + + if (null === $remoteSize) { + return null; + } + + return max($this->stream->getSize(), $remoteSize); + } + + public function rewind(): void + { + $this->seek(0); + } + + public function seek($offset, $whence = SEEK_SET): void + { + if ($whence === SEEK_SET) { + $byte = $offset; + } elseif ($whence === SEEK_CUR) { + $byte = $offset + $this->tell(); + } elseif ($whence === SEEK_END) { + $size = $this->remoteStream->getSize(); + if ($size === null) { + $size = $this->cacheEntireStream(); + } + $byte = $size + $offset; + } else { + throw new \InvalidArgumentException('Invalid whence'); + } + + $diff = $byte - $this->stream->getSize(); + + if ($diff > 0) { + // Read the remoteStream until we have read in at least the amount + // of bytes requested, or we reach the end of the file. + while ($diff > 0 && !$this->remoteStream->eof()) { + $this->read($diff); + $diff = $byte - $this->stream->getSize(); + } + } else { + // We can just do a normal seek since we've already seen this byte. + $this->stream->seek($byte); + } + } + + public function read($length): string + { + // Perform a regular read on any previously read data from the buffer + $data = $this->stream->read($length); + $remaining = $length - strlen($data); + + // More data was requested so read from the remote stream + if ($remaining) { + // If data was written to the buffer in a position that would have + // been filled from the remote stream, then we must skip bytes on + // the remote stream to emulate overwriting bytes from that + // position. This mimics the behavior of other PHP stream wrappers. + $remoteData = $this->remoteStream->read( + $remaining + $this->skipReadBytes + ); + + if ($this->skipReadBytes) { + $len = strlen($remoteData); + $remoteData = substr($remoteData, $this->skipReadBytes); + $this->skipReadBytes = max(0, $this->skipReadBytes - $len); + } + + $data .= $remoteData; + $this->stream->write($remoteData); + } + + return $data; + } + + public function write($string): int + { + // When appending to the end of the currently read stream, you'll want + // to skip bytes from being read from the remote stream to emulate + // other stream wrappers. Basically replacing bytes of data of a fixed + // length. + $overflow = (strlen($string) + $this->tell()) - $this->remoteStream->tell(); + if ($overflow > 0) { + $this->skipReadBytes += $overflow; + } + + return $this->stream->write($string); + } + + public function eof(): bool + { + return $this->stream->eof() && $this->remoteStream->eof(); + } + + /** + * Close both the remote stream and buffer stream + */ + public function close(): void + { + $this->remoteStream->close(); + $this->stream->close(); + } + + private function cacheEntireStream(): int + { + $target = new FnStream(['write' => 'strlen']); + Utils::copyToStream($this, $target); + + return $this->tell(); + } +} diff --git a/vendor/guzzlehttp/psr7/src/DroppingStream.php b/vendor/guzzlehttp/psr7/src/DroppingStream.php new file mode 100644 index 0000000..6e3d209 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/DroppingStream.php @@ -0,0 +1,49 @@ +stream = $stream; + $this->maxLength = $maxLength; + } + + public function write($string): int + { + $diff = $this->maxLength - $this->stream->getSize(); + + // Begin returning 0 when the underlying stream is too large. + if ($diff <= 0) { + return 0; + } + + // Write the stream or a subset of the stream if needed. + if (strlen($string) < $diff) { + return $this->stream->write($string); + } + + return $this->stream->write(substr($string, 0, $diff)); + } +} diff --git a/vendor/guzzlehttp/psr7/src/Exception/MalformedUriException.php b/vendor/guzzlehttp/psr7/src/Exception/MalformedUriException.php new file mode 100644 index 0000000..3a08477 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/Exception/MalformedUriException.php @@ -0,0 +1,14 @@ + */ + private $methods; + + /** + * @param array $methods Hash of method name to a callable. + */ + public function __construct(array $methods) + { + $this->methods = $methods; + + // Create the functions on the class + foreach ($methods as $name => $fn) { + $this->{'_fn_'.$name} = $fn; + } + } + + /** + * Lazily determine which methods are not implemented. + * + * @throws \BadMethodCallException + */ + public function __get(string $name): void + { + throw new \BadMethodCallException(str_replace('_fn_', '', $name) + .'() is not implemented in the FnStream'); + } + + /** + * The close method is called on the underlying stream only if possible. + */ + public function __destruct() + { + if (isset($this->_fn_close)) { + ($this->_fn_close)(); + } + } + + /** + * An unserialize would allow the __destruct to run when the unserialized value goes out of scope. + * + * @throws \LogicException + */ + public function __wakeup(): void + { + throw new \LogicException('FnStream should never be unserialized'); + } + + /** + * Adds custom functionality to an underlying stream by intercepting + * specific method calls. + * + * @param StreamInterface $stream Stream to decorate + * @param array $methods Hash of method name to a closure + * + * @return FnStream + */ + public static function decorate(StreamInterface $stream, array $methods) + { + // If any of the required methods were not provided, then simply + // proxy to the decorated stream. + foreach (array_diff(self::SLOTS, array_keys($methods)) as $diff) { + /** @var callable $callable */ + $callable = [$stream, $diff]; + $methods[$diff] = $callable; + } + + return new self($methods); + } + + public function __toString(): string + { + try { + /** @var string */ + return ($this->_fn___toString)(); + } catch (\Throwable $e) { + if (\PHP_VERSION_ID >= 70400) { + throw $e; + } + trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR); + + return ''; + } + } + + public function close(): void + { + ($this->_fn_close)(); + } + + public function detach() + { + return ($this->_fn_detach)(); + } + + public function getSize(): ?int + { + return ($this->_fn_getSize)(); + } + + public function tell(): int + { + return ($this->_fn_tell)(); + } + + public function eof(): bool + { + return ($this->_fn_eof)(); + } + + public function isSeekable(): bool + { + return ($this->_fn_isSeekable)(); + } + + public function rewind(): void + { + ($this->_fn_rewind)(); + } + + public function seek($offset, $whence = SEEK_SET): void + { + ($this->_fn_seek)($offset, $whence); + } + + public function isWritable(): bool + { + return ($this->_fn_isWritable)(); + } + + public function write($string): int + { + return ($this->_fn_write)($string); + } + + public function isReadable(): bool + { + return ($this->_fn_isReadable)(); + } + + public function read($length): string + { + return ($this->_fn_read)($length); + } + + public function getContents(): string + { + return ($this->_fn_getContents)(); + } + + /** + * @return mixed + */ + public function getMetadata($key = null) + { + return ($this->_fn_getMetadata)($key); + } +} diff --git a/vendor/guzzlehttp/psr7/src/Header.php b/vendor/guzzlehttp/psr7/src/Header.php new file mode 100644 index 0000000..bbce8b0 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/Header.php @@ -0,0 +1,134 @@ +]+>|[^=]+/', $kvp, $matches)) { + $m = $matches[0]; + if (isset($m[1])) { + $part[trim($m[0], $trimmed)] = trim($m[1], $trimmed); + } else { + $part[] = trim($m[0], $trimmed); + } + } + } + if ($part) { + $params[] = $part; + } + } + } + + return $params; + } + + /** + * Converts an array of header values that may contain comma separated + * headers into an array of headers with no comma separated values. + * + * @param string|array $header Header to normalize. + * + * @deprecated Use self::splitList() instead. + */ + public static function normalize($header): array + { + $result = []; + foreach ((array) $header as $value) { + foreach (self::splitList($value) as $parsed) { + $result[] = $parsed; + } + } + + return $result; + } + + /** + * Splits a HTTP header defined to contain a comma-separated list into + * each individual value. Empty values will be removed. + * + * Example headers include 'accept', 'cache-control' and 'if-none-match'. + * + * This method must not be used to parse headers that are not defined as + * a list, such as 'user-agent' or 'set-cookie'. + * + * @param string|string[] $values Header value as returned by MessageInterface::getHeader() + * + * @return string[] + */ + public static function splitList($values): array + { + if (!\is_array($values)) { + $values = [$values]; + } + + $result = []; + foreach ($values as $value) { + if (!\is_string($value)) { + throw new \TypeError('$header must either be a string or an array containing strings.'); + } + + $v = ''; + $isQuoted = false; + $isEscaped = false; + for ($i = 0, $max = \strlen($value); $i < $max; ++$i) { + if ($isEscaped) { + $v .= $value[$i]; + $isEscaped = false; + + continue; + } + + if (!$isQuoted && $value[$i] === ',') { + $v = \trim($v); + if ($v !== '') { + $result[] = $v; + } + + $v = ''; + continue; + } + + if ($isQuoted && $value[$i] === '\\') { + $isEscaped = true; + $v .= $value[$i]; + + continue; + } + if ($value[$i] === '"') { + $isQuoted = !$isQuoted; + $v .= $value[$i]; + + continue; + } + + $v .= $value[$i]; + } + + $v = \trim($v); + if ($v !== '') { + $result[] = $v; + } + } + + return $result; + } +} diff --git a/vendor/guzzlehttp/psr7/src/HttpFactory.php b/vendor/guzzlehttp/psr7/src/HttpFactory.php new file mode 100644 index 0000000..3ef1510 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/HttpFactory.php @@ -0,0 +1,94 @@ +getSize(); + } + + return new UploadedFile($stream, $size, $error, $clientFilename, $clientMediaType); + } + + public function createStream(string $content = ''): StreamInterface + { + return Utils::streamFor($content); + } + + public function createStreamFromFile(string $file, string $mode = 'r'): StreamInterface + { + try { + $resource = Utils::tryFopen($file, $mode); + } catch (\RuntimeException $e) { + if ('' === $mode || false === \in_array($mode[0], ['r', 'w', 'a', 'x', 'c'], true)) { + throw new \InvalidArgumentException(sprintf('Invalid file opening mode "%s"', $mode), 0, $e); + } + + throw $e; + } + + return Utils::streamFor($resource); + } + + public function createStreamFromResource($resource): StreamInterface + { + return Utils::streamFor($resource); + } + + public function createServerRequest(string $method, $uri, array $serverParams = []): ServerRequestInterface + { + if (empty($method)) { + if (!empty($serverParams['REQUEST_METHOD'])) { + $method = $serverParams['REQUEST_METHOD']; + } else { + throw new \InvalidArgumentException('Cannot determine HTTP method'); + } + } + + return new ServerRequest($method, $uri, [], null, '1.1', $serverParams); + } + + public function createResponse(int $code = 200, string $reasonPhrase = ''): ResponseInterface + { + return new Response($code, [], null, '1.1', $reasonPhrase); + } + + public function createRequest(string $method, $uri): RequestInterface + { + return new Request($method, $uri); + } + + public function createUri(string $uri = ''): UriInterface + { + return new Uri($uri); + } +} diff --git a/vendor/guzzlehttp/psr7/src/InflateStream.php b/vendor/guzzlehttp/psr7/src/InflateStream.php new file mode 100644 index 0000000..e674c9a --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/InflateStream.php @@ -0,0 +1,37 @@ + 15 + 32]); + $this->stream = $stream->isSeekable() ? new Stream($resource) : new NoSeekStream(new Stream($resource)); + } +} diff --git a/vendor/guzzlehttp/psr7/src/LazyOpenStream.php b/vendor/guzzlehttp/psr7/src/LazyOpenStream.php new file mode 100644 index 0000000..f6c8490 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/LazyOpenStream.php @@ -0,0 +1,49 @@ +filename = $filename; + $this->mode = $mode; + + // unsetting the property forces the first access to go through + // __get(). + unset($this->stream); + } + + /** + * Creates the underlying stream lazily when required. + */ + protected function createStream(): StreamInterface + { + return Utils::streamFor(Utils::tryFopen($this->filename, $this->mode)); + } +} diff --git a/vendor/guzzlehttp/psr7/src/LimitStream.php b/vendor/guzzlehttp/psr7/src/LimitStream.php new file mode 100644 index 0000000..fb22325 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/LimitStream.php @@ -0,0 +1,157 @@ +stream = $stream; + $this->setLimit($limit); + $this->setOffset($offset); + } + + public function eof(): bool + { + // Always return true if the underlying stream is EOF + if ($this->stream->eof()) { + return true; + } + + // No limit and the underlying stream is not at EOF + if ($this->limit === -1) { + return false; + } + + return $this->stream->tell() >= $this->offset + $this->limit; + } + + /** + * Returns the size of the limited subset of data + */ + public function getSize(): ?int + { + if (null === ($length = $this->stream->getSize())) { + return null; + } elseif ($this->limit === -1) { + return $length - $this->offset; + } else { + return min($this->limit, $length - $this->offset); + } + } + + /** + * Allow for a bounded seek on the read limited stream + */ + public function seek($offset, $whence = SEEK_SET): void + { + if ($whence !== SEEK_SET || $offset < 0) { + throw new \RuntimeException(sprintf( + 'Cannot seek to offset %s with whence %s', + $offset, + $whence + )); + } + + $offset += $this->offset; + + if ($this->limit !== -1) { + if ($offset > $this->offset + $this->limit) { + $offset = $this->offset + $this->limit; + } + } + + $this->stream->seek($offset); + } + + /** + * Give a relative tell() + */ + public function tell(): int + { + return $this->stream->tell() - $this->offset; + } + + /** + * Set the offset to start limiting from + * + * @param int $offset Offset to seek to and begin byte limiting from + * + * @throws \RuntimeException if the stream cannot be seeked. + */ + public function setOffset(int $offset): void + { + $current = $this->stream->tell(); + + if ($current !== $offset) { + // If the stream cannot seek to the offset position, then read to it + if ($this->stream->isSeekable()) { + $this->stream->seek($offset); + } elseif ($current > $offset) { + throw new \RuntimeException("Could not seek to stream offset $offset"); + } else { + $this->stream->read($offset - $current); + } + } + + $this->offset = $offset; + } + + /** + * Set the limit of bytes that the decorator allows to be read from the + * stream. + * + * @param int $limit Number of bytes to allow to be read from the stream. + * Use -1 for no limit. + */ + public function setLimit(int $limit): void + { + $this->limit = $limit; + } + + public function read($length): string + { + if ($this->limit === -1) { + return $this->stream->read($length); + } + + // Check if the current position is less than the total allowed + // bytes + original offset + $remaining = ($this->offset + $this->limit) - $this->stream->tell(); + if ($remaining > 0) { + // Only return the amount of requested data, ensuring that the byte + // limit is not exceeded + return $this->stream->read(min($remaining, $length)); + } + + return ''; + } +} diff --git a/vendor/guzzlehttp/psr7/src/Message.php b/vendor/guzzlehttp/psr7/src/Message.php new file mode 100644 index 0000000..5561a51 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/Message.php @@ -0,0 +1,246 @@ +getMethod().' ' + .$message->getRequestTarget()) + .' HTTP/'.$message->getProtocolVersion(); + if (!$message->hasHeader('host')) { + $msg .= "\r\nHost: ".$message->getUri()->getHost(); + } + } elseif ($message instanceof ResponseInterface) { + $msg = 'HTTP/'.$message->getProtocolVersion().' ' + .$message->getStatusCode().' ' + .$message->getReasonPhrase(); + } else { + throw new \InvalidArgumentException('Unknown message type'); + } + + foreach ($message->getHeaders() as $name => $values) { + if (is_string($name) && strtolower($name) === 'set-cookie') { + foreach ($values as $value) { + $msg .= "\r\n{$name}: ".$value; + } + } else { + $msg .= "\r\n{$name}: ".implode(', ', $values); + } + } + + return "{$msg}\r\n\r\n".$message->getBody(); + } + + /** + * Get a short summary of the message body. + * + * Will return `null` if the response is not printable. + * + * @param MessageInterface $message The message to get the body summary + * @param int $truncateAt The maximum allowed size of the summary + */ + public static function bodySummary(MessageInterface $message, int $truncateAt = 120): ?string + { + $body = $message->getBody(); + + if (!$body->isSeekable() || !$body->isReadable()) { + return null; + } + + $size = $body->getSize(); + + if ($size === 0) { + return null; + } + + $body->rewind(); + $summary = $body->read($truncateAt); + $body->rewind(); + + if ($size > $truncateAt) { + $summary .= ' (truncated...)'; + } + + // Matches any printable character, including unicode characters: + // letters, marks, numbers, punctuation, spacing, and separators. + if (preg_match('/[^\pL\pM\pN\pP\pS\pZ\n\r\t]/u', $summary) !== 0) { + return null; + } + + return $summary; + } + + /** + * Attempts to rewind a message body and throws an exception on failure. + * + * The body of the message will only be rewound if a call to `tell()` + * returns a value other than `0`. + * + * @param MessageInterface $message Message to rewind + * + * @throws \RuntimeException + */ + public static function rewindBody(MessageInterface $message): void + { + $body = $message->getBody(); + + if ($body->tell()) { + $body->rewind(); + } + } + + /** + * Parses an HTTP message into an associative array. + * + * The array contains the "start-line" key containing the start line of + * the message, "headers" key containing an associative array of header + * array values, and a "body" key containing the body of the message. + * + * @param string $message HTTP request or response to parse. + */ + public static function parseMessage(string $message): array + { + if (!$message) { + throw new \InvalidArgumentException('Invalid message'); + } + + $message = ltrim($message, "\r\n"); + + $messageParts = preg_split("/\r?\n\r?\n/", $message, 2); + + if ($messageParts === false || count($messageParts) !== 2) { + throw new \InvalidArgumentException('Invalid message: Missing header delimiter'); + } + + [$rawHeaders, $body] = $messageParts; + $rawHeaders .= "\r\n"; // Put back the delimiter we split previously + $headerParts = preg_split("/\r?\n/", $rawHeaders, 2); + + if ($headerParts === false || count($headerParts) !== 2) { + throw new \InvalidArgumentException('Invalid message: Missing status line'); + } + + [$startLine, $rawHeaders] = $headerParts; + + if (preg_match("/(?:^HTTP\/|^[A-Z]+ \S+ HTTP\/)(\d+(?:\.\d+)?)/i", $startLine, $matches) && $matches[1] === '1.0') { + // Header folding is deprecated for HTTP/1.1, but allowed in HTTP/1.0 + $rawHeaders = preg_replace(Rfc7230::HEADER_FOLD_REGEX, ' ', $rawHeaders); + } + + /** @var array[] $headerLines */ + $count = preg_match_all(Rfc7230::HEADER_REGEX, $rawHeaders, $headerLines, PREG_SET_ORDER); + + // If these aren't the same, then one line didn't match and there's an invalid header. + if ($count !== substr_count($rawHeaders, "\n")) { + // Folding is deprecated, see https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.4 + if (preg_match(Rfc7230::HEADER_FOLD_REGEX, $rawHeaders)) { + throw new \InvalidArgumentException('Invalid header syntax: Obsolete line folding'); + } + + throw new \InvalidArgumentException('Invalid header syntax'); + } + + $headers = []; + + foreach ($headerLines as $headerLine) { + $headers[$headerLine[1]][] = $headerLine[2]; + } + + return [ + 'start-line' => $startLine, + 'headers' => $headers, + 'body' => $body, + ]; + } + + /** + * Constructs a URI for an HTTP request message. + * + * @param string $path Path from the start-line + * @param array $headers Array of headers (each value an array). + */ + public static function parseRequestUri(string $path, array $headers): string + { + $hostKey = array_filter(array_keys($headers), function ($k) { + // Numeric array keys are converted to int by PHP. + $k = (string) $k; + + return strtolower($k) === 'host'; + }); + + // If no host is found, then a full URI cannot be constructed. + if (!$hostKey) { + return $path; + } + + $host = $headers[reset($hostKey)][0]; + $scheme = substr($host, -4) === ':443' ? 'https' : 'http'; + + return $scheme.'://'.$host.'/'.ltrim($path, '/'); + } + + /** + * Parses a request message string into a request object. + * + * @param string $message Request message string. + */ + public static function parseRequest(string $message): RequestInterface + { + $data = self::parseMessage($message); + $matches = []; + if (!preg_match('/^[\S]+\s+([a-zA-Z]+:\/\/|\/).*/', $data['start-line'], $matches)) { + throw new \InvalidArgumentException('Invalid request string'); + } + $parts = explode(' ', $data['start-line'], 3); + $version = isset($parts[2]) ? explode('/', $parts[2])[1] : '1.1'; + + $request = new Request( + $parts[0], + $matches[1] === '/' ? self::parseRequestUri($parts[1], $data['headers']) : $parts[1], + $data['headers'], + $data['body'], + $version + ); + + return $matches[1] === '/' ? $request : $request->withRequestTarget($parts[1]); + } + + /** + * Parses a response message string into a response object. + * + * @param string $message Response message string. + */ + public static function parseResponse(string $message): ResponseInterface + { + $data = self::parseMessage($message); + // According to https://datatracker.ietf.org/doc/html/rfc7230#section-3.1.2 + // the space between status-code and reason-phrase is required. But + // browsers accept responses without space and reason as well. + if (!preg_match('/^HTTP\/.* [0-9]{3}( .*|$)/', $data['start-line'])) { + throw new \InvalidArgumentException('Invalid response string: '.$data['start-line']); + } + $parts = explode(' ', $data['start-line'], 3); + + return new Response( + (int) $parts[1], + $data['headers'], + $data['body'], + explode('/', $parts[0])[1], + $parts[2] ?? null + ); + } +} diff --git a/vendor/guzzlehttp/psr7/src/MessageTrait.php b/vendor/guzzlehttp/psr7/src/MessageTrait.php new file mode 100644 index 0000000..65dbc4b --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/MessageTrait.php @@ -0,0 +1,265 @@ + array of values */ + private $headers = []; + + /** @var string[] Map of lowercase header name => original name at registration */ + private $headerNames = []; + + /** @var string */ + private $protocol = '1.1'; + + /** @var StreamInterface|null */ + private $stream; + + public function getProtocolVersion(): string + { + return $this->protocol; + } + + public function withProtocolVersion($version): MessageInterface + { + if ($this->protocol === $version) { + return $this; + } + + $new = clone $this; + $new->protocol = $version; + + return $new; + } + + public function getHeaders(): array + { + return $this->headers; + } + + public function hasHeader($header): bool + { + return isset($this->headerNames[strtolower($header)]); + } + + public function getHeader($header): array + { + $header = strtolower($header); + + if (!isset($this->headerNames[$header])) { + return []; + } + + $header = $this->headerNames[$header]; + + return $this->headers[$header]; + } + + public function getHeaderLine($header): string + { + return implode(', ', $this->getHeader($header)); + } + + public function withHeader($header, $value): MessageInterface + { + $this->assertHeader($header); + $value = $this->normalizeHeaderValue($value); + $normalized = strtolower($header); + + $new = clone $this; + if (isset($new->headerNames[$normalized])) { + unset($new->headers[$new->headerNames[$normalized]]); + } + $new->headerNames[$normalized] = $header; + $new->headers[$header] = $value; + + return $new; + } + + public function withAddedHeader($header, $value): MessageInterface + { + $this->assertHeader($header); + $value = $this->normalizeHeaderValue($value); + $normalized = strtolower($header); + + $new = clone $this; + if (isset($new->headerNames[$normalized])) { + $header = $this->headerNames[$normalized]; + $new->headers[$header] = array_merge($this->headers[$header], $value); + } else { + $new->headerNames[$normalized] = $header; + $new->headers[$header] = $value; + } + + return $new; + } + + public function withoutHeader($header): MessageInterface + { + $normalized = strtolower($header); + + if (!isset($this->headerNames[$normalized])) { + return $this; + } + + $header = $this->headerNames[$normalized]; + + $new = clone $this; + unset($new->headers[$header], $new->headerNames[$normalized]); + + return $new; + } + + public function getBody(): StreamInterface + { + if (!$this->stream) { + $this->stream = Utils::streamFor(''); + } + + return $this->stream; + } + + public function withBody(StreamInterface $body): MessageInterface + { + if ($body === $this->stream) { + return $this; + } + + $new = clone $this; + $new->stream = $body; + + return $new; + } + + /** + * @param (string|string[])[] $headers + */ + private function setHeaders(array $headers): void + { + $this->headerNames = $this->headers = []; + foreach ($headers as $header => $value) { + // Numeric array keys are converted to int by PHP. + $header = (string) $header; + + $this->assertHeader($header); + $value = $this->normalizeHeaderValue($value); + $normalized = strtolower($header); + if (isset($this->headerNames[$normalized])) { + $header = $this->headerNames[$normalized]; + $this->headers[$header] = array_merge($this->headers[$header], $value); + } else { + $this->headerNames[$normalized] = $header; + $this->headers[$header] = $value; + } + } + } + + /** + * @param mixed $value + * + * @return string[] + */ + private function normalizeHeaderValue($value): array + { + if (!is_array($value)) { + return $this->trimAndValidateHeaderValues([$value]); + } + + if (count($value) === 0) { + throw new \InvalidArgumentException('Header value can not be an empty array.'); + } + + return $this->trimAndValidateHeaderValues($value); + } + + /** + * Trims whitespace from the header values. + * + * Spaces and tabs ought to be excluded by parsers when extracting the field value from a header field. + * + * header-field = field-name ":" OWS field-value OWS + * OWS = *( SP / HTAB ) + * + * @param mixed[] $values Header values + * + * @return string[] Trimmed header values + * + * @see https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.4 + */ + private function trimAndValidateHeaderValues(array $values): array + { + return array_map(function ($value) { + if (!is_scalar($value) && null !== $value) { + throw new \InvalidArgumentException(sprintf( + 'Header value must be scalar or null but %s provided.', + is_object($value) ? get_class($value) : gettype($value) + )); + } + + $trimmed = trim((string) $value, " \t"); + $this->assertValue($trimmed); + + return $trimmed; + }, array_values($values)); + } + + /** + * @see https://datatracker.ietf.org/doc/html/rfc7230#section-3.2 + * + * @param mixed $header + */ + private function assertHeader($header): void + { + if (!is_string($header)) { + throw new \InvalidArgumentException(sprintf( + 'Header name must be a string but %s provided.', + is_object($header) ? get_class($header) : gettype($header) + )); + } + + if (!preg_match('/^[a-zA-Z0-9\'`#$%&*+.^_|~!-]+$/D', $header)) { + throw new \InvalidArgumentException( + sprintf('"%s" is not valid header name.', $header) + ); + } + } + + /** + * @see https://datatracker.ietf.org/doc/html/rfc7230#section-3.2 + * + * field-value = *( field-content / obs-fold ) + * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] + * field-vchar = VCHAR / obs-text + * VCHAR = %x21-7E + * obs-text = %x80-FF + * obs-fold = CRLF 1*( SP / HTAB ) + */ + private function assertValue(string $value): void + { + // The regular expression intentionally does not support the obs-fold production, because as + // per RFC 7230#3.2.4: + // + // A sender MUST NOT generate a message that includes + // line folding (i.e., that has any field-value that contains a match to + // the obs-fold rule) unless the message is intended for packaging + // within the message/http media type. + // + // Clients must not send a request with line folding and a server sending folded headers is + // likely very rare. Line folding is a fairly obscure feature of HTTP/1.1 and thus not accepting + // folding is not likely to break any legitimate use case. + if (!preg_match('/^[\x20\x09\x21-\x7E\x80-\xFF]*$/D', $value)) { + throw new \InvalidArgumentException( + sprintf('"%s" is not valid header value.', $value) + ); + } + } +} diff --git a/vendor/guzzlehttp/psr7/src/MimeType.php b/vendor/guzzlehttp/psr7/src/MimeType.php new file mode 100644 index 0000000..b131bdb --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/MimeType.php @@ -0,0 +1,1259 @@ + 'application/vnd.1000minds.decision-model+xml', + '3dml' => 'text/vnd.in3d.3dml', + '3ds' => 'image/x-3ds', + '3g2' => 'video/3gpp2', + '3gp' => 'video/3gp', + '3gpp' => 'video/3gpp', + '3mf' => 'model/3mf', + '7z' => 'application/x-7z-compressed', + '7zip' => 'application/x-7z-compressed', + '123' => 'application/vnd.lotus-1-2-3', + 'aab' => 'application/x-authorware-bin', + 'aac' => 'audio/aac', + 'aam' => 'application/x-authorware-map', + 'aas' => 'application/x-authorware-seg', + 'abw' => 'application/x-abiword', + 'ac' => 'application/vnd.nokia.n-gage.ac+xml', + 'ac3' => 'audio/ac3', + 'acc' => 'application/vnd.americandynamics.acc', + 'ace' => 'application/x-ace-compressed', + 'acu' => 'application/vnd.acucobol', + 'acutc' => 'application/vnd.acucorp', + 'adp' => 'audio/adpcm', + 'adts' => 'audio/aac', + 'aep' => 'application/vnd.audiograph', + 'afm' => 'application/x-font-type1', + 'afp' => 'application/vnd.ibm.modcap', + 'age' => 'application/vnd.age', + 'ahead' => 'application/vnd.ahead.space', + 'ai' => 'application/pdf', + 'aif' => 'audio/x-aiff', + 'aifc' => 'audio/x-aiff', + 'aiff' => 'audio/x-aiff', + 'air' => 'application/vnd.adobe.air-application-installer-package+zip', + 'ait' => 'application/vnd.dvb.ait', + 'ami' => 'application/vnd.amiga.ami', + 'aml' => 'application/automationml-aml+xml', + 'amlx' => 'application/automationml-amlx+zip', + 'amr' => 'audio/amr', + 'apk' => 'application/vnd.android.package-archive', + 'apng' => 'image/apng', + 'appcache' => 'text/cache-manifest', + 'appinstaller' => 'application/appinstaller', + 'application' => 'application/x-ms-application', + 'appx' => 'application/appx', + 'appxbundle' => 'application/appxbundle', + 'apr' => 'application/vnd.lotus-approach', + 'arc' => 'application/x-freearc', + 'arj' => 'application/x-arj', + 'asc' => 'application/pgp-signature', + 'asf' => 'video/x-ms-asf', + 'asm' => 'text/x-asm', + 'aso' => 'application/vnd.accpac.simply.aso', + 'asx' => 'video/x-ms-asf', + 'atc' => 'application/vnd.acucorp', + 'atom' => 'application/atom+xml', + 'atomcat' => 'application/atomcat+xml', + 'atomdeleted' => 'application/atomdeleted+xml', + 'atomsvc' => 'application/atomsvc+xml', + 'atx' => 'application/vnd.antix.game-component', + 'au' => 'audio/x-au', + 'avci' => 'image/avci', + 'avcs' => 'image/avcs', + 'avi' => 'video/x-msvideo', + 'avif' => 'image/avif', + 'aw' => 'application/applixware', + 'azf' => 'application/vnd.airzip.filesecure.azf', + 'azs' => 'application/vnd.airzip.filesecure.azs', + 'azv' => 'image/vnd.airzip.accelerator.azv', + 'azw' => 'application/vnd.amazon.ebook', + 'b16' => 'image/vnd.pco.b16', + 'bat' => 'application/x-msdownload', + 'bcpio' => 'application/x-bcpio', + 'bdf' => 'application/x-font-bdf', + 'bdm' => 'application/vnd.syncml.dm+wbxml', + 'bdoc' => 'application/x-bdoc', + 'bed' => 'application/vnd.realvnc.bed', + 'bh2' => 'application/vnd.fujitsu.oasysprs', + 'bin' => 'application/octet-stream', + 'blb' => 'application/x-blorb', + 'blorb' => 'application/x-blorb', + 'bmi' => 'application/vnd.bmi', + 'bmml' => 'application/vnd.balsamiq.bmml+xml', + 'bmp' => 'image/bmp', + 'book' => 'application/vnd.framemaker', + 'box' => 'application/vnd.previewsystems.box', + 'boz' => 'application/x-bzip2', + 'bpk' => 'application/octet-stream', + 'bpmn' => 'application/octet-stream', + 'bsp' => 'model/vnd.valve.source.compiled-map', + 'btf' => 'image/prs.btif', + 'btif' => 'image/prs.btif', + 'buffer' => 'application/octet-stream', + 'bz' => 'application/x-bzip', + 'bz2' => 'application/x-bzip2', + 'c' => 'text/x-c', + 'c4d' => 'application/vnd.clonk.c4group', + 'c4f' => 'application/vnd.clonk.c4group', + 'c4g' => 'application/vnd.clonk.c4group', + 'c4p' => 'application/vnd.clonk.c4group', + 'c4u' => 'application/vnd.clonk.c4group', + 'c11amc' => 'application/vnd.cluetrust.cartomobile-config', + 'c11amz' => 'application/vnd.cluetrust.cartomobile-config-pkg', + 'cab' => 'application/vnd.ms-cab-compressed', + 'caf' => 'audio/x-caf', + 'cap' => 'application/vnd.tcpdump.pcap', + 'car' => 'application/vnd.curl.car', + 'cat' => 'application/vnd.ms-pki.seccat', + 'cb7' => 'application/x-cbr', + 'cba' => 'application/x-cbr', + 'cbr' => 'application/x-cbr', + 'cbt' => 'application/x-cbr', + 'cbz' => 'application/x-cbr', + 'cc' => 'text/x-c', + 'cco' => 'application/x-cocoa', + 'cct' => 'application/x-director', + 'ccxml' => 'application/ccxml+xml', + 'cdbcmsg' => 'application/vnd.contact.cmsg', + 'cdf' => 'application/x-netcdf', + 'cdfx' => 'application/cdfx+xml', + 'cdkey' => 'application/vnd.mediastation.cdkey', + 'cdmia' => 'application/cdmi-capability', + 'cdmic' => 'application/cdmi-container', + 'cdmid' => 'application/cdmi-domain', + 'cdmio' => 'application/cdmi-object', + 'cdmiq' => 'application/cdmi-queue', + 'cdr' => 'application/cdr', + 'cdx' => 'chemical/x-cdx', + 'cdxml' => 'application/vnd.chemdraw+xml', + 'cdy' => 'application/vnd.cinderella', + 'cer' => 'application/pkix-cert', + 'cfs' => 'application/x-cfs-compressed', + 'cgm' => 'image/cgm', + 'chat' => 'application/x-chat', + 'chm' => 'application/vnd.ms-htmlhelp', + 'chrt' => 'application/vnd.kde.kchart', + 'cif' => 'chemical/x-cif', + 'cii' => 'application/vnd.anser-web-certificate-issue-initiation', + 'cil' => 'application/vnd.ms-artgalry', + 'cjs' => 'application/node', + 'cla' => 'application/vnd.claymore', + 'class' => 'application/octet-stream', + 'cld' => 'model/vnd.cld', + 'clkk' => 'application/vnd.crick.clicker.keyboard', + 'clkp' => 'application/vnd.crick.clicker.palette', + 'clkt' => 'application/vnd.crick.clicker.template', + 'clkw' => 'application/vnd.crick.clicker.wordbank', + 'clkx' => 'application/vnd.crick.clicker', + 'clp' => 'application/x-msclip', + 'cmc' => 'application/vnd.cosmocaller', + 'cmdf' => 'chemical/x-cmdf', + 'cml' => 'chemical/x-cml', + 'cmp' => 'application/vnd.yellowriver-custom-menu', + 'cmx' => 'image/x-cmx', + 'cod' => 'application/vnd.rim.cod', + 'coffee' => 'text/coffeescript', + 'com' => 'application/x-msdownload', + 'conf' => 'text/plain', + 'cpio' => 'application/x-cpio', + 'cpl' => 'application/cpl+xml', + 'cpp' => 'text/x-c', + 'cpt' => 'application/mac-compactpro', + 'crd' => 'application/x-mscardfile', + 'crl' => 'application/pkix-crl', + 'crt' => 'application/x-x509-ca-cert', + 'crx' => 'application/x-chrome-extension', + 'cryptonote' => 'application/vnd.rig.cryptonote', + 'csh' => 'application/x-csh', + 'csl' => 'application/vnd.citationstyles.style+xml', + 'csml' => 'chemical/x-csml', + 'csp' => 'application/vnd.commonspace', + 'csr' => 'application/octet-stream', + 'css' => 'text/css', + 'cst' => 'application/x-director', + 'csv' => 'text/csv', + 'cu' => 'application/cu-seeme', + 'curl' => 'text/vnd.curl', + 'cwl' => 'application/cwl', + 'cww' => 'application/prs.cww', + 'cxt' => 'application/x-director', + 'cxx' => 'text/x-c', + 'dae' => 'model/vnd.collada+xml', + 'daf' => 'application/vnd.mobius.daf', + 'dart' => 'application/vnd.dart', + 'dataless' => 'application/vnd.fdsn.seed', + 'davmount' => 'application/davmount+xml', + 'dbf' => 'application/vnd.dbf', + 'dbk' => 'application/docbook+xml', + 'dcr' => 'application/x-director', + 'dcurl' => 'text/vnd.curl.dcurl', + 'dd2' => 'application/vnd.oma.dd2+xml', + 'ddd' => 'application/vnd.fujixerox.ddd', + 'ddf' => 'application/vnd.syncml.dmddf+xml', + 'dds' => 'image/vnd.ms-dds', + 'deb' => 'application/x-debian-package', + 'def' => 'text/plain', + 'deploy' => 'application/octet-stream', + 'der' => 'application/x-x509-ca-cert', + 'dfac' => 'application/vnd.dreamfactory', + 'dgc' => 'application/x-dgc-compressed', + 'dib' => 'image/bmp', + 'dic' => 'text/x-c', + 'dir' => 'application/x-director', + 'dis' => 'application/vnd.mobius.dis', + 'disposition-notification' => 'message/disposition-notification', + 'dist' => 'application/octet-stream', + 'distz' => 'application/octet-stream', + 'djv' => 'image/vnd.djvu', + 'djvu' => 'image/vnd.djvu', + 'dll' => 'application/octet-stream', + 'dmg' => 'application/x-apple-diskimage', + 'dmn' => 'application/octet-stream', + 'dmp' => 'application/vnd.tcpdump.pcap', + 'dms' => 'application/octet-stream', + 'dna' => 'application/vnd.dna', + 'doc' => 'application/msword', + 'docm' => 'application/vnd.ms-word.template.macroEnabled.12', + 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', + 'dot' => 'application/msword', + 'dotm' => 'application/vnd.ms-word.template.macroEnabled.12', + 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', + 'dp' => 'application/vnd.osgi.dp', + 'dpg' => 'application/vnd.dpgraph', + 'dpx' => 'image/dpx', + 'dra' => 'audio/vnd.dra', + 'drle' => 'image/dicom-rle', + 'dsc' => 'text/prs.lines.tag', + 'dssc' => 'application/dssc+der', + 'dtb' => 'application/x-dtbook+xml', + 'dtd' => 'application/xml-dtd', + 'dts' => 'audio/vnd.dts', + 'dtshd' => 'audio/vnd.dts.hd', + 'dump' => 'application/octet-stream', + 'dvb' => 'video/vnd.dvb.file', + 'dvi' => 'application/x-dvi', + 'dwd' => 'application/atsc-dwd+xml', + 'dwf' => 'model/vnd.dwf', + 'dwg' => 'image/vnd.dwg', + 'dxf' => 'image/vnd.dxf', + 'dxp' => 'application/vnd.spotfire.dxp', + 'dxr' => 'application/x-director', + 'ear' => 'application/java-archive', + 'ecelp4800' => 'audio/vnd.nuera.ecelp4800', + 'ecelp7470' => 'audio/vnd.nuera.ecelp7470', + 'ecelp9600' => 'audio/vnd.nuera.ecelp9600', + 'ecma' => 'application/ecmascript', + 'edm' => 'application/vnd.novadigm.edm', + 'edx' => 'application/vnd.novadigm.edx', + 'efif' => 'application/vnd.picsel', + 'ei6' => 'application/vnd.pg.osasli', + 'elc' => 'application/octet-stream', + 'emf' => 'image/emf', + 'eml' => 'message/rfc822', + 'emma' => 'application/emma+xml', + 'emotionml' => 'application/emotionml+xml', + 'emz' => 'application/x-msmetafile', + 'eol' => 'audio/vnd.digital-winds', + 'eot' => 'application/vnd.ms-fontobject', + 'eps' => 'application/postscript', + 'epub' => 'application/epub+zip', + 'es3' => 'application/vnd.eszigno3+xml', + 'esa' => 'application/vnd.osgi.subsystem', + 'esf' => 'application/vnd.epson.esf', + 'et3' => 'application/vnd.eszigno3+xml', + 'etx' => 'text/x-setext', + 'eva' => 'application/x-eva', + 'evy' => 'application/x-envoy', + 'exe' => 'application/octet-stream', + 'exi' => 'application/exi', + 'exp' => 'application/express', + 'exr' => 'image/aces', + 'ext' => 'application/vnd.novadigm.ext', + 'ez' => 'application/andrew-inset', + 'ez2' => 'application/vnd.ezpix-album', + 'ez3' => 'application/vnd.ezpix-package', + 'f' => 'text/x-fortran', + 'f4v' => 'video/mp4', + 'f77' => 'text/x-fortran', + 'f90' => 'text/x-fortran', + 'fbs' => 'image/vnd.fastbidsheet', + 'fcdt' => 'application/vnd.adobe.formscentral.fcdt', + 'fcs' => 'application/vnd.isac.fcs', + 'fdf' => 'application/vnd.fdf', + 'fdt' => 'application/fdt+xml', + 'fe_launch' => 'application/vnd.denovo.fcselayout-link', + 'fg5' => 'application/vnd.fujitsu.oasysgp', + 'fgd' => 'application/x-director', + 'fh' => 'image/x-freehand', + 'fh4' => 'image/x-freehand', + 'fh5' => 'image/x-freehand', + 'fh7' => 'image/x-freehand', + 'fhc' => 'image/x-freehand', + 'fig' => 'application/x-xfig', + 'fits' => 'image/fits', + 'flac' => 'audio/x-flac', + 'fli' => 'video/x-fli', + 'flo' => 'application/vnd.micrografx.flo', + 'flv' => 'video/x-flv', + 'flw' => 'application/vnd.kde.kivio', + 'flx' => 'text/vnd.fmi.flexstor', + 'fly' => 'text/vnd.fly', + 'fm' => 'application/vnd.framemaker', + 'fnc' => 'application/vnd.frogans.fnc', + 'fo' => 'application/vnd.software602.filler.form+xml', + 'for' => 'text/x-fortran', + 'fpx' => 'image/vnd.fpx', + 'frame' => 'application/vnd.framemaker', + 'fsc' => 'application/vnd.fsc.weblaunch', + 'fst' => 'image/vnd.fst', + 'ftc' => 'application/vnd.fluxtime.clip', + 'fti' => 'application/vnd.anser-web-funds-transfer-initiation', + 'fvt' => 'video/vnd.fvt', + 'fxp' => 'application/vnd.adobe.fxp', + 'fxpl' => 'application/vnd.adobe.fxp', + 'fzs' => 'application/vnd.fuzzysheet', + 'g2w' => 'application/vnd.geoplan', + 'g3' => 'image/g3fax', + 'g3w' => 'application/vnd.geospace', + 'gac' => 'application/vnd.groove-account', + 'gam' => 'application/x-tads', + 'gbr' => 'application/rpki-ghostbusters', + 'gca' => 'application/x-gca-compressed', + 'gdl' => 'model/vnd.gdl', + 'gdoc' => 'application/vnd.google-apps.document', + 'ged' => 'text/vnd.familysearch.gedcom', + 'geo' => 'application/vnd.dynageo', + 'geojson' => 'application/geo+json', + 'gex' => 'application/vnd.geometry-explorer', + 'ggb' => 'application/vnd.geogebra.file', + 'ggt' => 'application/vnd.geogebra.tool', + 'ghf' => 'application/vnd.groove-help', + 'gif' => 'image/gif', + 'gim' => 'application/vnd.groove-identity-message', + 'glb' => 'model/gltf-binary', + 'gltf' => 'model/gltf+json', + 'gml' => 'application/gml+xml', + 'gmx' => 'application/vnd.gmx', + 'gnumeric' => 'application/x-gnumeric', + 'gpg' => 'application/gpg-keys', + 'gph' => 'application/vnd.flographit', + 'gpx' => 'application/gpx+xml', + 'gqf' => 'application/vnd.grafeq', + 'gqs' => 'application/vnd.grafeq', + 'gram' => 'application/srgs', + 'gramps' => 'application/x-gramps-xml', + 'gre' => 'application/vnd.geometry-explorer', + 'grv' => 'application/vnd.groove-injector', + 'grxml' => 'application/srgs+xml', + 'gsf' => 'application/x-font-ghostscript', + 'gsheet' => 'application/vnd.google-apps.spreadsheet', + 'gslides' => 'application/vnd.google-apps.presentation', + 'gtar' => 'application/x-gtar', + 'gtm' => 'application/vnd.groove-tool-message', + 'gtw' => 'model/vnd.gtw', + 'gv' => 'text/vnd.graphviz', + 'gxf' => 'application/gxf', + 'gxt' => 'application/vnd.geonext', + 'gz' => 'application/gzip', + 'gzip' => 'application/gzip', + 'h' => 'text/x-c', + 'h261' => 'video/h261', + 'h263' => 'video/h263', + 'h264' => 'video/h264', + 'hal' => 'application/vnd.hal+xml', + 'hbci' => 'application/vnd.hbci', + 'hbs' => 'text/x-handlebars-template', + 'hdd' => 'application/x-virtualbox-hdd', + 'hdf' => 'application/x-hdf', + 'heic' => 'image/heic', + 'heics' => 'image/heic-sequence', + 'heif' => 'image/heif', + 'heifs' => 'image/heif-sequence', + 'hej2' => 'image/hej2k', + 'held' => 'application/atsc-held+xml', + 'hh' => 'text/x-c', + 'hjson' => 'application/hjson', + 'hlp' => 'application/winhlp', + 'hpgl' => 'application/vnd.hp-hpgl', + 'hpid' => 'application/vnd.hp-hpid', + 'hps' => 'application/vnd.hp-hps', + 'hqx' => 'application/mac-binhex40', + 'hsj2' => 'image/hsj2', + 'htc' => 'text/x-component', + 'htke' => 'application/vnd.kenameaapp', + 'htm' => 'text/html', + 'html' => 'text/html', + 'hvd' => 'application/vnd.yamaha.hv-dic', + 'hvp' => 'application/vnd.yamaha.hv-voice', + 'hvs' => 'application/vnd.yamaha.hv-script', + 'i2g' => 'application/vnd.intergeo', + 'icc' => 'application/vnd.iccprofile', + 'ice' => 'x-conference/x-cooltalk', + 'icm' => 'application/vnd.iccprofile', + 'ico' => 'image/x-icon', + 'ics' => 'text/calendar', + 'ief' => 'image/ief', + 'ifb' => 'text/calendar', + 'ifm' => 'application/vnd.shana.informed.formdata', + 'iges' => 'model/iges', + 'igl' => 'application/vnd.igloader', + 'igm' => 'application/vnd.insors.igm', + 'igs' => 'model/iges', + 'igx' => 'application/vnd.micrografx.igx', + 'iif' => 'application/vnd.shana.informed.interchange', + 'img' => 'application/octet-stream', + 'imp' => 'application/vnd.accpac.simply.imp', + 'ims' => 'application/vnd.ms-ims', + 'in' => 'text/plain', + 'ini' => 'text/plain', + 'ink' => 'application/inkml+xml', + 'inkml' => 'application/inkml+xml', + 'install' => 'application/x-install-instructions', + 'iota' => 'application/vnd.astraea-software.iota', + 'ipfix' => 'application/ipfix', + 'ipk' => 'application/vnd.shana.informed.package', + 'irm' => 'application/vnd.ibm.rights-management', + 'irp' => 'application/vnd.irepository.package+xml', + 'iso' => 'application/x-iso9660-image', + 'itp' => 'application/vnd.shana.informed.formtemplate', + 'its' => 'application/its+xml', + 'ivp' => 'application/vnd.immervision-ivp', + 'ivu' => 'application/vnd.immervision-ivu', + 'jad' => 'text/vnd.sun.j2me.app-descriptor', + 'jade' => 'text/jade', + 'jam' => 'application/vnd.jam', + 'jar' => 'application/java-archive', + 'jardiff' => 'application/x-java-archive-diff', + 'java' => 'text/x-java-source', + 'jhc' => 'image/jphc', + 'jisp' => 'application/vnd.jisp', + 'jls' => 'image/jls', + 'jlt' => 'application/vnd.hp-jlyt', + 'jng' => 'image/x-jng', + 'jnlp' => 'application/x-java-jnlp-file', + 'joda' => 'application/vnd.joost.joda-archive', + 'jp2' => 'image/jp2', + 'jpe' => 'image/jpeg', + 'jpeg' => 'image/jpeg', + 'jpf' => 'image/jpx', + 'jpg' => 'image/jpeg', + 'jpg2' => 'image/jp2', + 'jpgm' => 'video/jpm', + 'jpgv' => 'video/jpeg', + 'jph' => 'image/jph', + 'jpm' => 'video/jpm', + 'jpx' => 'image/jpx', + 'js' => 'application/javascript', + 'json' => 'application/json', + 'json5' => 'application/json5', + 'jsonld' => 'application/ld+json', + 'jsonml' => 'application/jsonml+json', + 'jsx' => 'text/jsx', + 'jt' => 'model/jt', + 'jxr' => 'image/jxr', + 'jxra' => 'image/jxra', + 'jxrs' => 'image/jxrs', + 'jxs' => 'image/jxs', + 'jxsc' => 'image/jxsc', + 'jxsi' => 'image/jxsi', + 'jxss' => 'image/jxss', + 'kar' => 'audio/midi', + 'karbon' => 'application/vnd.kde.karbon', + 'kdb' => 'application/octet-stream', + 'kdbx' => 'application/x-keepass2', + 'key' => 'application/x-iwork-keynote-sffkey', + 'kfo' => 'application/vnd.kde.kformula', + 'kia' => 'application/vnd.kidspiration', + 'kml' => 'application/vnd.google-earth.kml+xml', + 'kmz' => 'application/vnd.google-earth.kmz', + 'kne' => 'application/vnd.kinar', + 'knp' => 'application/vnd.kinar', + 'kon' => 'application/vnd.kde.kontour', + 'kpr' => 'application/vnd.kde.kpresenter', + 'kpt' => 'application/vnd.kde.kpresenter', + 'kpxx' => 'application/vnd.ds-keypoint', + 'ksp' => 'application/vnd.kde.kspread', + 'ktr' => 'application/vnd.kahootz', + 'ktx' => 'image/ktx', + 'ktx2' => 'image/ktx2', + 'ktz' => 'application/vnd.kahootz', + 'kwd' => 'application/vnd.kde.kword', + 'kwt' => 'application/vnd.kde.kword', + 'lasxml' => 'application/vnd.las.las+xml', + 'latex' => 'application/x-latex', + 'lbd' => 'application/vnd.llamagraphics.life-balance.desktop', + 'lbe' => 'application/vnd.llamagraphics.life-balance.exchange+xml', + 'les' => 'application/vnd.hhe.lesson-player', + 'less' => 'text/less', + 'lgr' => 'application/lgr+xml', + 'lha' => 'application/octet-stream', + 'link66' => 'application/vnd.route66.link66+xml', + 'list' => 'text/plain', + 'list3820' => 'application/vnd.ibm.modcap', + 'listafp' => 'application/vnd.ibm.modcap', + 'litcoffee' => 'text/coffeescript', + 'lnk' => 'application/x-ms-shortcut', + 'log' => 'text/plain', + 'lostxml' => 'application/lost+xml', + 'lrf' => 'application/octet-stream', + 'lrm' => 'application/vnd.ms-lrm', + 'ltf' => 'application/vnd.frogans.ltf', + 'lua' => 'text/x-lua', + 'luac' => 'application/x-lua-bytecode', + 'lvp' => 'audio/vnd.lucent.voice', + 'lwp' => 'application/vnd.lotus-wordpro', + 'lzh' => 'application/octet-stream', + 'm1v' => 'video/mpeg', + 'm2a' => 'audio/mpeg', + 'm2v' => 'video/mpeg', + 'm3a' => 'audio/mpeg', + 'm3u' => 'text/plain', + 'm3u8' => 'application/vnd.apple.mpegurl', + 'm4a' => 'audio/x-m4a', + 'm4p' => 'application/mp4', + 'm4s' => 'video/iso.segment', + 'm4u' => 'application/vnd.mpegurl', + 'm4v' => 'video/x-m4v', + 'm13' => 'application/x-msmediaview', + 'm14' => 'application/x-msmediaview', + 'm21' => 'application/mp21', + 'ma' => 'application/mathematica', + 'mads' => 'application/mads+xml', + 'maei' => 'application/mmt-aei+xml', + 'mag' => 'application/vnd.ecowin.chart', + 'maker' => 'application/vnd.framemaker', + 'man' => 'text/troff', + 'manifest' => 'text/cache-manifest', + 'map' => 'application/json', + 'mar' => 'application/octet-stream', + 'markdown' => 'text/markdown', + 'mathml' => 'application/mathml+xml', + 'mb' => 'application/mathematica', + 'mbk' => 'application/vnd.mobius.mbk', + 'mbox' => 'application/mbox', + 'mc1' => 'application/vnd.medcalcdata', + 'mcd' => 'application/vnd.mcd', + 'mcurl' => 'text/vnd.curl.mcurl', + 'md' => 'text/markdown', + 'mdb' => 'application/x-msaccess', + 'mdi' => 'image/vnd.ms-modi', + 'mdx' => 'text/mdx', + 'me' => 'text/troff', + 'mesh' => 'model/mesh', + 'meta4' => 'application/metalink4+xml', + 'metalink' => 'application/metalink+xml', + 'mets' => 'application/mets+xml', + 'mfm' => 'application/vnd.mfmp', + 'mft' => 'application/rpki-manifest', + 'mgp' => 'application/vnd.osgeo.mapguide.package', + 'mgz' => 'application/vnd.proteus.magazine', + 'mid' => 'audio/midi', + 'midi' => 'audio/midi', + 'mie' => 'application/x-mie', + 'mif' => 'application/vnd.mif', + 'mime' => 'message/rfc822', + 'mj2' => 'video/mj2', + 'mjp2' => 'video/mj2', + 'mjs' => 'text/javascript', + 'mk3d' => 'video/x-matroska', + 'mka' => 'audio/x-matroska', + 'mkd' => 'text/x-markdown', + 'mks' => 'video/x-matroska', + 'mkv' => 'video/x-matroska', + 'mlp' => 'application/vnd.dolby.mlp', + 'mmd' => 'application/vnd.chipnuts.karaoke-mmd', + 'mmf' => 'application/vnd.smaf', + 'mml' => 'text/mathml', + 'mmr' => 'image/vnd.fujixerox.edmics-mmr', + 'mng' => 'video/x-mng', + 'mny' => 'application/x-msmoney', + 'mobi' => 'application/x-mobipocket-ebook', + 'mods' => 'application/mods+xml', + 'mov' => 'video/quicktime', + 'movie' => 'video/x-sgi-movie', + 'mp2' => 'audio/mpeg', + 'mp2a' => 'audio/mpeg', + 'mp3' => 'audio/mpeg', + 'mp4' => 'video/mp4', + 'mp4a' => 'audio/mp4', + 'mp4s' => 'application/mp4', + 'mp4v' => 'video/mp4', + 'mp21' => 'application/mp21', + 'mpc' => 'application/vnd.mophun.certificate', + 'mpd' => 'application/dash+xml', + 'mpe' => 'video/mpeg', + 'mpeg' => 'video/mpeg', + 'mpf' => 'application/media-policy-dataset+xml', + 'mpg' => 'video/mpeg', + 'mpg4' => 'video/mp4', + 'mpga' => 'audio/mpeg', + 'mpkg' => 'application/vnd.apple.installer+xml', + 'mpm' => 'application/vnd.blueice.multipass', + 'mpn' => 'application/vnd.mophun.application', + 'mpp' => 'application/vnd.ms-project', + 'mpt' => 'application/vnd.ms-project', + 'mpy' => 'application/vnd.ibm.minipay', + 'mqy' => 'application/vnd.mobius.mqy', + 'mrc' => 'application/marc', + 'mrcx' => 'application/marcxml+xml', + 'ms' => 'text/troff', + 'mscml' => 'application/mediaservercontrol+xml', + 'mseed' => 'application/vnd.fdsn.mseed', + 'mseq' => 'application/vnd.mseq', + 'msf' => 'application/vnd.epson.msf', + 'msg' => 'application/vnd.ms-outlook', + 'msh' => 'model/mesh', + 'msi' => 'application/x-msdownload', + 'msix' => 'application/msix', + 'msixbundle' => 'application/msixbundle', + 'msl' => 'application/vnd.mobius.msl', + 'msm' => 'application/octet-stream', + 'msp' => 'application/octet-stream', + 'msty' => 'application/vnd.muvee.style', + 'mtl' => 'model/mtl', + 'mts' => 'model/vnd.mts', + 'mus' => 'application/vnd.musician', + 'musd' => 'application/mmt-usd+xml', + 'musicxml' => 'application/vnd.recordare.musicxml+xml', + 'mvb' => 'application/x-msmediaview', + 'mvt' => 'application/vnd.mapbox-vector-tile', + 'mwf' => 'application/vnd.mfer', + 'mxf' => 'application/mxf', + 'mxl' => 'application/vnd.recordare.musicxml', + 'mxmf' => 'audio/mobile-xmf', + 'mxml' => 'application/xv+xml', + 'mxs' => 'application/vnd.triscape.mxs', + 'mxu' => 'video/vnd.mpegurl', + 'n-gage' => 'application/vnd.nokia.n-gage.symbian.install', + 'n3' => 'text/n3', + 'nb' => 'application/mathematica', + 'nbp' => 'application/vnd.wolfram.player', + 'nc' => 'application/x-netcdf', + 'ncx' => 'application/x-dtbncx+xml', + 'nfo' => 'text/x-nfo', + 'ngdat' => 'application/vnd.nokia.n-gage.data', + 'nitf' => 'application/vnd.nitf', + 'nlu' => 'application/vnd.neurolanguage.nlu', + 'nml' => 'application/vnd.enliven', + 'nnd' => 'application/vnd.noblenet-directory', + 'nns' => 'application/vnd.noblenet-sealer', + 'nnw' => 'application/vnd.noblenet-web', + 'npx' => 'image/vnd.net-fpx', + 'nq' => 'application/n-quads', + 'nsc' => 'application/x-conference', + 'nsf' => 'application/vnd.lotus-notes', + 'nt' => 'application/n-triples', + 'ntf' => 'application/vnd.nitf', + 'numbers' => 'application/x-iwork-numbers-sffnumbers', + 'nzb' => 'application/x-nzb', + 'oa2' => 'application/vnd.fujitsu.oasys2', + 'oa3' => 'application/vnd.fujitsu.oasys3', + 'oas' => 'application/vnd.fujitsu.oasys', + 'obd' => 'application/x-msbinder', + 'obgx' => 'application/vnd.openblox.game+xml', + 'obj' => 'model/obj', + 'oda' => 'application/oda', + 'odb' => 'application/vnd.oasis.opendocument.database', + 'odc' => 'application/vnd.oasis.opendocument.chart', + 'odf' => 'application/vnd.oasis.opendocument.formula', + 'odft' => 'application/vnd.oasis.opendocument.formula-template', + 'odg' => 'application/vnd.oasis.opendocument.graphics', + 'odi' => 'application/vnd.oasis.opendocument.image', + 'odm' => 'application/vnd.oasis.opendocument.text-master', + 'odp' => 'application/vnd.oasis.opendocument.presentation', + 'ods' => 'application/vnd.oasis.opendocument.spreadsheet', + 'odt' => 'application/vnd.oasis.opendocument.text', + 'oga' => 'audio/ogg', + 'ogex' => 'model/vnd.opengex', + 'ogg' => 'audio/ogg', + 'ogv' => 'video/ogg', + 'ogx' => 'application/ogg', + 'omdoc' => 'application/omdoc+xml', + 'onepkg' => 'application/onenote', + 'onetmp' => 'application/onenote', + 'onetoc' => 'application/onenote', + 'onetoc2' => 'application/onenote', + 'opf' => 'application/oebps-package+xml', + 'opml' => 'text/x-opml', + 'oprc' => 'application/vnd.palm', + 'opus' => 'audio/ogg', + 'org' => 'text/x-org', + 'osf' => 'application/vnd.yamaha.openscoreformat', + 'osfpvg' => 'application/vnd.yamaha.openscoreformat.osfpvg+xml', + 'osm' => 'application/vnd.openstreetmap.data+xml', + 'otc' => 'application/vnd.oasis.opendocument.chart-template', + 'otf' => 'font/otf', + 'otg' => 'application/vnd.oasis.opendocument.graphics-template', + 'oth' => 'application/vnd.oasis.opendocument.text-web', + 'oti' => 'application/vnd.oasis.opendocument.image-template', + 'otp' => 'application/vnd.oasis.opendocument.presentation-template', + 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template', + 'ott' => 'application/vnd.oasis.opendocument.text-template', + 'ova' => 'application/x-virtualbox-ova', + 'ovf' => 'application/x-virtualbox-ovf', + 'owl' => 'application/rdf+xml', + 'oxps' => 'application/oxps', + 'oxt' => 'application/vnd.openofficeorg.extension', + 'p' => 'text/x-pascal', + 'p7a' => 'application/x-pkcs7-signature', + 'p7b' => 'application/x-pkcs7-certificates', + 'p7c' => 'application/pkcs7-mime', + 'p7m' => 'application/pkcs7-mime', + 'p7r' => 'application/x-pkcs7-certreqresp', + 'p7s' => 'application/pkcs7-signature', + 'p8' => 'application/pkcs8', + 'p10' => 'application/x-pkcs10', + 'p12' => 'application/x-pkcs12', + 'pac' => 'application/x-ns-proxy-autoconfig', + 'pages' => 'application/x-iwork-pages-sffpages', + 'pas' => 'text/x-pascal', + 'paw' => 'application/vnd.pawaafile', + 'pbd' => 'application/vnd.powerbuilder6', + 'pbm' => 'image/x-portable-bitmap', + 'pcap' => 'application/vnd.tcpdump.pcap', + 'pcf' => 'application/x-font-pcf', + 'pcl' => 'application/vnd.hp-pcl', + 'pclxl' => 'application/vnd.hp-pclxl', + 'pct' => 'image/x-pict', + 'pcurl' => 'application/vnd.curl.pcurl', + 'pcx' => 'image/x-pcx', + 'pdb' => 'application/x-pilot', + 'pde' => 'text/x-processing', + 'pdf' => 'application/pdf', + 'pem' => 'application/x-x509-user-cert', + 'pfa' => 'application/x-font-type1', + 'pfb' => 'application/x-font-type1', + 'pfm' => 'application/x-font-type1', + 'pfr' => 'application/font-tdpfr', + 'pfx' => 'application/x-pkcs12', + 'pgm' => 'image/x-portable-graymap', + 'pgn' => 'application/x-chess-pgn', + 'pgp' => 'application/pgp', + 'phar' => 'application/octet-stream', + 'php' => 'application/x-httpd-php', + 'php3' => 'application/x-httpd-php', + 'php4' => 'application/x-httpd-php', + 'phps' => 'application/x-httpd-php-source', + 'phtml' => 'application/x-httpd-php', + 'pic' => 'image/x-pict', + 'pkg' => 'application/octet-stream', + 'pki' => 'application/pkixcmp', + 'pkipath' => 'application/pkix-pkipath', + 'pkpass' => 'application/vnd.apple.pkpass', + 'pl' => 'application/x-perl', + 'plb' => 'application/vnd.3gpp.pic-bw-large', + 'plc' => 'application/vnd.mobius.plc', + 'plf' => 'application/vnd.pocketlearn', + 'pls' => 'application/pls+xml', + 'pm' => 'application/x-perl', + 'pml' => 'application/vnd.ctc-posml', + 'png' => 'image/png', + 'pnm' => 'image/x-portable-anymap', + 'portpkg' => 'application/vnd.macports.portpkg', + 'pot' => 'application/vnd.ms-powerpoint', + 'potm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12', + 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template', + 'ppa' => 'application/vnd.ms-powerpoint', + 'ppam' => 'application/vnd.ms-powerpoint.addin.macroEnabled.12', + 'ppd' => 'application/vnd.cups-ppd', + 'ppm' => 'image/x-portable-pixmap', + 'pps' => 'application/vnd.ms-powerpoint', + 'ppsm' => 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12', + 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow', + 'ppt' => 'application/powerpoint', + 'pptm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12', + 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', + 'pqa' => 'application/vnd.palm', + 'prc' => 'model/prc', + 'pre' => 'application/vnd.lotus-freelance', + 'prf' => 'application/pics-rules', + 'provx' => 'application/provenance+xml', + 'ps' => 'application/postscript', + 'psb' => 'application/vnd.3gpp.pic-bw-small', + 'psd' => 'application/x-photoshop', + 'psf' => 'application/x-font-linux-psf', + 'pskcxml' => 'application/pskc+xml', + 'pti' => 'image/prs.pti', + 'ptid' => 'application/vnd.pvi.ptid1', + 'pub' => 'application/x-mspublisher', + 'pvb' => 'application/vnd.3gpp.pic-bw-var', + 'pwn' => 'application/vnd.3m.post-it-notes', + 'pya' => 'audio/vnd.ms-playready.media.pya', + 'pyo' => 'model/vnd.pytha.pyox', + 'pyox' => 'model/vnd.pytha.pyox', + 'pyv' => 'video/vnd.ms-playready.media.pyv', + 'qam' => 'application/vnd.epson.quickanime', + 'qbo' => 'application/vnd.intu.qbo', + 'qfx' => 'application/vnd.intu.qfx', + 'qps' => 'application/vnd.publishare-delta-tree', + 'qt' => 'video/quicktime', + 'qwd' => 'application/vnd.quark.quarkxpress', + 'qwt' => 'application/vnd.quark.quarkxpress', + 'qxb' => 'application/vnd.quark.quarkxpress', + 'qxd' => 'application/vnd.quark.quarkxpress', + 'qxl' => 'application/vnd.quark.quarkxpress', + 'qxt' => 'application/vnd.quark.quarkxpress', + 'ra' => 'audio/x-realaudio', + 'ram' => 'audio/x-pn-realaudio', + 'raml' => 'application/raml+yaml', + 'rapd' => 'application/route-apd+xml', + 'rar' => 'application/x-rar', + 'ras' => 'image/x-cmu-raster', + 'rcprofile' => 'application/vnd.ipunplugged.rcprofile', + 'rdf' => 'application/rdf+xml', + 'rdz' => 'application/vnd.data-vision.rdz', + 'relo' => 'application/p2p-overlay+xml', + 'rep' => 'application/vnd.businessobjects', + 'res' => 'application/x-dtbresource+xml', + 'rgb' => 'image/x-rgb', + 'rif' => 'application/reginfo+xml', + 'rip' => 'audio/vnd.rip', + 'ris' => 'application/x-research-info-systems', + 'rl' => 'application/resource-lists+xml', + 'rlc' => 'image/vnd.fujixerox.edmics-rlc', + 'rld' => 'application/resource-lists-diff+xml', + 'rm' => 'audio/x-pn-realaudio', + 'rmi' => 'audio/midi', + 'rmp' => 'audio/x-pn-realaudio-plugin', + 'rms' => 'application/vnd.jcp.javame.midlet-rms', + 'rmvb' => 'application/vnd.rn-realmedia-vbr', + 'rnc' => 'application/relax-ng-compact-syntax', + 'rng' => 'application/xml', + 'roa' => 'application/rpki-roa', + 'roff' => 'text/troff', + 'rp9' => 'application/vnd.cloanto.rp9', + 'rpm' => 'audio/x-pn-realaudio-plugin', + 'rpss' => 'application/vnd.nokia.radio-presets', + 'rpst' => 'application/vnd.nokia.radio-preset', + 'rq' => 'application/sparql-query', + 'rs' => 'application/rls-services+xml', + 'rsa' => 'application/x-pkcs7', + 'rsat' => 'application/atsc-rsat+xml', + 'rsd' => 'application/rsd+xml', + 'rsheet' => 'application/urc-ressheet+xml', + 'rss' => 'application/rss+xml', + 'rtf' => 'text/rtf', + 'rtx' => 'text/richtext', + 'run' => 'application/x-makeself', + 'rusd' => 'application/route-usd+xml', + 'rv' => 'video/vnd.rn-realvideo', + 's' => 'text/x-asm', + 's3m' => 'audio/s3m', + 'saf' => 'application/vnd.yamaha.smaf-audio', + 'sass' => 'text/x-sass', + 'sbml' => 'application/sbml+xml', + 'sc' => 'application/vnd.ibm.secure-container', + 'scd' => 'application/x-msschedule', + 'scm' => 'application/vnd.lotus-screencam', + 'scq' => 'application/scvp-cv-request', + 'scs' => 'application/scvp-cv-response', + 'scss' => 'text/x-scss', + 'scurl' => 'text/vnd.curl.scurl', + 'sda' => 'application/vnd.stardivision.draw', + 'sdc' => 'application/vnd.stardivision.calc', + 'sdd' => 'application/vnd.stardivision.impress', + 'sdkd' => 'application/vnd.solent.sdkm+xml', + 'sdkm' => 'application/vnd.solent.sdkm+xml', + 'sdp' => 'application/sdp', + 'sdw' => 'application/vnd.stardivision.writer', + 'sea' => 'application/octet-stream', + 'see' => 'application/vnd.seemail', + 'seed' => 'application/vnd.fdsn.seed', + 'sema' => 'application/vnd.sema', + 'semd' => 'application/vnd.semd', + 'semf' => 'application/vnd.semf', + 'senmlx' => 'application/senml+xml', + 'sensmlx' => 'application/sensml+xml', + 'ser' => 'application/java-serialized-object', + 'setpay' => 'application/set-payment-initiation', + 'setreg' => 'application/set-registration-initiation', + 'sfd-hdstx' => 'application/vnd.hydrostatix.sof-data', + 'sfs' => 'application/vnd.spotfire.sfs', + 'sfv' => 'text/x-sfv', + 'sgi' => 'image/sgi', + 'sgl' => 'application/vnd.stardivision.writer-global', + 'sgm' => 'text/sgml', + 'sgml' => 'text/sgml', + 'sh' => 'application/x-sh', + 'shar' => 'application/x-shar', + 'shex' => 'text/shex', + 'shf' => 'application/shf+xml', + 'shtml' => 'text/html', + 'sid' => 'image/x-mrsid-image', + 'sieve' => 'application/sieve', + 'sig' => 'application/pgp-signature', + 'sil' => 'audio/silk', + 'silo' => 'model/mesh', + 'sis' => 'application/vnd.symbian.install', + 'sisx' => 'application/vnd.symbian.install', + 'sit' => 'application/x-stuffit', + 'sitx' => 'application/x-stuffitx', + 'siv' => 'application/sieve', + 'skd' => 'application/vnd.koan', + 'skm' => 'application/vnd.koan', + 'skp' => 'application/vnd.koan', + 'skt' => 'application/vnd.koan', + 'sldm' => 'application/vnd.ms-powerpoint.slide.macroenabled.12', + 'sldx' => 'application/vnd.openxmlformats-officedocument.presentationml.slide', + 'slim' => 'text/slim', + 'slm' => 'text/slim', + 'sls' => 'application/route-s-tsid+xml', + 'slt' => 'application/vnd.epson.salt', + 'sm' => 'application/vnd.stepmania.stepchart', + 'smf' => 'application/vnd.stardivision.math', + 'smi' => 'application/smil', + 'smil' => 'application/smil', + 'smv' => 'video/x-smv', + 'smzip' => 'application/vnd.stepmania.package', + 'snd' => 'audio/basic', + 'snf' => 'application/x-font-snf', + 'so' => 'application/octet-stream', + 'spc' => 'application/x-pkcs7-certificates', + 'spdx' => 'text/spdx', + 'spf' => 'application/vnd.yamaha.smaf-phrase', + 'spl' => 'application/x-futuresplash', + 'spot' => 'text/vnd.in3d.spot', + 'spp' => 'application/scvp-vp-response', + 'spq' => 'application/scvp-vp-request', + 'spx' => 'audio/ogg', + 'sql' => 'application/x-sql', + 'src' => 'application/x-wais-source', + 'srt' => 'application/x-subrip', + 'sru' => 'application/sru+xml', + 'srx' => 'application/sparql-results+xml', + 'ssdl' => 'application/ssdl+xml', + 'sse' => 'application/vnd.kodak-descriptor', + 'ssf' => 'application/vnd.epson.ssf', + 'ssml' => 'application/ssml+xml', + 'sst' => 'application/octet-stream', + 'st' => 'application/vnd.sailingtracker.track', + 'stc' => 'application/vnd.sun.xml.calc.template', + 'std' => 'application/vnd.sun.xml.draw.template', + 'step' => 'application/STEP', + 'stf' => 'application/vnd.wt.stf', + 'sti' => 'application/vnd.sun.xml.impress.template', + 'stk' => 'application/hyperstudio', + 'stl' => 'model/stl', + 'stp' => 'application/STEP', + 'stpx' => 'model/step+xml', + 'stpxz' => 'model/step-xml+zip', + 'stpz' => 'model/step+zip', + 'str' => 'application/vnd.pg.format', + 'stw' => 'application/vnd.sun.xml.writer.template', + 'styl' => 'text/stylus', + 'stylus' => 'text/stylus', + 'sub' => 'text/vnd.dvb.subtitle', + 'sus' => 'application/vnd.sus-calendar', + 'susp' => 'application/vnd.sus-calendar', + 'sv4cpio' => 'application/x-sv4cpio', + 'sv4crc' => 'application/x-sv4crc', + 'svc' => 'application/vnd.dvb.service', + 'svd' => 'application/vnd.svd', + 'svg' => 'image/svg+xml', + 'svgz' => 'image/svg+xml', + 'swa' => 'application/x-director', + 'swf' => 'application/x-shockwave-flash', + 'swi' => 'application/vnd.aristanetworks.swi', + 'swidtag' => 'application/swid+xml', + 'sxc' => 'application/vnd.sun.xml.calc', + 'sxd' => 'application/vnd.sun.xml.draw', + 'sxg' => 'application/vnd.sun.xml.writer.global', + 'sxi' => 'application/vnd.sun.xml.impress', + 'sxm' => 'application/vnd.sun.xml.math', + 'sxw' => 'application/vnd.sun.xml.writer', + 't' => 'text/troff', + 't3' => 'application/x-t3vm-image', + 't38' => 'image/t38', + 'taglet' => 'application/vnd.mynfc', + 'tao' => 'application/vnd.tao.intent-module-archive', + 'tap' => 'image/vnd.tencent.tap', + 'tar' => 'application/x-tar', + 'tcap' => 'application/vnd.3gpp2.tcap', + 'tcl' => 'application/x-tcl', + 'td' => 'application/urc-targetdesc+xml', + 'teacher' => 'application/vnd.smart.teacher', + 'tei' => 'application/tei+xml', + 'teicorpus' => 'application/tei+xml', + 'tex' => 'application/x-tex', + 'texi' => 'application/x-texinfo', + 'texinfo' => 'application/x-texinfo', + 'text' => 'text/plain', + 'tfi' => 'application/thraud+xml', + 'tfm' => 'application/x-tex-tfm', + 'tfx' => 'image/tiff-fx', + 'tga' => 'image/x-tga', + 'tgz' => 'application/x-tar', + 'thmx' => 'application/vnd.ms-officetheme', + 'tif' => 'image/tiff', + 'tiff' => 'image/tiff', + 'tk' => 'application/x-tcl', + 'tmo' => 'application/vnd.tmobile-livetv', + 'toml' => 'application/toml', + 'torrent' => 'application/x-bittorrent', + 'tpl' => 'application/vnd.groove-tool-template', + 'tpt' => 'application/vnd.trid.tpt', + 'tr' => 'text/troff', + 'tra' => 'application/vnd.trueapp', + 'trig' => 'application/trig', + 'trm' => 'application/x-msterminal', + 'ts' => 'video/mp2t', + 'tsd' => 'application/timestamped-data', + 'tsv' => 'text/tab-separated-values', + 'ttc' => 'font/collection', + 'ttf' => 'font/ttf', + 'ttl' => 'text/turtle', + 'ttml' => 'application/ttml+xml', + 'twd' => 'application/vnd.simtech-mindmapper', + 'twds' => 'application/vnd.simtech-mindmapper', + 'txd' => 'application/vnd.genomatix.tuxedo', + 'txf' => 'application/vnd.mobius.txf', + 'txt' => 'text/plain', + 'u3d' => 'model/u3d', + 'u8dsn' => 'message/global-delivery-status', + 'u8hdr' => 'message/global-headers', + 'u8mdn' => 'message/global-disposition-notification', + 'u8msg' => 'message/global', + 'u32' => 'application/x-authorware-bin', + 'ubj' => 'application/ubjson', + 'udeb' => 'application/x-debian-package', + 'ufd' => 'application/vnd.ufdl', + 'ufdl' => 'application/vnd.ufdl', + 'ulx' => 'application/x-glulx', + 'umj' => 'application/vnd.umajin', + 'unityweb' => 'application/vnd.unity', + 'uo' => 'application/vnd.uoml+xml', + 'uoml' => 'application/vnd.uoml+xml', + 'uri' => 'text/uri-list', + 'uris' => 'text/uri-list', + 'urls' => 'text/uri-list', + 'usda' => 'model/vnd.usda', + 'usdz' => 'model/vnd.usdz+zip', + 'ustar' => 'application/x-ustar', + 'utz' => 'application/vnd.uiq.theme', + 'uu' => 'text/x-uuencode', + 'uva' => 'audio/vnd.dece.audio', + 'uvd' => 'application/vnd.dece.data', + 'uvf' => 'application/vnd.dece.data', + 'uvg' => 'image/vnd.dece.graphic', + 'uvh' => 'video/vnd.dece.hd', + 'uvi' => 'image/vnd.dece.graphic', + 'uvm' => 'video/vnd.dece.mobile', + 'uvp' => 'video/vnd.dece.pd', + 'uvs' => 'video/vnd.dece.sd', + 'uvt' => 'application/vnd.dece.ttml+xml', + 'uvu' => 'video/vnd.uvvu.mp4', + 'uvv' => 'video/vnd.dece.video', + 'uvva' => 'audio/vnd.dece.audio', + 'uvvd' => 'application/vnd.dece.data', + 'uvvf' => 'application/vnd.dece.data', + 'uvvg' => 'image/vnd.dece.graphic', + 'uvvh' => 'video/vnd.dece.hd', + 'uvvi' => 'image/vnd.dece.graphic', + 'uvvm' => 'video/vnd.dece.mobile', + 'uvvp' => 'video/vnd.dece.pd', + 'uvvs' => 'video/vnd.dece.sd', + 'uvvt' => 'application/vnd.dece.ttml+xml', + 'uvvu' => 'video/vnd.uvvu.mp4', + 'uvvv' => 'video/vnd.dece.video', + 'uvvx' => 'application/vnd.dece.unspecified', + 'uvvz' => 'application/vnd.dece.zip', + 'uvx' => 'application/vnd.dece.unspecified', + 'uvz' => 'application/vnd.dece.zip', + 'vbox' => 'application/x-virtualbox-vbox', + 'vbox-extpack' => 'application/x-virtualbox-vbox-extpack', + 'vcard' => 'text/vcard', + 'vcd' => 'application/x-cdlink', + 'vcf' => 'text/x-vcard', + 'vcg' => 'application/vnd.groove-vcard', + 'vcs' => 'text/x-vcalendar', + 'vcx' => 'application/vnd.vcx', + 'vdi' => 'application/x-virtualbox-vdi', + 'vds' => 'model/vnd.sap.vds', + 'vhd' => 'application/x-virtualbox-vhd', + 'vis' => 'application/vnd.visionary', + 'viv' => 'video/vnd.vivo', + 'vlc' => 'application/videolan', + 'vmdk' => 'application/x-virtualbox-vmdk', + 'vob' => 'video/x-ms-vob', + 'vor' => 'application/vnd.stardivision.writer', + 'vox' => 'application/x-authorware-bin', + 'vrml' => 'model/vrml', + 'vsd' => 'application/vnd.visio', + 'vsf' => 'application/vnd.vsf', + 'vss' => 'application/vnd.visio', + 'vst' => 'application/vnd.visio', + 'vsw' => 'application/vnd.visio', + 'vtf' => 'image/vnd.valve.source.texture', + 'vtt' => 'text/vtt', + 'vtu' => 'model/vnd.vtu', + 'vxml' => 'application/voicexml+xml', + 'w3d' => 'application/x-director', + 'wad' => 'application/x-doom', + 'wadl' => 'application/vnd.sun.wadl+xml', + 'war' => 'application/java-archive', + 'wasm' => 'application/wasm', + 'wav' => 'audio/x-wav', + 'wax' => 'audio/x-ms-wax', + 'wbmp' => 'image/vnd.wap.wbmp', + 'wbs' => 'application/vnd.criticaltools.wbs+xml', + 'wbxml' => 'application/wbxml', + 'wcm' => 'application/vnd.ms-works', + 'wdb' => 'application/vnd.ms-works', + 'wdp' => 'image/vnd.ms-photo', + 'weba' => 'audio/webm', + 'webapp' => 'application/x-web-app-manifest+json', + 'webm' => 'video/webm', + 'webmanifest' => 'application/manifest+json', + 'webp' => 'image/webp', + 'wg' => 'application/vnd.pmi.widget', + 'wgsl' => 'text/wgsl', + 'wgt' => 'application/widget', + 'wif' => 'application/watcherinfo+xml', + 'wks' => 'application/vnd.ms-works', + 'wm' => 'video/x-ms-wm', + 'wma' => 'audio/x-ms-wma', + 'wmd' => 'application/x-ms-wmd', + 'wmf' => 'image/wmf', + 'wml' => 'text/vnd.wap.wml', + 'wmlc' => 'application/wmlc', + 'wmls' => 'text/vnd.wap.wmlscript', + 'wmlsc' => 'application/vnd.wap.wmlscriptc', + 'wmv' => 'video/x-ms-wmv', + 'wmx' => 'video/x-ms-wmx', + 'wmz' => 'application/x-msmetafile', + 'woff' => 'font/woff', + 'woff2' => 'font/woff2', + 'word' => 'application/msword', + 'wpd' => 'application/vnd.wordperfect', + 'wpl' => 'application/vnd.ms-wpl', + 'wps' => 'application/vnd.ms-works', + 'wqd' => 'application/vnd.wqd', + 'wri' => 'application/x-mswrite', + 'wrl' => 'model/vrml', + 'wsc' => 'message/vnd.wfa.wsc', + 'wsdl' => 'application/wsdl+xml', + 'wspolicy' => 'application/wspolicy+xml', + 'wtb' => 'application/vnd.webturbo', + 'wvx' => 'video/x-ms-wvx', + 'x3d' => 'model/x3d+xml', + 'x3db' => 'model/x3d+fastinfoset', + 'x3dbz' => 'model/x3d+binary', + 'x3dv' => 'model/x3d-vrml', + 'x3dvz' => 'model/x3d+vrml', + 'x3dz' => 'model/x3d+xml', + 'x32' => 'application/x-authorware-bin', + 'x_b' => 'model/vnd.parasolid.transmit.binary', + 'x_t' => 'model/vnd.parasolid.transmit.text', + 'xaml' => 'application/xaml+xml', + 'xap' => 'application/x-silverlight-app', + 'xar' => 'application/vnd.xara', + 'xav' => 'application/xcap-att+xml', + 'xbap' => 'application/x-ms-xbap', + 'xbd' => 'application/vnd.fujixerox.docuworks.binder', + 'xbm' => 'image/x-xbitmap', + 'xca' => 'application/xcap-caps+xml', + 'xcs' => 'application/calendar+xml', + 'xdf' => 'application/xcap-diff+xml', + 'xdm' => 'application/vnd.syncml.dm+xml', + 'xdp' => 'application/vnd.adobe.xdp+xml', + 'xdssc' => 'application/dssc+xml', + 'xdw' => 'application/vnd.fujixerox.docuworks', + 'xel' => 'application/xcap-el+xml', + 'xenc' => 'application/xenc+xml', + 'xer' => 'application/patch-ops-error+xml', + 'xfdf' => 'application/xfdf', + 'xfdl' => 'application/vnd.xfdl', + 'xht' => 'application/xhtml+xml', + 'xhtm' => 'application/vnd.pwg-xhtml-print+xml', + 'xhtml' => 'application/xhtml+xml', + 'xhvml' => 'application/xv+xml', + 'xif' => 'image/vnd.xiff', + 'xl' => 'application/excel', + 'xla' => 'application/vnd.ms-excel', + 'xlam' => 'application/vnd.ms-excel.addin.macroEnabled.12', + 'xlc' => 'application/vnd.ms-excel', + 'xlf' => 'application/xliff+xml', + 'xlm' => 'application/vnd.ms-excel', + 'xls' => 'application/vnd.ms-excel', + 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12', + 'xlsm' => 'application/vnd.ms-excel.sheet.macroEnabled.12', + 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', + 'xlt' => 'application/vnd.ms-excel', + 'xltm' => 'application/vnd.ms-excel.template.macroEnabled.12', + 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template', + 'xlw' => 'application/vnd.ms-excel', + 'xm' => 'audio/xm', + 'xml' => 'application/xml', + 'xns' => 'application/xcap-ns+xml', + 'xo' => 'application/vnd.olpc-sugar', + 'xop' => 'application/xop+xml', + 'xpi' => 'application/x-xpinstall', + 'xpl' => 'application/xproc+xml', + 'xpm' => 'image/x-xpixmap', + 'xpr' => 'application/vnd.is-xpr', + 'xps' => 'application/vnd.ms-xpsdocument', + 'xpw' => 'application/vnd.intercon.formnet', + 'xpx' => 'application/vnd.intercon.formnet', + 'xsd' => 'application/xml', + 'xsf' => 'application/prs.xsf+xml', + 'xsl' => 'application/xml', + 'xslt' => 'application/xslt+xml', + 'xsm' => 'application/vnd.syncml+xml', + 'xspf' => 'application/xspf+xml', + 'xul' => 'application/vnd.mozilla.xul+xml', + 'xvm' => 'application/xv+xml', + 'xvml' => 'application/xv+xml', + 'xwd' => 'image/x-xwindowdump', + 'xyz' => 'chemical/x-xyz', + 'xz' => 'application/x-xz', + 'yaml' => 'text/yaml', + 'yang' => 'application/yang', + 'yin' => 'application/yin+xml', + 'yml' => 'text/yaml', + 'ymp' => 'text/x-suse-ymp', + 'z' => 'application/x-compress', + 'z1' => 'application/x-zmachine', + 'z2' => 'application/x-zmachine', + 'z3' => 'application/x-zmachine', + 'z4' => 'application/x-zmachine', + 'z5' => 'application/x-zmachine', + 'z6' => 'application/x-zmachine', + 'z7' => 'application/x-zmachine', + 'z8' => 'application/x-zmachine', + 'zaz' => 'application/vnd.zzazz.deck+xml', + 'zip' => 'application/zip', + 'zir' => 'application/vnd.zul', + 'zirz' => 'application/vnd.zul', + 'zmm' => 'application/vnd.handheld-entertainment+xml', + 'zsh' => 'text/x-scriptzsh', + ]; + + /** + * Determines the mimetype of a file by looking at its extension. + * + * @see https://raw.githubusercontent.com/jshttp/mime-db/master/db.json + */ + public static function fromFilename(string $filename): ?string + { + return self::fromExtension(pathinfo($filename, PATHINFO_EXTENSION)); + } + + /** + * Maps a file extensions to a mimetype. + * + * @see https://raw.githubusercontent.com/jshttp/mime-db/master/db.json + */ + public static function fromExtension(string $extension): ?string + { + return self::MIME_TYPES[strtolower($extension)] ?? null; + } +} diff --git a/vendor/guzzlehttp/psr7/src/MultipartStream.php b/vendor/guzzlehttp/psr7/src/MultipartStream.php new file mode 100644 index 0000000..43d718f --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/MultipartStream.php @@ -0,0 +1,165 @@ +boundary = $boundary ?: bin2hex(random_bytes(20)); + $this->stream = $this->createStream($elements); + } + + public function getBoundary(): string + { + return $this->boundary; + } + + public function isWritable(): bool + { + return false; + } + + /** + * Get the headers needed before transferring the content of a POST file + * + * @param string[] $headers + */ + private function getHeaders(array $headers): string + { + $str = ''; + foreach ($headers as $key => $value) { + $str .= "{$key}: {$value}\r\n"; + } + + return "--{$this->boundary}\r\n".trim($str)."\r\n\r\n"; + } + + /** + * Create the aggregate stream that will be used to upload the POST data + */ + protected function createStream(array $elements = []): StreamInterface + { + $stream = new AppendStream(); + + foreach ($elements as $element) { + if (!is_array($element)) { + throw new \UnexpectedValueException('An array is expected'); + } + $this->addElement($stream, $element); + } + + // Add the trailing boundary with CRLF + $stream->addStream(Utils::streamFor("--{$this->boundary}--\r\n")); + + return $stream; + } + + private function addElement(AppendStream $stream, array $element): void + { + foreach (['contents', 'name'] as $key) { + if (!array_key_exists($key, $element)) { + throw new \InvalidArgumentException("A '{$key}' key is required"); + } + } + + $element['contents'] = Utils::streamFor($element['contents']); + + if (empty($element['filename'])) { + $uri = $element['contents']->getMetadata('uri'); + if ($uri && \is_string($uri) && \substr($uri, 0, 6) !== 'php://' && \substr($uri, 0, 7) !== 'data://') { + $element['filename'] = $uri; + } + } + + [$body, $headers] = $this->createElement( + $element['name'], + $element['contents'], + $element['filename'] ?? null, + $element['headers'] ?? [] + ); + + $stream->addStream(Utils::streamFor($this->getHeaders($headers))); + $stream->addStream($body); + $stream->addStream(Utils::streamFor("\r\n")); + } + + /** + * @param string[] $headers + * + * @return array{0: StreamInterface, 1: string[]} + */ + private function createElement(string $name, StreamInterface $stream, ?string $filename, array $headers): array + { + // Set a default content-disposition header if one was no provided + $disposition = self::getHeader($headers, 'content-disposition'); + if (!$disposition) { + $headers['Content-Disposition'] = ($filename === '0' || $filename) + ? sprintf( + 'form-data; name="%s"; filename="%s"', + $name, + basename($filename) + ) + : "form-data; name=\"{$name}\""; + } + + // Set a default content-length header if one was no provided + $length = self::getHeader($headers, 'content-length'); + if (!$length) { + if ($length = $stream->getSize()) { + $headers['Content-Length'] = (string) $length; + } + } + + // Set a default Content-Type if one was not supplied + $type = self::getHeader($headers, 'content-type'); + if (!$type && ($filename === '0' || $filename)) { + $headers['Content-Type'] = MimeType::fromFilename($filename) ?? 'application/octet-stream'; + } + + return [$stream, $headers]; + } + + /** + * @param string[] $headers + */ + private static function getHeader(array $headers, string $key): ?string + { + $lowercaseHeader = strtolower($key); + foreach ($headers as $k => $v) { + if (strtolower((string) $k) === $lowercaseHeader) { + return $v; + } + } + + return null; + } +} diff --git a/vendor/guzzlehttp/psr7/src/NoSeekStream.php b/vendor/guzzlehttp/psr7/src/NoSeekStream.php new file mode 100644 index 0000000..161a224 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/NoSeekStream.php @@ -0,0 +1,28 @@ +source = $source; + $this->size = $options['size'] ?? null; + $this->metadata = $options['metadata'] ?? []; + $this->buffer = new BufferStream(); + } + + public function __toString(): string + { + try { + return Utils::copyToString($this); + } catch (\Throwable $e) { + if (\PHP_VERSION_ID >= 70400) { + throw $e; + } + trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR); + + return ''; + } + } + + public function close(): void + { + $this->detach(); + } + + public function detach() + { + $this->tellPos = 0; + $this->source = null; + + return null; + } + + public function getSize(): ?int + { + return $this->size; + } + + public function tell(): int + { + return $this->tellPos; + } + + public function eof(): bool + { + return $this->source === null; + } + + public function isSeekable(): bool + { + return false; + } + + public function rewind(): void + { + $this->seek(0); + } + + public function seek($offset, $whence = SEEK_SET): void + { + throw new \RuntimeException('Cannot seek a PumpStream'); + } + + public function isWritable(): bool + { + return false; + } + + public function write($string): int + { + throw new \RuntimeException('Cannot write to a PumpStream'); + } + + public function isReadable(): bool + { + return true; + } + + public function read($length): string + { + $data = $this->buffer->read($length); + $readLen = strlen($data); + $this->tellPos += $readLen; + $remaining = $length - $readLen; + + if ($remaining) { + $this->pump($remaining); + $data .= $this->buffer->read($remaining); + $this->tellPos += strlen($data) - $readLen; + } + + return $data; + } + + public function getContents(): string + { + $result = ''; + while (!$this->eof()) { + $result .= $this->read(1000000); + } + + return $result; + } + + /** + * @return mixed + */ + public function getMetadata($key = null) + { + if (!$key) { + return $this->metadata; + } + + return $this->metadata[$key] ?? null; + } + + private function pump(int $length): void + { + if ($this->source !== null) { + do { + $data = ($this->source)($length); + if ($data === false || $data === null) { + $this->source = null; + + return; + } + $this->buffer->write($data); + $length -= strlen($data); + } while ($length > 0); + } + } +} diff --git a/vendor/guzzlehttp/psr7/src/Query.php b/vendor/guzzlehttp/psr7/src/Query.php new file mode 100644 index 0000000..ccf867a --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/Query.php @@ -0,0 +1,118 @@ + '1', 'foo[b]' => '2'])`. + * + * @param string $str Query string to parse + * @param int|bool $urlEncoding How the query string is encoded + */ + public static function parse(string $str, $urlEncoding = true): array + { + $result = []; + + if ($str === '') { + return $result; + } + + if ($urlEncoding === true) { + $decoder = function ($value) { + return rawurldecode(str_replace('+', ' ', (string) $value)); + }; + } elseif ($urlEncoding === PHP_QUERY_RFC3986) { + $decoder = 'rawurldecode'; + } elseif ($urlEncoding === PHP_QUERY_RFC1738) { + $decoder = 'urldecode'; + } else { + $decoder = function ($str) { + return $str; + }; + } + + foreach (explode('&', $str) as $kvp) { + $parts = explode('=', $kvp, 2); + $key = $decoder($parts[0]); + $value = isset($parts[1]) ? $decoder($parts[1]) : null; + if (!array_key_exists($key, $result)) { + $result[$key] = $value; + } else { + if (!is_array($result[$key])) { + $result[$key] = [$result[$key]]; + } + $result[$key][] = $value; + } + } + + return $result; + } + + /** + * Build a query string from an array of key value pairs. + * + * This function can use the return value of `parse()` to build a query + * string. This function does not modify the provided keys when an array is + * encountered (like `http_build_query()` would). + * + * @param array $params Query string parameters. + * @param int|false $encoding Set to false to not encode, + * PHP_QUERY_RFC3986 to encode using + * RFC3986, or PHP_QUERY_RFC1738 to + * encode using RFC1738. + * @param bool $treatBoolsAsInts Set to true to encode as 0/1, and + * false as false/true. + */ + public static function build(array $params, $encoding = PHP_QUERY_RFC3986, bool $treatBoolsAsInts = true): string + { + if (!$params) { + return ''; + } + + if ($encoding === false) { + $encoder = function (string $str): string { + return $str; + }; + } elseif ($encoding === PHP_QUERY_RFC3986) { + $encoder = 'rawurlencode'; + } elseif ($encoding === PHP_QUERY_RFC1738) { + $encoder = 'urlencode'; + } else { + throw new \InvalidArgumentException('Invalid type'); + } + + $castBool = $treatBoolsAsInts ? static function ($v) { return (int) $v; } : static function ($v) { return $v ? 'true' : 'false'; }; + + $qs = ''; + foreach ($params as $k => $v) { + $k = $encoder((string) $k); + if (!is_array($v)) { + $qs .= $k; + $v = is_bool($v) ? $castBool($v) : $v; + if ($v !== null) { + $qs .= '='.$encoder((string) $v); + } + $qs .= '&'; + } else { + foreach ($v as $vv) { + $qs .= $k; + $vv = is_bool($vv) ? $castBool($vv) : $vv; + if ($vv !== null) { + $qs .= '='.$encoder((string) $vv); + } + $qs .= '&'; + } + } + } + + return $qs ? (string) substr($qs, 0, -1) : ''; + } +} diff --git a/vendor/guzzlehttp/psr7/src/Request.php b/vendor/guzzlehttp/psr7/src/Request.php new file mode 100644 index 0000000..faafe1a --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/Request.php @@ -0,0 +1,159 @@ +assertMethod($method); + if (!($uri instanceof UriInterface)) { + $uri = new Uri($uri); + } + + $this->method = strtoupper($method); + $this->uri = $uri; + $this->setHeaders($headers); + $this->protocol = $version; + + if (!isset($this->headerNames['host'])) { + $this->updateHostFromUri(); + } + + if ($body !== '' && $body !== null) { + $this->stream = Utils::streamFor($body); + } + } + + public function getRequestTarget(): string + { + if ($this->requestTarget !== null) { + return $this->requestTarget; + } + + $target = $this->uri->getPath(); + if ($target === '') { + $target = '/'; + } + if ($this->uri->getQuery() != '') { + $target .= '?'.$this->uri->getQuery(); + } + + return $target; + } + + public function withRequestTarget($requestTarget): RequestInterface + { + if (preg_match('#\s#', $requestTarget)) { + throw new InvalidArgumentException( + 'Invalid request target provided; cannot contain whitespace' + ); + } + + $new = clone $this; + $new->requestTarget = $requestTarget; + + return $new; + } + + public function getMethod(): string + { + return $this->method; + } + + public function withMethod($method): RequestInterface + { + $this->assertMethod($method); + $new = clone $this; + $new->method = strtoupper($method); + + return $new; + } + + public function getUri(): UriInterface + { + return $this->uri; + } + + public function withUri(UriInterface $uri, $preserveHost = false): RequestInterface + { + if ($uri === $this->uri) { + return $this; + } + + $new = clone $this; + $new->uri = $uri; + + if (!$preserveHost || !isset($this->headerNames['host'])) { + $new->updateHostFromUri(); + } + + return $new; + } + + private function updateHostFromUri(): void + { + $host = $this->uri->getHost(); + + if ($host == '') { + return; + } + + if (($port = $this->uri->getPort()) !== null) { + $host .= ':'.$port; + } + + if (isset($this->headerNames['host'])) { + $header = $this->headerNames['host']; + } else { + $header = 'Host'; + $this->headerNames['host'] = 'Host'; + } + // Ensure Host is the first header. + // See: https://datatracker.ietf.org/doc/html/rfc7230#section-5.4 + $this->headers = [$header => [$host]] + $this->headers; + } + + /** + * @param mixed $method + */ + private function assertMethod($method): void + { + if (!is_string($method) || $method === '') { + throw new InvalidArgumentException('Method must be a non-empty string.'); + } + } +} diff --git a/vendor/guzzlehttp/psr7/src/Response.php b/vendor/guzzlehttp/psr7/src/Response.php new file mode 100644 index 0000000..34e612f --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/Response.php @@ -0,0 +1,161 @@ + 'Continue', + 101 => 'Switching Protocols', + 102 => 'Processing', + 200 => 'OK', + 201 => 'Created', + 202 => 'Accepted', + 203 => 'Non-Authoritative Information', + 204 => 'No Content', + 205 => 'Reset Content', + 206 => 'Partial Content', + 207 => 'Multi-status', + 208 => 'Already Reported', + 300 => 'Multiple Choices', + 301 => 'Moved Permanently', + 302 => 'Found', + 303 => 'See Other', + 304 => 'Not Modified', + 305 => 'Use Proxy', + 306 => 'Switch Proxy', + 307 => 'Temporary Redirect', + 308 => 'Permanent Redirect', + 400 => 'Bad Request', + 401 => 'Unauthorized', + 402 => 'Payment Required', + 403 => 'Forbidden', + 404 => 'Not Found', + 405 => 'Method Not Allowed', + 406 => 'Not Acceptable', + 407 => 'Proxy Authentication Required', + 408 => 'Request Time-out', + 409 => 'Conflict', + 410 => 'Gone', + 411 => 'Length Required', + 412 => 'Precondition Failed', + 413 => 'Request Entity Too Large', + 414 => 'Request-URI Too Large', + 415 => 'Unsupported Media Type', + 416 => 'Requested range not satisfiable', + 417 => 'Expectation Failed', + 418 => 'I\'m a teapot', + 422 => 'Unprocessable Entity', + 423 => 'Locked', + 424 => 'Failed Dependency', + 425 => 'Unordered Collection', + 426 => 'Upgrade Required', + 428 => 'Precondition Required', + 429 => 'Too Many Requests', + 431 => 'Request Header Fields Too Large', + 451 => 'Unavailable For Legal Reasons', + 500 => 'Internal Server Error', + 501 => 'Not Implemented', + 502 => 'Bad Gateway', + 503 => 'Service Unavailable', + 504 => 'Gateway Time-out', + 505 => 'HTTP Version not supported', + 506 => 'Variant Also Negotiates', + 507 => 'Insufficient Storage', + 508 => 'Loop Detected', + 510 => 'Not Extended', + 511 => 'Network Authentication Required', + ]; + + /** @var string */ + private $reasonPhrase; + + /** @var int */ + private $statusCode; + + /** + * @param int $status Status code + * @param (string|string[])[] $headers Response headers + * @param string|resource|StreamInterface|null $body Response body + * @param string $version Protocol version + * @param string|null $reason Reason phrase (when empty a default will be used based on the status code) + */ + public function __construct( + int $status = 200, + array $headers = [], + $body = null, + string $version = '1.1', + ?string $reason = null + ) { + $this->assertStatusCodeRange($status); + + $this->statusCode = $status; + + if ($body !== '' && $body !== null) { + $this->stream = Utils::streamFor($body); + } + + $this->setHeaders($headers); + if ($reason == '' && isset(self::PHRASES[$this->statusCode])) { + $this->reasonPhrase = self::PHRASES[$this->statusCode]; + } else { + $this->reasonPhrase = (string) $reason; + } + + $this->protocol = $version; + } + + public function getStatusCode(): int + { + return $this->statusCode; + } + + public function getReasonPhrase(): string + { + return $this->reasonPhrase; + } + + public function withStatus($code, $reasonPhrase = ''): ResponseInterface + { + $this->assertStatusCodeIsInteger($code); + $code = (int) $code; + $this->assertStatusCodeRange($code); + + $new = clone $this; + $new->statusCode = $code; + if ($reasonPhrase == '' && isset(self::PHRASES[$new->statusCode])) { + $reasonPhrase = self::PHRASES[$new->statusCode]; + } + $new->reasonPhrase = (string) $reasonPhrase; + + return $new; + } + + /** + * @param mixed $statusCode + */ + private function assertStatusCodeIsInteger($statusCode): void + { + if (filter_var($statusCode, FILTER_VALIDATE_INT) === false) { + throw new \InvalidArgumentException('Status code must be an integer value.'); + } + } + + private function assertStatusCodeRange(int $statusCode): void + { + if ($statusCode < 100 || $statusCode >= 600) { + throw new \InvalidArgumentException('Status code must be an integer value between 1xx and 5xx.'); + } + } +} diff --git a/vendor/guzzlehttp/psr7/src/Rfc7230.php b/vendor/guzzlehttp/psr7/src/Rfc7230.php new file mode 100644 index 0000000..8219dba --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/Rfc7230.php @@ -0,0 +1,23 @@ +@,;:\\\"/[\]?={}\x01-\x20\x7F]++):[ \t]*+((?:[ \t]*+[\x21-\x7E\x80-\xFF]++)*+)[ \t]*+\r?\n)m"; + public const HEADER_FOLD_REGEX = "(\r?\n[ \t]++)"; +} diff --git a/vendor/guzzlehttp/psr7/src/ServerRequest.php b/vendor/guzzlehttp/psr7/src/ServerRequest.php new file mode 100644 index 0000000..3cc9534 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/ServerRequest.php @@ -0,0 +1,340 @@ +serverParams = $serverParams; + + parent::__construct($method, $uri, $headers, $body, $version); + } + + /** + * Return an UploadedFile instance array. + * + * @param array $files An array which respect $_FILES structure + * + * @throws InvalidArgumentException for unrecognized values + */ + public static function normalizeFiles(array $files): array + { + $normalized = []; + + foreach ($files as $key => $value) { + if ($value instanceof UploadedFileInterface) { + $normalized[$key] = $value; + } elseif (is_array($value) && isset($value['tmp_name'])) { + $normalized[$key] = self::createUploadedFileFromSpec($value); + } elseif (is_array($value)) { + $normalized[$key] = self::normalizeFiles($value); + continue; + } else { + throw new InvalidArgumentException('Invalid value in files specification'); + } + } + + return $normalized; + } + + /** + * Create and return an UploadedFile instance from a $_FILES specification. + * + * If the specification represents an array of values, this method will + * delegate to normalizeNestedFileSpec() and return that return value. + * + * @param array $value $_FILES struct + * + * @return UploadedFileInterface|UploadedFileInterface[] + */ + private static function createUploadedFileFromSpec(array $value) + { + if (is_array($value['tmp_name'])) { + return self::normalizeNestedFileSpec($value); + } + + return new UploadedFile( + $value['tmp_name'], + (int) $value['size'], + (int) $value['error'], + $value['name'], + $value['type'] + ); + } + + /** + * Normalize an array of file specifications. + * + * Loops through all nested files and returns a normalized array of + * UploadedFileInterface instances. + * + * @return UploadedFileInterface[] + */ + private static function normalizeNestedFileSpec(array $files = []): array + { + $normalizedFiles = []; + + foreach (array_keys($files['tmp_name']) as $key) { + $spec = [ + 'tmp_name' => $files['tmp_name'][$key], + 'size' => $files['size'][$key] ?? null, + 'error' => $files['error'][$key] ?? null, + 'name' => $files['name'][$key] ?? null, + 'type' => $files['type'][$key] ?? null, + ]; + $normalizedFiles[$key] = self::createUploadedFileFromSpec($spec); + } + + return $normalizedFiles; + } + + /** + * Return a ServerRequest populated with superglobals: + * $_GET + * $_POST + * $_COOKIE + * $_FILES + * $_SERVER + */ + public static function fromGlobals(): ServerRequestInterface + { + $method = $_SERVER['REQUEST_METHOD'] ?? 'GET'; + $headers = getallheaders(); + $uri = self::getUriFromGlobals(); + $body = new CachingStream(new LazyOpenStream('php://input', 'r+')); + $protocol = isset($_SERVER['SERVER_PROTOCOL']) ? str_replace('HTTP/', '', $_SERVER['SERVER_PROTOCOL']) : '1.1'; + + $serverRequest = new ServerRequest($method, $uri, $headers, $body, $protocol, $_SERVER); + + return $serverRequest + ->withCookieParams($_COOKIE) + ->withQueryParams($_GET) + ->withParsedBody($_POST) + ->withUploadedFiles(self::normalizeFiles($_FILES)); + } + + private static function extractHostAndPortFromAuthority(string $authority): array + { + $uri = 'http://'.$authority; + $parts = parse_url($uri); + if (false === $parts) { + return [null, null]; + } + + $host = $parts['host'] ?? null; + $port = $parts['port'] ?? null; + + return [$host, $port]; + } + + /** + * Get a Uri populated with values from $_SERVER. + */ + public static function getUriFromGlobals(): UriInterface + { + $uri = new Uri(''); + + $uri = $uri->withScheme(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ? 'https' : 'http'); + + $hasPort = false; + if (isset($_SERVER['HTTP_HOST'])) { + [$host, $port] = self::extractHostAndPortFromAuthority($_SERVER['HTTP_HOST']); + if ($host !== null) { + $uri = $uri->withHost($host); + } + + if ($port !== null) { + $hasPort = true; + $uri = $uri->withPort($port); + } + } elseif (isset($_SERVER['SERVER_NAME'])) { + $uri = $uri->withHost($_SERVER['SERVER_NAME']); + } elseif (isset($_SERVER['SERVER_ADDR'])) { + $uri = $uri->withHost($_SERVER['SERVER_ADDR']); + } + + if (!$hasPort && isset($_SERVER['SERVER_PORT'])) { + $uri = $uri->withPort($_SERVER['SERVER_PORT']); + } + + $hasQuery = false; + if (isset($_SERVER['REQUEST_URI'])) { + $requestUriParts = explode('?', $_SERVER['REQUEST_URI'], 2); + $uri = $uri->withPath($requestUriParts[0]); + if (isset($requestUriParts[1])) { + $hasQuery = true; + $uri = $uri->withQuery($requestUriParts[1]); + } + } + + if (!$hasQuery && isset($_SERVER['QUERY_STRING'])) { + $uri = $uri->withQuery($_SERVER['QUERY_STRING']); + } + + return $uri; + } + + public function getServerParams(): array + { + return $this->serverParams; + } + + public function getUploadedFiles(): array + { + return $this->uploadedFiles; + } + + public function withUploadedFiles(array $uploadedFiles): ServerRequestInterface + { + $new = clone $this; + $new->uploadedFiles = $uploadedFiles; + + return $new; + } + + public function getCookieParams(): array + { + return $this->cookieParams; + } + + public function withCookieParams(array $cookies): ServerRequestInterface + { + $new = clone $this; + $new->cookieParams = $cookies; + + return $new; + } + + public function getQueryParams(): array + { + return $this->queryParams; + } + + public function withQueryParams(array $query): ServerRequestInterface + { + $new = clone $this; + $new->queryParams = $query; + + return $new; + } + + /** + * @return array|object|null + */ + public function getParsedBody() + { + return $this->parsedBody; + } + + public function withParsedBody($data): ServerRequestInterface + { + $new = clone $this; + $new->parsedBody = $data; + + return $new; + } + + public function getAttributes(): array + { + return $this->attributes; + } + + /** + * @return mixed + */ + public function getAttribute($attribute, $default = null) + { + if (false === array_key_exists($attribute, $this->attributes)) { + return $default; + } + + return $this->attributes[$attribute]; + } + + public function withAttribute($attribute, $value): ServerRequestInterface + { + $new = clone $this; + $new->attributes[$attribute] = $value; + + return $new; + } + + public function withoutAttribute($attribute): ServerRequestInterface + { + if (false === array_key_exists($attribute, $this->attributes)) { + return $this; + } + + $new = clone $this; + unset($new->attributes[$attribute]); + + return $new; + } +} diff --git a/vendor/guzzlehttp/psr7/src/Stream.php b/vendor/guzzlehttp/psr7/src/Stream.php new file mode 100644 index 0000000..0aff9b2 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/Stream.php @@ -0,0 +1,283 @@ +size = $options['size']; + } + + $this->customMetadata = $options['metadata'] ?? []; + $this->stream = $stream; + $meta = stream_get_meta_data($this->stream); + $this->seekable = $meta['seekable']; + $this->readable = (bool) preg_match(self::READABLE_MODES, $meta['mode']); + $this->writable = (bool) preg_match(self::WRITABLE_MODES, $meta['mode']); + $this->uri = $this->getMetadata('uri'); + } + + /** + * Closes the stream when the destructed + */ + public function __destruct() + { + $this->close(); + } + + public function __toString(): string + { + try { + if ($this->isSeekable()) { + $this->seek(0); + } + + return $this->getContents(); + } catch (\Throwable $e) { + if (\PHP_VERSION_ID >= 70400) { + throw $e; + } + trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR); + + return ''; + } + } + + public function getContents(): string + { + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } + + if (!$this->readable) { + throw new \RuntimeException('Cannot read from non-readable stream'); + } + + return Utils::tryGetContents($this->stream); + } + + public function close(): void + { + if (isset($this->stream)) { + if (is_resource($this->stream)) { + fclose($this->stream); + } + $this->detach(); + } + } + + public function detach() + { + if (!isset($this->stream)) { + return null; + } + + $result = $this->stream; + unset($this->stream); + $this->size = $this->uri = null; + $this->readable = $this->writable = $this->seekable = false; + + return $result; + } + + public function getSize(): ?int + { + if ($this->size !== null) { + return $this->size; + } + + if (!isset($this->stream)) { + return null; + } + + // Clear the stat cache if the stream has a URI + if ($this->uri) { + clearstatcache(true, $this->uri); + } + + $stats = fstat($this->stream); + if (is_array($stats) && isset($stats['size'])) { + $this->size = $stats['size']; + + return $this->size; + } + + return null; + } + + public function isReadable(): bool + { + return $this->readable; + } + + public function isWritable(): bool + { + return $this->writable; + } + + public function isSeekable(): bool + { + return $this->seekable; + } + + public function eof(): bool + { + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } + + return feof($this->stream); + } + + public function tell(): int + { + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } + + $result = ftell($this->stream); + + if ($result === false) { + throw new \RuntimeException('Unable to determine stream position'); + } + + return $result; + } + + public function rewind(): void + { + $this->seek(0); + } + + public function seek($offset, $whence = SEEK_SET): void + { + $whence = (int) $whence; + + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } + if (!$this->seekable) { + throw new \RuntimeException('Stream is not seekable'); + } + if (fseek($this->stream, $offset, $whence) === -1) { + throw new \RuntimeException('Unable to seek to stream position ' + .$offset.' with whence '.var_export($whence, true)); + } + } + + public function read($length): string + { + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } + if (!$this->readable) { + throw new \RuntimeException('Cannot read from non-readable stream'); + } + if ($length < 0) { + throw new \RuntimeException('Length parameter cannot be negative'); + } + + if (0 === $length) { + return ''; + } + + try { + $string = fread($this->stream, $length); + } catch (\Exception $e) { + throw new \RuntimeException('Unable to read from stream', 0, $e); + } + + if (false === $string) { + throw new \RuntimeException('Unable to read from stream'); + } + + return $string; + } + + public function write($string): int + { + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } + if (!$this->writable) { + throw new \RuntimeException('Cannot write to a non-writable stream'); + } + + // We can't know the size after writing anything + $this->size = null; + $result = fwrite($this->stream, $string); + + if ($result === false) { + throw new \RuntimeException('Unable to write to stream'); + } + + return $result; + } + + /** + * @return mixed + */ + public function getMetadata($key = null) + { + if (!isset($this->stream)) { + return $key ? null : []; + } elseif (!$key) { + return $this->customMetadata + stream_get_meta_data($this->stream); + } elseif (isset($this->customMetadata[$key])) { + return $this->customMetadata[$key]; + } + + $meta = stream_get_meta_data($this->stream); + + return $meta[$key] ?? null; + } +} diff --git a/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php b/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php new file mode 100644 index 0000000..601c13a --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php @@ -0,0 +1,156 @@ +stream = $stream; + } + + /** + * Magic method used to create a new stream if streams are not added in + * the constructor of a decorator (e.g., LazyOpenStream). + * + * @return StreamInterface + */ + public function __get(string $name) + { + if ($name === 'stream') { + $this->stream = $this->createStream(); + + return $this->stream; + } + + throw new \UnexpectedValueException("$name not found on class"); + } + + public function __toString(): string + { + try { + if ($this->isSeekable()) { + $this->seek(0); + } + + return $this->getContents(); + } catch (\Throwable $e) { + if (\PHP_VERSION_ID >= 70400) { + throw $e; + } + trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR); + + return ''; + } + } + + public function getContents(): string + { + return Utils::copyToString($this); + } + + /** + * Allow decorators to implement custom methods + * + * @return mixed + */ + public function __call(string $method, array $args) + { + /** @var callable $callable */ + $callable = [$this->stream, $method]; + $result = ($callable)(...$args); + + // Always return the wrapped object if the result is a return $this + return $result === $this->stream ? $this : $result; + } + + public function close(): void + { + $this->stream->close(); + } + + /** + * @return mixed + */ + public function getMetadata($key = null) + { + return $this->stream->getMetadata($key); + } + + public function detach() + { + return $this->stream->detach(); + } + + public function getSize(): ?int + { + return $this->stream->getSize(); + } + + public function eof(): bool + { + return $this->stream->eof(); + } + + public function tell(): int + { + return $this->stream->tell(); + } + + public function isReadable(): bool + { + return $this->stream->isReadable(); + } + + public function isWritable(): bool + { + return $this->stream->isWritable(); + } + + public function isSeekable(): bool + { + return $this->stream->isSeekable(); + } + + public function rewind(): void + { + $this->seek(0); + } + + public function seek($offset, $whence = SEEK_SET): void + { + $this->stream->seek($offset, $whence); + } + + public function read($length): string + { + return $this->stream->read($length); + } + + public function write($string): int + { + return $this->stream->write($string); + } + + /** + * Implement in subclasses to dynamically create streams when requested. + * + * @throws \BadMethodCallException + */ + protected function createStream(): StreamInterface + { + throw new \BadMethodCallException('Not implemented'); + } +} diff --git a/vendor/guzzlehttp/psr7/src/StreamWrapper.php b/vendor/guzzlehttp/psr7/src/StreamWrapper.php new file mode 100644 index 0000000..77b04d7 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/StreamWrapper.php @@ -0,0 +1,207 @@ +isReadable()) { + $mode = $stream->isWritable() ? 'r+' : 'r'; + } elseif ($stream->isWritable()) { + $mode = 'w'; + } else { + throw new \InvalidArgumentException('The stream must be readable, ' + .'writable, or both.'); + } + + return fopen('guzzle://stream', $mode, false, self::createStreamContext($stream)); + } + + /** + * Creates a stream context that can be used to open a stream as a php stream resource. + * + * @return resource + */ + public static function createStreamContext(StreamInterface $stream) + { + return stream_context_create([ + 'guzzle' => ['stream' => $stream], + ]); + } + + /** + * Registers the stream wrapper if needed + */ + public static function register(): void + { + if (!in_array('guzzle', stream_get_wrappers())) { + stream_wrapper_register('guzzle', __CLASS__); + } + } + + public function stream_open(string $path, string $mode, int $options, ?string &$opened_path = null): bool + { + $options = stream_context_get_options($this->context); + + if (!isset($options['guzzle']['stream'])) { + return false; + } + + $this->mode = $mode; + $this->stream = $options['guzzle']['stream']; + + return true; + } + + public function stream_read(int $count): string + { + return $this->stream->read($count); + } + + public function stream_write(string $data): int + { + return $this->stream->write($data); + } + + public function stream_tell(): int + { + return $this->stream->tell(); + } + + public function stream_eof(): bool + { + return $this->stream->eof(); + } + + public function stream_seek(int $offset, int $whence): bool + { + $this->stream->seek($offset, $whence); + + return true; + } + + /** + * @return resource|false + */ + public function stream_cast(int $cast_as) + { + $stream = clone $this->stream; + $resource = $stream->detach(); + + return $resource ?? false; + } + + /** + * @return array{ + * dev: int, + * ino: int, + * mode: int, + * nlink: int, + * uid: int, + * gid: int, + * rdev: int, + * size: int, + * atime: int, + * mtime: int, + * ctime: int, + * blksize: int, + * blocks: int + * }|false + */ + public function stream_stat() + { + if ($this->stream->getSize() === null) { + return false; + } + + static $modeMap = [ + 'r' => 33060, + 'rb' => 33060, + 'r+' => 33206, + 'w' => 33188, + 'wb' => 33188, + ]; + + return [ + 'dev' => 0, + 'ino' => 0, + 'mode' => $modeMap[$this->mode], + 'nlink' => 0, + 'uid' => 0, + 'gid' => 0, + 'rdev' => 0, + 'size' => $this->stream->getSize() ?: 0, + 'atime' => 0, + 'mtime' => 0, + 'ctime' => 0, + 'blksize' => 0, + 'blocks' => 0, + ]; + } + + /** + * @return array{ + * dev: int, + * ino: int, + * mode: int, + * nlink: int, + * uid: int, + * gid: int, + * rdev: int, + * size: int, + * atime: int, + * mtime: int, + * ctime: int, + * blksize: int, + * blocks: int + * } + */ + public function url_stat(string $path, int $flags): array + { + return [ + 'dev' => 0, + 'ino' => 0, + 'mode' => 0, + 'nlink' => 0, + 'uid' => 0, + 'gid' => 0, + 'rdev' => 0, + 'size' => 0, + 'atime' => 0, + 'mtime' => 0, + 'ctime' => 0, + 'blksize' => 0, + 'blocks' => 0, + ]; + } +} diff --git a/vendor/guzzlehttp/psr7/src/UploadedFile.php b/vendor/guzzlehttp/psr7/src/UploadedFile.php new file mode 100644 index 0000000..9c9ea49 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/UploadedFile.php @@ -0,0 +1,211 @@ +setError($errorStatus); + $this->size = $size; + $this->clientFilename = $clientFilename; + $this->clientMediaType = $clientMediaType; + + if ($this->isOk()) { + $this->setStreamOrFile($streamOrFile); + } + } + + /** + * Depending on the value set file or stream variable + * + * @param StreamInterface|string|resource $streamOrFile + * + * @throws InvalidArgumentException + */ + private function setStreamOrFile($streamOrFile): void + { + if (is_string($streamOrFile)) { + $this->file = $streamOrFile; + } elseif (is_resource($streamOrFile)) { + $this->stream = new Stream($streamOrFile); + } elseif ($streamOrFile instanceof StreamInterface) { + $this->stream = $streamOrFile; + } else { + throw new InvalidArgumentException( + 'Invalid stream or file provided for UploadedFile' + ); + } + } + + /** + * @throws InvalidArgumentException + */ + private function setError(int $error): void + { + if (false === in_array($error, UploadedFile::ERRORS, true)) { + throw new InvalidArgumentException( + 'Invalid error status for UploadedFile' + ); + } + + $this->error = $error; + } + + private static function isStringNotEmpty($param): bool + { + return is_string($param) && false === empty($param); + } + + /** + * Return true if there is no upload error + */ + private function isOk(): bool + { + return $this->error === UPLOAD_ERR_OK; + } + + public function isMoved(): bool + { + return $this->moved; + } + + /** + * @throws RuntimeException if is moved or not ok + */ + private function validateActive(): void + { + if (false === $this->isOk()) { + throw new RuntimeException('Cannot retrieve stream due to upload error'); + } + + if ($this->isMoved()) { + throw new RuntimeException('Cannot retrieve stream after it has already been moved'); + } + } + + public function getStream(): StreamInterface + { + $this->validateActive(); + + if ($this->stream instanceof StreamInterface) { + return $this->stream; + } + + /** @var string $file */ + $file = $this->file; + + return new LazyOpenStream($file, 'r+'); + } + + public function moveTo($targetPath): void + { + $this->validateActive(); + + if (false === self::isStringNotEmpty($targetPath)) { + throw new InvalidArgumentException( + 'Invalid path provided for move operation; must be a non-empty string' + ); + } + + if ($this->file) { + $this->moved = PHP_SAPI === 'cli' + ? rename($this->file, $targetPath) + : move_uploaded_file($this->file, $targetPath); + } else { + Utils::copyToStream( + $this->getStream(), + new LazyOpenStream($targetPath, 'w') + ); + + $this->moved = true; + } + + if (false === $this->moved) { + throw new RuntimeException( + sprintf('Uploaded file could not be moved to %s', $targetPath) + ); + } + } + + public function getSize(): ?int + { + return $this->size; + } + + public function getError(): int + { + return $this->error; + } + + public function getClientFilename(): ?string + { + return $this->clientFilename; + } + + public function getClientMediaType(): ?string + { + return $this->clientMediaType; + } +} diff --git a/vendor/guzzlehttp/psr7/src/Uri.php b/vendor/guzzlehttp/psr7/src/Uri.php new file mode 100644 index 0000000..481dfca --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/Uri.php @@ -0,0 +1,743 @@ + 80, + 'https' => 443, + 'ftp' => 21, + 'gopher' => 70, + 'nntp' => 119, + 'news' => 119, + 'telnet' => 23, + 'tn3270' => 23, + 'imap' => 143, + 'pop' => 110, + 'ldap' => 389, + ]; + + /** + * Unreserved characters for use in a regex. + * + * @see https://datatracker.ietf.org/doc/html/rfc3986#section-2.3 + */ + private const CHAR_UNRESERVED = 'a-zA-Z0-9_\-\.~'; + + /** + * Sub-delims for use in a regex. + * + * @see https://datatracker.ietf.org/doc/html/rfc3986#section-2.2 + */ + private const CHAR_SUB_DELIMS = '!\$&\'\(\)\*\+,;='; + private const QUERY_SEPARATORS_REPLACEMENT = ['=' => '%3D', '&' => '%26']; + + /** @var string Uri scheme. */ + private $scheme = ''; + + /** @var string Uri user info. */ + private $userInfo = ''; + + /** @var string Uri host. */ + private $host = ''; + + /** @var int|null Uri port. */ + private $port; + + /** @var string Uri path. */ + private $path = ''; + + /** @var string Uri query string. */ + private $query = ''; + + /** @var string Uri fragment. */ + private $fragment = ''; + + /** @var string|null String representation */ + private $composedComponents; + + public function __construct(string $uri = '') + { + if ($uri !== '') { + $parts = self::parse($uri); + if ($parts === false) { + throw new MalformedUriException("Unable to parse URI: $uri"); + } + $this->applyParts($parts); + } + } + + /** + * UTF-8 aware \parse_url() replacement. + * + * The internal function produces broken output for non ASCII domain names + * (IDN) when used with locales other than "C". + * + * On the other hand, cURL understands IDN correctly only when UTF-8 locale + * is configured ("C.UTF-8", "en_US.UTF-8", etc.). + * + * @see https://bugs.php.net/bug.php?id=52923 + * @see https://www.php.net/manual/en/function.parse-url.php#114817 + * @see https://curl.haxx.se/libcurl/c/CURLOPT_URL.html#ENCODING + * + * @return array|false + */ + private static function parse(string $url) + { + // If IPv6 + $prefix = ''; + if (preg_match('%^(.*://\[[0-9:a-f]+\])(.*?)$%', $url, $matches)) { + /** @var array{0:string, 1:string, 2:string} $matches */ + $prefix = $matches[1]; + $url = $matches[2]; + } + + /** @var string */ + $encodedUrl = preg_replace_callback( + '%[^:/@?&=#]+%usD', + static function ($matches) { + return urlencode($matches[0]); + }, + $url + ); + + $result = parse_url($prefix.$encodedUrl); + + if ($result === false) { + return false; + } + + return array_map('urldecode', $result); + } + + public function __toString(): string + { + if ($this->composedComponents === null) { + $this->composedComponents = self::composeComponents( + $this->scheme, + $this->getAuthority(), + $this->path, + $this->query, + $this->fragment + ); + } + + return $this->composedComponents; + } + + /** + * Composes a URI reference string from its various components. + * + * Usually this method does not need to be called manually but instead is used indirectly via + * `Psr\Http\Message\UriInterface::__toString`. + * + * PSR-7 UriInterface treats an empty component the same as a missing component as + * getQuery(), getFragment() etc. always return a string. This explains the slight + * difference to RFC 3986 Section 5.3. + * + * Another adjustment is that the authority separator is added even when the authority is missing/empty + * for the "file" scheme. This is because PHP stream functions like `file_get_contents` only work with + * `file:///myfile` but not with `file:/myfile` although they are equivalent according to RFC 3986. But + * `file:///` is the more common syntax for the file scheme anyway (Chrome for example redirects to + * that format). + * + * @see https://datatracker.ietf.org/doc/html/rfc3986#section-5.3 + */ + public static function composeComponents(?string $scheme, ?string $authority, string $path, ?string $query, ?string $fragment): string + { + $uri = ''; + + // weak type checks to also accept null until we can add scalar type hints + if ($scheme != '') { + $uri .= $scheme.':'; + } + + if ($authority != '' || $scheme === 'file') { + $uri .= '//'.$authority; + } + + if ($authority != '' && $path != '' && $path[0] != '/') { + $path = '/'.$path; + } + + $uri .= $path; + + if ($query != '') { + $uri .= '?'.$query; + } + + if ($fragment != '') { + $uri .= '#'.$fragment; + } + + return $uri; + } + + /** + * Whether the URI has the default port of the current scheme. + * + * `Psr\Http\Message\UriInterface::getPort` may return null or the standard port. This method can be used + * independently of the implementation. + */ + public static function isDefaultPort(UriInterface $uri): bool + { + return $uri->getPort() === null + || (isset(self::DEFAULT_PORTS[$uri->getScheme()]) && $uri->getPort() === self::DEFAULT_PORTS[$uri->getScheme()]); + } + + /** + * Whether the URI is absolute, i.e. it has a scheme. + * + * An instance of UriInterface can either be an absolute URI or a relative reference. This method returns true + * if it is the former. An absolute URI has a scheme. A relative reference is used to express a URI relative + * to another URI, the base URI. Relative references can be divided into several forms: + * - network-path references, e.g. '//example.com/path' + * - absolute-path references, e.g. '/path' + * - relative-path references, e.g. 'subpath' + * + * @see Uri::isNetworkPathReference + * @see Uri::isAbsolutePathReference + * @see Uri::isRelativePathReference + * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4 + */ + public static function isAbsolute(UriInterface $uri): bool + { + return $uri->getScheme() !== ''; + } + + /** + * Whether the URI is a network-path reference. + * + * A relative reference that begins with two slash characters is termed an network-path reference. + * + * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.2 + */ + public static function isNetworkPathReference(UriInterface $uri): bool + { + return $uri->getScheme() === '' && $uri->getAuthority() !== ''; + } + + /** + * Whether the URI is a absolute-path reference. + * + * A relative reference that begins with a single slash character is termed an absolute-path reference. + * + * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.2 + */ + public static function isAbsolutePathReference(UriInterface $uri): bool + { + return $uri->getScheme() === '' + && $uri->getAuthority() === '' + && isset($uri->getPath()[0]) + && $uri->getPath()[0] === '/'; + } + + /** + * Whether the URI is a relative-path reference. + * + * A relative reference that does not begin with a slash character is termed a relative-path reference. + * + * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.2 + */ + public static function isRelativePathReference(UriInterface $uri): bool + { + return $uri->getScheme() === '' + && $uri->getAuthority() === '' + && (!isset($uri->getPath()[0]) || $uri->getPath()[0] !== '/'); + } + + /** + * Whether the URI is a same-document reference. + * + * A same-document reference refers to a URI that is, aside from its fragment + * component, identical to the base URI. When no base URI is given, only an empty + * URI reference (apart from its fragment) is considered a same-document reference. + * + * @param UriInterface $uri The URI to check + * @param UriInterface|null $base An optional base URI to compare against + * + * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.4 + */ + public static function isSameDocumentReference(UriInterface $uri, ?UriInterface $base = null): bool + { + if ($base !== null) { + $uri = UriResolver::resolve($base, $uri); + + return ($uri->getScheme() === $base->getScheme()) + && ($uri->getAuthority() === $base->getAuthority()) + && ($uri->getPath() === $base->getPath()) + && ($uri->getQuery() === $base->getQuery()); + } + + return $uri->getScheme() === '' && $uri->getAuthority() === '' && $uri->getPath() === '' && $uri->getQuery() === ''; + } + + /** + * Creates a new URI with a specific query string value removed. + * + * Any existing query string values that exactly match the provided key are + * removed. + * + * @param UriInterface $uri URI to use as a base. + * @param string $key Query string key to remove. + */ + public static function withoutQueryValue(UriInterface $uri, string $key): UriInterface + { + $result = self::getFilteredQueryString($uri, [$key]); + + return $uri->withQuery(implode('&', $result)); + } + + /** + * Creates a new URI with a specific query string value. + * + * Any existing query string values that exactly match the provided key are + * removed and replaced with the given key value pair. + * + * A value of null will set the query string key without a value, e.g. "key" + * instead of "key=value". + * + * @param UriInterface $uri URI to use as a base. + * @param string $key Key to set. + * @param string|null $value Value to set + */ + public static function withQueryValue(UriInterface $uri, string $key, ?string $value): UriInterface + { + $result = self::getFilteredQueryString($uri, [$key]); + + $result[] = self::generateQueryString($key, $value); + + return $uri->withQuery(implode('&', $result)); + } + + /** + * Creates a new URI with multiple specific query string values. + * + * It has the same behavior as withQueryValue() but for an associative array of key => value. + * + * @param UriInterface $uri URI to use as a base. + * @param (string|null)[] $keyValueArray Associative array of key and values + */ + public static function withQueryValues(UriInterface $uri, array $keyValueArray): UriInterface + { + $result = self::getFilteredQueryString($uri, array_keys($keyValueArray)); + + foreach ($keyValueArray as $key => $value) { + $result[] = self::generateQueryString((string) $key, $value !== null ? (string) $value : null); + } + + return $uri->withQuery(implode('&', $result)); + } + + /** + * Creates a URI from a hash of `parse_url` components. + * + * @see https://www.php.net/manual/en/function.parse-url.php + * + * @throws MalformedUriException If the components do not form a valid URI. + */ + public static function fromParts(array $parts): UriInterface + { + $uri = new self(); + $uri->applyParts($parts); + $uri->validateState(); + + return $uri; + } + + public function getScheme(): string + { + return $this->scheme; + } + + public function getAuthority(): string + { + $authority = $this->host; + if ($this->userInfo !== '') { + $authority = $this->userInfo.'@'.$authority; + } + + if ($this->port !== null) { + $authority .= ':'.$this->port; + } + + return $authority; + } + + public function getUserInfo(): string + { + return $this->userInfo; + } + + public function getHost(): string + { + return $this->host; + } + + public function getPort(): ?int + { + return $this->port; + } + + public function getPath(): string + { + return $this->path; + } + + public function getQuery(): string + { + return $this->query; + } + + public function getFragment(): string + { + return $this->fragment; + } + + public function withScheme($scheme): UriInterface + { + $scheme = $this->filterScheme($scheme); + + if ($this->scheme === $scheme) { + return $this; + } + + $new = clone $this; + $new->scheme = $scheme; + $new->composedComponents = null; + $new->removeDefaultPort(); + $new->validateState(); + + return $new; + } + + public function withUserInfo($user, $password = null): UriInterface + { + $info = $this->filterUserInfoComponent($user); + if ($password !== null) { + $info .= ':'.$this->filterUserInfoComponent($password); + } + + if ($this->userInfo === $info) { + return $this; + } + + $new = clone $this; + $new->userInfo = $info; + $new->composedComponents = null; + $new->validateState(); + + return $new; + } + + public function withHost($host): UriInterface + { + $host = $this->filterHost($host); + + if ($this->host === $host) { + return $this; + } + + $new = clone $this; + $new->host = $host; + $new->composedComponents = null; + $new->validateState(); + + return $new; + } + + public function withPort($port): UriInterface + { + $port = $this->filterPort($port); + + if ($this->port === $port) { + return $this; + } + + $new = clone $this; + $new->port = $port; + $new->composedComponents = null; + $new->removeDefaultPort(); + $new->validateState(); + + return $new; + } + + public function withPath($path): UriInterface + { + $path = $this->filterPath($path); + + if ($this->path === $path) { + return $this; + } + + $new = clone $this; + $new->path = $path; + $new->composedComponents = null; + $new->validateState(); + + return $new; + } + + public function withQuery($query): UriInterface + { + $query = $this->filterQueryAndFragment($query); + + if ($this->query === $query) { + return $this; + } + + $new = clone $this; + $new->query = $query; + $new->composedComponents = null; + + return $new; + } + + public function withFragment($fragment): UriInterface + { + $fragment = $this->filterQueryAndFragment($fragment); + + if ($this->fragment === $fragment) { + return $this; + } + + $new = clone $this; + $new->fragment = $fragment; + $new->composedComponents = null; + + return $new; + } + + public function jsonSerialize(): string + { + return $this->__toString(); + } + + /** + * Apply parse_url parts to a URI. + * + * @param array $parts Array of parse_url parts to apply. + */ + private function applyParts(array $parts): void + { + $this->scheme = isset($parts['scheme']) + ? $this->filterScheme($parts['scheme']) + : ''; + $this->userInfo = isset($parts['user']) + ? $this->filterUserInfoComponent($parts['user']) + : ''; + $this->host = isset($parts['host']) + ? $this->filterHost($parts['host']) + : ''; + $this->port = isset($parts['port']) + ? $this->filterPort($parts['port']) + : null; + $this->path = isset($parts['path']) + ? $this->filterPath($parts['path']) + : ''; + $this->query = isset($parts['query']) + ? $this->filterQueryAndFragment($parts['query']) + : ''; + $this->fragment = isset($parts['fragment']) + ? $this->filterQueryAndFragment($parts['fragment']) + : ''; + if (isset($parts['pass'])) { + $this->userInfo .= ':'.$this->filterUserInfoComponent($parts['pass']); + } + + $this->removeDefaultPort(); + } + + /** + * @param mixed $scheme + * + * @throws \InvalidArgumentException If the scheme is invalid. + */ + private function filterScheme($scheme): string + { + if (!is_string($scheme)) { + throw new \InvalidArgumentException('Scheme must be a string'); + } + + return \strtr($scheme, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); + } + + /** + * @param mixed $component + * + * @throws \InvalidArgumentException If the user info is invalid. + */ + private function filterUserInfoComponent($component): string + { + if (!is_string($component)) { + throw new \InvalidArgumentException('User info must be a string'); + } + + return preg_replace_callback( + '/(?:[^%'.self::CHAR_UNRESERVED.self::CHAR_SUB_DELIMS.']+|%(?![A-Fa-f0-9]{2}))/', + [$this, 'rawurlencodeMatchZero'], + $component + ); + } + + /** + * @param mixed $host + * + * @throws \InvalidArgumentException If the host is invalid. + */ + private function filterHost($host): string + { + if (!is_string($host)) { + throw new \InvalidArgumentException('Host must be a string'); + } + + return \strtr($host, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); + } + + /** + * @param mixed $port + * + * @throws \InvalidArgumentException If the port is invalid. + */ + private function filterPort($port): ?int + { + if ($port === null) { + return null; + } + + $port = (int) $port; + if (0 > $port || 0xFFFF < $port) { + throw new \InvalidArgumentException( + sprintf('Invalid port: %d. Must be between 0 and 65535', $port) + ); + } + + return $port; + } + + /** + * @param (string|int)[] $keys + * + * @return string[] + */ + private static function getFilteredQueryString(UriInterface $uri, array $keys): array + { + $current = $uri->getQuery(); + + if ($current === '') { + return []; + } + + $decodedKeys = array_map(function ($k): string { + return rawurldecode((string) $k); + }, $keys); + + return array_filter(explode('&', $current), function ($part) use ($decodedKeys) { + return !in_array(rawurldecode(explode('=', $part)[0]), $decodedKeys, true); + }); + } + + private static function generateQueryString(string $key, ?string $value): string + { + // Query string separators ("=", "&") within the key or value need to be encoded + // (while preventing double-encoding) before setting the query string. All other + // chars that need percent-encoding will be encoded by withQuery(). + $queryString = strtr($key, self::QUERY_SEPARATORS_REPLACEMENT); + + if ($value !== null) { + $queryString .= '='.strtr($value, self::QUERY_SEPARATORS_REPLACEMENT); + } + + return $queryString; + } + + private function removeDefaultPort(): void + { + if ($this->port !== null && self::isDefaultPort($this)) { + $this->port = null; + } + } + + /** + * Filters the path of a URI + * + * @param mixed $path + * + * @throws \InvalidArgumentException If the path is invalid. + */ + private function filterPath($path): string + { + if (!is_string($path)) { + throw new \InvalidArgumentException('Path must be a string'); + } + + return preg_replace_callback( + '/(?:[^'.self::CHAR_UNRESERVED.self::CHAR_SUB_DELIMS.'%:@\/]++|%(?![A-Fa-f0-9]{2}))/', + [$this, 'rawurlencodeMatchZero'], + $path + ); + } + + /** + * Filters the query string or fragment of a URI. + * + * @param mixed $str + * + * @throws \InvalidArgumentException If the query or fragment is invalid. + */ + private function filterQueryAndFragment($str): string + { + if (!is_string($str)) { + throw new \InvalidArgumentException('Query and fragment must be a string'); + } + + return preg_replace_callback( + '/(?:[^'.self::CHAR_UNRESERVED.self::CHAR_SUB_DELIMS.'%:@\/\?]++|%(?![A-Fa-f0-9]{2}))/', + [$this, 'rawurlencodeMatchZero'], + $str + ); + } + + private function rawurlencodeMatchZero(array $match): string + { + return rawurlencode($match[0]); + } + + private function validateState(): void + { + if ($this->host === '' && ($this->scheme === 'http' || $this->scheme === 'https')) { + $this->host = self::HTTP_DEFAULT_HOST; + } + + if ($this->getAuthority() === '') { + if (0 === strpos($this->path, '//')) { + throw new MalformedUriException('The path of a URI without an authority must not start with two slashes "//"'); + } + if ($this->scheme === '' && false !== strpos(explode('/', $this->path, 2)[0], ':')) { + throw new MalformedUriException('A relative URI must not have a path beginning with a segment containing a colon'); + } + } + } +} diff --git a/vendor/guzzlehttp/psr7/src/UriComparator.php b/vendor/guzzlehttp/psr7/src/UriComparator.php new file mode 100644 index 0000000..70c582a --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/UriComparator.php @@ -0,0 +1,52 @@ +getHost(), $modified->getHost()) !== 0) { + return true; + } + + if ($original->getScheme() !== $modified->getScheme()) { + return true; + } + + if (self::computePort($original) !== self::computePort($modified)) { + return true; + } + + return false; + } + + private static function computePort(UriInterface $uri): int + { + $port = $uri->getPort(); + + if (null !== $port) { + return $port; + } + + return 'https' === $uri->getScheme() ? 443 : 80; + } + + private function __construct() + { + // cannot be instantiated + } +} diff --git a/vendor/guzzlehttp/psr7/src/UriNormalizer.php b/vendor/guzzlehttp/psr7/src/UriNormalizer.php new file mode 100644 index 0000000..e174557 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/UriNormalizer.php @@ -0,0 +1,220 @@ +getPath() === '' + && ($uri->getScheme() === 'http' || $uri->getScheme() === 'https') + ) { + $uri = $uri->withPath('/'); + } + + if ($flags & self::REMOVE_DEFAULT_HOST && $uri->getScheme() === 'file' && $uri->getHost() === 'localhost') { + $uri = $uri->withHost(''); + } + + if ($flags & self::REMOVE_DEFAULT_PORT && $uri->getPort() !== null && Uri::isDefaultPort($uri)) { + $uri = $uri->withPort(null); + } + + if ($flags & self::REMOVE_DOT_SEGMENTS && !Uri::isRelativePathReference($uri)) { + $uri = $uri->withPath(UriResolver::removeDotSegments($uri->getPath())); + } + + if ($flags & self::REMOVE_DUPLICATE_SLASHES) { + $uri = $uri->withPath(preg_replace('#//++#', '/', $uri->getPath())); + } + + if ($flags & self::SORT_QUERY_PARAMETERS && $uri->getQuery() !== '') { + $queryKeyValues = explode('&', $uri->getQuery()); + sort($queryKeyValues); + $uri = $uri->withQuery(implode('&', $queryKeyValues)); + } + + return $uri; + } + + /** + * Whether two URIs can be considered equivalent. + * + * Both URIs are normalized automatically before comparison with the given $normalizations bitmask. The method also + * accepts relative URI references and returns true when they are equivalent. This of course assumes they will be + * resolved against the same base URI. If this is not the case, determination of equivalence or difference of + * relative references does not mean anything. + * + * @param UriInterface $uri1 An URI to compare + * @param UriInterface $uri2 An URI to compare + * @param int $normalizations A bitmask of normalizations to apply, see constants + * + * @see https://datatracker.ietf.org/doc/html/rfc3986#section-6.1 + */ + public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, int $normalizations = self::PRESERVING_NORMALIZATIONS): bool + { + return (string) self::normalize($uri1, $normalizations) === (string) self::normalize($uri2, $normalizations); + } + + private static function capitalizePercentEncoding(UriInterface $uri): UriInterface + { + $regex = '/(?:%[A-Fa-f0-9]{2})++/'; + + $callback = function (array $match): string { + return strtoupper($match[0]); + }; + + return + $uri->withPath( + preg_replace_callback($regex, $callback, $uri->getPath()) + )->withQuery( + preg_replace_callback($regex, $callback, $uri->getQuery()) + ); + } + + private static function decodeUnreservedCharacters(UriInterface $uri): UriInterface + { + $regex = '/%(?:2D|2E|5F|7E|3[0-9]|[46][1-9A-F]|[57][0-9A])/i'; + + $callback = function (array $match): string { + return rawurldecode($match[0]); + }; + + return + $uri->withPath( + preg_replace_callback($regex, $callback, $uri->getPath()) + )->withQuery( + preg_replace_callback($regex, $callback, $uri->getQuery()) + ); + } + + private function __construct() + { + // cannot be instantiated + } +} diff --git a/vendor/guzzlehttp/psr7/src/UriResolver.php b/vendor/guzzlehttp/psr7/src/UriResolver.php new file mode 100644 index 0000000..3737be1 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/UriResolver.php @@ -0,0 +1,211 @@ +getScheme() != '') { + return $rel->withPath(self::removeDotSegments($rel->getPath())); + } + + if ($rel->getAuthority() != '') { + $targetAuthority = $rel->getAuthority(); + $targetPath = self::removeDotSegments($rel->getPath()); + $targetQuery = $rel->getQuery(); + } else { + $targetAuthority = $base->getAuthority(); + if ($rel->getPath() === '') { + $targetPath = $base->getPath(); + $targetQuery = $rel->getQuery() != '' ? $rel->getQuery() : $base->getQuery(); + } else { + if ($rel->getPath()[0] === '/') { + $targetPath = $rel->getPath(); + } else { + if ($targetAuthority != '' && $base->getPath() === '') { + $targetPath = '/'.$rel->getPath(); + } else { + $lastSlashPos = strrpos($base->getPath(), '/'); + if ($lastSlashPos === false) { + $targetPath = $rel->getPath(); + } else { + $targetPath = substr($base->getPath(), 0, $lastSlashPos + 1).$rel->getPath(); + } + } + } + $targetPath = self::removeDotSegments($targetPath); + $targetQuery = $rel->getQuery(); + } + } + + return new Uri(Uri::composeComponents( + $base->getScheme(), + $targetAuthority, + $targetPath, + $targetQuery, + $rel->getFragment() + )); + } + + /** + * Returns the target URI as a relative reference from the base URI. + * + * This method is the counterpart to resolve(): + * + * (string) $target === (string) UriResolver::resolve($base, UriResolver::relativize($base, $target)) + * + * One use-case is to use the current request URI as base URI and then generate relative links in your documents + * to reduce the document size or offer self-contained downloadable document archives. + * + * $base = new Uri('http://example.com/a/b/'); + * echo UriResolver::relativize($base, new Uri('http://example.com/a/b/c')); // prints 'c'. + * echo UriResolver::relativize($base, new Uri('http://example.com/a/x/y')); // prints '../x/y'. + * echo UriResolver::relativize($base, new Uri('http://example.com/a/b/?q')); // prints '?q'. + * echo UriResolver::relativize($base, new Uri('http://example.org/a/b/')); // prints '//example.org/a/b/'. + * + * This method also accepts a target that is already relative and will try to relativize it further. Only a + * relative-path reference will be returned as-is. + * + * echo UriResolver::relativize($base, new Uri('/a/b/c')); // prints 'c' as well + */ + public static function relativize(UriInterface $base, UriInterface $target): UriInterface + { + if ($target->getScheme() !== '' + && ($base->getScheme() !== $target->getScheme() || $target->getAuthority() === '' && $base->getAuthority() !== '') + ) { + return $target; + } + + if (Uri::isRelativePathReference($target)) { + // As the target is already highly relative we return it as-is. It would be possible to resolve + // the target with `$target = self::resolve($base, $target);` and then try make it more relative + // by removing a duplicate query. But let's not do that automatically. + return $target; + } + + if ($target->getAuthority() !== '' && $base->getAuthority() !== $target->getAuthority()) { + return $target->withScheme(''); + } + + // We must remove the path before removing the authority because if the path starts with two slashes, the URI + // would turn invalid. And we also cannot set a relative path before removing the authority, as that is also + // invalid. + $emptyPathUri = $target->withScheme('')->withPath('')->withUserInfo('')->withPort(null)->withHost(''); + + if ($base->getPath() !== $target->getPath()) { + return $emptyPathUri->withPath(self::getRelativePath($base, $target)); + } + + if ($base->getQuery() === $target->getQuery()) { + // Only the target fragment is left. And it must be returned even if base and target fragment are the same. + return $emptyPathUri->withQuery(''); + } + + // If the base URI has a query but the target has none, we cannot return an empty path reference as it would + // inherit the base query component when resolving. + if ($target->getQuery() === '') { + $segments = explode('/', $target->getPath()); + /** @var string $lastSegment */ + $lastSegment = end($segments); + + return $emptyPathUri->withPath($lastSegment === '' ? './' : $lastSegment); + } + + return $emptyPathUri; + } + + private static function getRelativePath(UriInterface $base, UriInterface $target): string + { + $sourceSegments = explode('/', $base->getPath()); + $targetSegments = explode('/', $target->getPath()); + array_pop($sourceSegments); + $targetLastSegment = array_pop($targetSegments); + foreach ($sourceSegments as $i => $segment) { + if (isset($targetSegments[$i]) && $segment === $targetSegments[$i]) { + unset($sourceSegments[$i], $targetSegments[$i]); + } else { + break; + } + } + $targetSegments[] = $targetLastSegment; + $relativePath = str_repeat('../', count($sourceSegments)).implode('/', $targetSegments); + + // A reference to am empty last segment or an empty first sub-segment must be prefixed with "./". + // This also applies to a segment with a colon character (e.g., "file:colon") that cannot be used + // as the first segment of a relative-path reference, as it would be mistaken for a scheme name. + if ('' === $relativePath || false !== strpos(explode('/', $relativePath, 2)[0], ':')) { + $relativePath = "./$relativePath"; + } elseif ('/' === $relativePath[0]) { + if ($base->getAuthority() != '' && $base->getPath() === '') { + // In this case an extra slash is added by resolve() automatically. So we must not add one here. + $relativePath = ".$relativePath"; + } else { + $relativePath = "./$relativePath"; + } + } + + return $relativePath; + } + + private function __construct() + { + // cannot be instantiated + } +} diff --git a/vendor/guzzlehttp/psr7/src/Utils.php b/vendor/guzzlehttp/psr7/src/Utils.php new file mode 100644 index 0000000..7682d2c --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/Utils.php @@ -0,0 +1,477 @@ + $v) { + if (!in_array(strtolower((string) $k), $keys)) { + $result[$k] = $v; + } + } + + return $result; + } + + /** + * Copy the contents of a stream into another stream until the given number + * of bytes have been read. + * + * @param StreamInterface $source Stream to read from + * @param StreamInterface $dest Stream to write to + * @param int $maxLen Maximum number of bytes to read. Pass -1 + * to read the entire stream. + * + * @throws \RuntimeException on error. + */ + public static function copyToStream(StreamInterface $source, StreamInterface $dest, int $maxLen = -1): void + { + $bufferSize = 8192; + + if ($maxLen === -1) { + while (!$source->eof()) { + if (!$dest->write($source->read($bufferSize))) { + break; + } + } + } else { + $remaining = $maxLen; + while ($remaining > 0 && !$source->eof()) { + $buf = $source->read(min($bufferSize, $remaining)); + $len = strlen($buf); + if (!$len) { + break; + } + $remaining -= $len; + $dest->write($buf); + } + } + } + + /** + * Copy the contents of a stream into a string until the given number of + * bytes have been read. + * + * @param StreamInterface $stream Stream to read + * @param int $maxLen Maximum number of bytes to read. Pass -1 + * to read the entire stream. + * + * @throws \RuntimeException on error. + */ + public static function copyToString(StreamInterface $stream, int $maxLen = -1): string + { + $buffer = ''; + + if ($maxLen === -1) { + while (!$stream->eof()) { + $buf = $stream->read(1048576); + if ($buf === '') { + break; + } + $buffer .= $buf; + } + + return $buffer; + } + + $len = 0; + while (!$stream->eof() && $len < $maxLen) { + $buf = $stream->read($maxLen - $len); + if ($buf === '') { + break; + } + $buffer .= $buf; + $len = strlen($buffer); + } + + return $buffer; + } + + /** + * Calculate a hash of a stream. + * + * This method reads the entire stream to calculate a rolling hash, based + * on PHP's `hash_init` functions. + * + * @param StreamInterface $stream Stream to calculate the hash for + * @param string $algo Hash algorithm (e.g. md5, crc32, etc) + * @param bool $rawOutput Whether or not to use raw output + * + * @throws \RuntimeException on error. + */ + public static function hash(StreamInterface $stream, string $algo, bool $rawOutput = false): string + { + $pos = $stream->tell(); + + if ($pos > 0) { + $stream->rewind(); + } + + $ctx = hash_init($algo); + while (!$stream->eof()) { + hash_update($ctx, $stream->read(1048576)); + } + + $out = hash_final($ctx, $rawOutput); + $stream->seek($pos); + + return $out; + } + + /** + * Clone and modify a request with the given changes. + * + * This method is useful for reducing the number of clones needed to mutate + * a message. + * + * The changes can be one of: + * - method: (string) Changes the HTTP method. + * - set_headers: (array) Sets the given headers. + * - remove_headers: (array) Remove the given headers. + * - body: (mixed) Sets the given body. + * - uri: (UriInterface) Set the URI. + * - query: (string) Set the query string value of the URI. + * - version: (string) Set the protocol version. + * + * @param RequestInterface $request Request to clone and modify. + * @param array $changes Changes to apply. + */ + public static function modifyRequest(RequestInterface $request, array $changes): RequestInterface + { + if (!$changes) { + return $request; + } + + $headers = $request->getHeaders(); + + if (!isset($changes['uri'])) { + $uri = $request->getUri(); + } else { + // Remove the host header if one is on the URI + if ($host = $changes['uri']->getHost()) { + $changes['set_headers']['Host'] = $host; + + if ($port = $changes['uri']->getPort()) { + $standardPorts = ['http' => 80, 'https' => 443]; + $scheme = $changes['uri']->getScheme(); + if (isset($standardPorts[$scheme]) && $port != $standardPorts[$scheme]) { + $changes['set_headers']['Host'] .= ':'.$port; + } + } + } + $uri = $changes['uri']; + } + + if (!empty($changes['remove_headers'])) { + $headers = self::caselessRemove($changes['remove_headers'], $headers); + } + + if (!empty($changes['set_headers'])) { + $headers = self::caselessRemove(array_keys($changes['set_headers']), $headers); + $headers = $changes['set_headers'] + $headers; + } + + if (isset($changes['query'])) { + $uri = $uri->withQuery($changes['query']); + } + + if ($request instanceof ServerRequestInterface) { + $new = (new ServerRequest( + $changes['method'] ?? $request->getMethod(), + $uri, + $headers, + $changes['body'] ?? $request->getBody(), + $changes['version'] ?? $request->getProtocolVersion(), + $request->getServerParams() + )) + ->withParsedBody($request->getParsedBody()) + ->withQueryParams($request->getQueryParams()) + ->withCookieParams($request->getCookieParams()) + ->withUploadedFiles($request->getUploadedFiles()); + + foreach ($request->getAttributes() as $key => $value) { + $new = $new->withAttribute($key, $value); + } + + return $new; + } + + return new Request( + $changes['method'] ?? $request->getMethod(), + $uri, + $headers, + $changes['body'] ?? $request->getBody(), + $changes['version'] ?? $request->getProtocolVersion() + ); + } + + /** + * Read a line from the stream up to the maximum allowed buffer length. + * + * @param StreamInterface $stream Stream to read from + * @param int|null $maxLength Maximum buffer length + */ + public static function readLine(StreamInterface $stream, ?int $maxLength = null): string + { + $buffer = ''; + $size = 0; + + while (!$stream->eof()) { + if ('' === ($byte = $stream->read(1))) { + return $buffer; + } + $buffer .= $byte; + // Break when a new line is found or the max length - 1 is reached + if ($byte === "\n" || ++$size === $maxLength - 1) { + break; + } + } + + return $buffer; + } + + /** + * Redact the password in the user info part of a URI. + */ + public static function redactUserInfo(UriInterface $uri): UriInterface + { + $userInfo = $uri->getUserInfo(); + + if (false !== ($pos = \strpos($userInfo, ':'))) { + return $uri->withUserInfo(\substr($userInfo, 0, $pos), '***'); + } + + return $uri; + } + + /** + * Create a new stream based on the input type. + * + * Options is an associative array that can contain the following keys: + * - metadata: Array of custom metadata. + * - size: Size of the stream. + * + * This method accepts the following `$resource` types: + * - `Psr\Http\Message\StreamInterface`: Returns the value as-is. + * - `string`: Creates a stream object that uses the given string as the contents. + * - `resource`: Creates a stream object that wraps the given PHP stream resource. + * - `Iterator`: If the provided value implements `Iterator`, then a read-only + * stream object will be created that wraps the given iterable. Each time the + * stream is read from, data from the iterator will fill a buffer and will be + * continuously called until the buffer is equal to the requested read size. + * Subsequent read calls will first read from the buffer and then call `next` + * on the underlying iterator until it is exhausted. + * - `object` with `__toString()`: If the object has the `__toString()` method, + * the object will be cast to a string and then a stream will be returned that + * uses the string value. + * - `NULL`: When `null` is passed, an empty stream object is returned. + * - `callable` When a callable is passed, a read-only stream object will be + * created that invokes the given callable. The callable is invoked with the + * number of suggested bytes to read. The callable can return any number of + * bytes, but MUST return `false` when there is no more data to return. The + * stream object that wraps the callable will invoke the callable until the + * number of requested bytes are available. Any additional bytes will be + * buffered and used in subsequent reads. + * + * @param resource|string|int|float|bool|StreamInterface|callable|\Iterator|null $resource Entity body data + * @param array{size?: int, metadata?: array} $options Additional options + * + * @throws \InvalidArgumentException if the $resource arg is not valid. + */ + public static function streamFor($resource = '', array $options = []): StreamInterface + { + if (is_scalar($resource)) { + $stream = self::tryFopen('php://temp', 'r+'); + if ($resource !== '') { + fwrite($stream, (string) $resource); + fseek($stream, 0); + } + + return new Stream($stream, $options); + } + + switch (gettype($resource)) { + case 'resource': + /* + * The 'php://input' is a special stream with quirks and inconsistencies. + * We avoid using that stream by reading it into php://temp + */ + + /** @var resource $resource */ + if ((\stream_get_meta_data($resource)['uri'] ?? '') === 'php://input') { + $stream = self::tryFopen('php://temp', 'w+'); + stream_copy_to_stream($resource, $stream); + fseek($stream, 0); + $resource = $stream; + } + + return new Stream($resource, $options); + case 'object': + /** @var object $resource */ + if ($resource instanceof StreamInterface) { + return $resource; + } elseif ($resource instanceof \Iterator) { + return new PumpStream(function () use ($resource) { + if (!$resource->valid()) { + return false; + } + $result = $resource->current(); + $resource->next(); + + return $result; + }, $options); + } elseif (method_exists($resource, '__toString')) { + return self::streamFor((string) $resource, $options); + } + break; + case 'NULL': + return new Stream(self::tryFopen('php://temp', 'r+'), $options); + } + + if (is_callable($resource)) { + return new PumpStream($resource, $options); + } + + throw new \InvalidArgumentException('Invalid resource type: '.gettype($resource)); + } + + /** + * Safely opens a PHP stream resource using a filename. + * + * When fopen fails, PHP normally raises a warning. This function adds an + * error handler that checks for errors and throws an exception instead. + * + * @param string $filename File to open + * @param string $mode Mode used to open the file + * + * @return resource + * + * @throws \RuntimeException if the file cannot be opened + */ + public static function tryFopen(string $filename, string $mode) + { + $ex = null; + set_error_handler(static function (int $errno, string $errstr) use ($filename, $mode, &$ex): bool { + $ex = new \RuntimeException(sprintf( + 'Unable to open "%s" using mode "%s": %s', + $filename, + $mode, + $errstr + )); + + return true; + }); + + try { + /** @var resource $handle */ + $handle = fopen($filename, $mode); + } catch (\Throwable $e) { + $ex = new \RuntimeException(sprintf( + 'Unable to open "%s" using mode "%s": %s', + $filename, + $mode, + $e->getMessage() + ), 0, $e); + } + + restore_error_handler(); + + if ($ex) { + /** @var $ex \RuntimeException */ + throw $ex; + } + + return $handle; + } + + /** + * Safely gets the contents of a given stream. + * + * When stream_get_contents fails, PHP normally raises a warning. This + * function adds an error handler that checks for errors and throws an + * exception instead. + * + * @param resource $stream + * + * @throws \RuntimeException if the stream cannot be read + */ + public static function tryGetContents($stream): string + { + $ex = null; + set_error_handler(static function (int $errno, string $errstr) use (&$ex): bool { + $ex = new \RuntimeException(sprintf( + 'Unable to read stream contents: %s', + $errstr + )); + + return true; + }); + + try { + /** @var string|false $contents */ + $contents = stream_get_contents($stream); + + if ($contents === false) { + $ex = new \RuntimeException('Unable to read stream contents'); + } + } catch (\Throwable $e) { + $ex = new \RuntimeException(sprintf( + 'Unable to read stream contents: %s', + $e->getMessage() + ), 0, $e); + } + + restore_error_handler(); + + if ($ex) { + /** @var $ex \RuntimeException */ + throw $ex; + } + + return $contents; + } + + /** + * Returns a UriInterface for the given value. + * + * This function accepts a string or UriInterface and returns a + * UriInterface for the given value. If the value is already a + * UriInterface, it is returned as-is. + * + * @param string|UriInterface $uri + * + * @throws \InvalidArgumentException + */ + public static function uriFor($uri): UriInterface + { + if ($uri instanceof UriInterface) { + return $uri; + } + + if (is_string($uri)) { + return new Uri($uri); + } + + throw new \InvalidArgumentException('URI must be a string or UriInterface'); + } +} diff --git a/vendor/psr/http-client/CHANGELOG.md b/vendor/psr/http-client/CHANGELOG.md new file mode 100644 index 0000000..babba7c --- /dev/null +++ b/vendor/psr/http-client/CHANGELOG.md @@ -0,0 +1,31 @@ +# Changelog + +All notable changes to this project will be documented in this file, in reverse chronological order by release. + +## 1.0.3 + +Add `source` link in composer.json. No code changes. + +## 1.0.2 + +Allow PSR-7 (psr/http-message) 2.0. No code changes. + +## 1.0.1 + +Allow installation with PHP 8. No code changes. + +## 1.0.0 + +First stable release. No changes since 0.3.0. + +## 0.3.0 + +Added Interface suffix on exceptions + +## 0.2.0 + +All exceptions are in `Psr\Http\Client` namespace + +## 0.1.0 + +First release diff --git a/vendor/psr/http-client/LICENSE b/vendor/psr/http-client/LICENSE new file mode 100644 index 0000000..cd5e002 --- /dev/null +++ b/vendor/psr/http-client/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2017 PHP Framework Interoperability Group + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/psr/http-client/README.md b/vendor/psr/http-client/README.md new file mode 100644 index 0000000..84af5c5 --- /dev/null +++ b/vendor/psr/http-client/README.md @@ -0,0 +1,12 @@ +HTTP Client +=========== + +This repository holds all the common code related to [PSR-18 (HTTP Client)][psr-url]. + +Note that this is not a HTTP Client implementation of its own. It is merely abstractions that describe the components of a HTTP Client. + +The installable [package][package-url] and [implementations][implementation-url] are listed on Packagist. + +[psr-url]: https://www.php-fig.org/psr/psr-18 +[package-url]: https://packagist.org/packages/psr/http-client +[implementation-url]: https://packagist.org/providers/psr/http-client-implementation diff --git a/vendor/psr/http-client/composer.json b/vendor/psr/http-client/composer.json new file mode 100644 index 0000000..6fed350 --- /dev/null +++ b/vendor/psr/http-client/composer.json @@ -0,0 +1,30 @@ +{ + "name": "psr/http-client", + "description": "Common interface for HTTP clients", + "keywords": ["psr", "psr-18", "http", "http-client"], + "homepage": "https://github.com/php-fig/http-client", + "license": "MIT", + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "support": { + "source": "https://github.com/php-fig/http-client" + }, + "require": { + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0 || ^2.0" + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } + }, + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + } +} diff --git a/vendor/psr/http-client/src/ClientExceptionInterface.php b/vendor/psr/http-client/src/ClientExceptionInterface.php new file mode 100644 index 0000000..aa0b9cf --- /dev/null +++ b/vendor/psr/http-client/src/ClientExceptionInterface.php @@ -0,0 +1,10 @@ +=7.1", + "psr/http-message": "^1.0 || ^2.0" + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + } +} diff --git a/vendor/psr/http-factory/src/RequestFactoryInterface.php b/vendor/psr/http-factory/src/RequestFactoryInterface.php new file mode 100644 index 0000000..cb39a08 --- /dev/null +++ b/vendor/psr/http-factory/src/RequestFactoryInterface.php @@ -0,0 +1,18 @@ + `RequestInterface`, `ServerRequestInterface`, `ResponseInterface` extend `MessageInterface` because the `Request` and the `Response` are `HTTP Messages`. +> When using `ServerRequestInterface`, both `RequestInterface` and `Psr\Http\Message\MessageInterface` methods are considered. + diff --git a/vendor/psr/http-message/docs/PSR7-Usage.md b/vendor/psr/http-message/docs/PSR7-Usage.md new file mode 100644 index 0000000..b6d048a --- /dev/null +++ b/vendor/psr/http-message/docs/PSR7-Usage.md @@ -0,0 +1,159 @@ +### PSR-7 Usage + +All PSR-7 applications comply with these interfaces +They were created to establish a standard between middleware implementations. + +> `RequestInterface`, `ServerRequestInterface`, `ResponseInterface` extend `MessageInterface` because the `Request` and the `Response` are `HTTP Messages`. +> When using `ServerRequestInterface`, both `RequestInterface` and `Psr\Http\Message\MessageInterface` methods are considered. + + +The following examples will illustrate how basic operations are done in PSR-7. + +##### Examples + + +For this examples to work (at least) a PSR-7 implementation package is required. (eg: zendframework/zend-diactoros, guzzlehttp/psr7, slim/slim, etc) +All PSR-7 implementations should have the same behaviour. + +The following will be assumed: +`$request` is an object of `Psr\Http\Message\RequestInterface` and + +`$response` is an object implementing `Psr\Http\Message\RequestInterface` + + +### Working with HTTP Headers + +#### Adding headers to response: + +```php +$response->withHeader('My-Custom-Header', 'My Custom Message'); +``` + +#### Appending values to headers + +```php +$response->withAddedHeader('My-Custom-Header', 'The second message'); +``` + +#### Checking if header exists: + +```php +$request->hasHeader('My-Custom-Header'); // will return false +$response->hasHeader('My-Custom-Header'); // will return true +``` + +> Note: My-Custom-Header was only added in the Response + +#### Getting comma-separated values from a header (also applies to request) + +```php +// getting value from request headers +$request->getHeaderLine('Content-Type'); // will return: "text/html; charset=UTF-8" +// getting value from response headers +$response->getHeaderLine('My-Custom-Header'); // will return: "My Custom Message; The second message" +``` + +#### Getting array of value from a header (also applies to request) +```php +// getting value from request headers +$request->getHeader('Content-Type'); // will return: ["text/html", "charset=UTF-8"] +// getting value from response headers +$response->getHeader('My-Custom-Header'); // will return: ["My Custom Message", "The second message"] +``` + +#### Removing headers from HTTP Messages +```php +// removing a header from Request, removing deprecated "Content-MD5" header +$request->withoutHeader('Content-MD5'); + +// removing a header from Response +// effect: the browser won't know the size of the stream +// the browser will download the stream till it ends +$response->withoutHeader('Content-Length'); +``` + +### Working with HTTP Message Body + +When working with the PSR-7 there are two methods of implementation: +#### 1. Getting the body separately + +> This method makes the body handling easier to understand and is useful when repeatedly calling body methods. (You only call `getBody()` once). Using this method mistakes like `$response->write()` are also prevented. + +```php +$body = $response->getBody(); +// operations on body, eg. read, write, seek +// ... +// replacing the old body +$response->withBody($body); +// this last statement is optional as we working with objects +// in this case the "new" body is same with the "old" one +// the $body variable has the same value as the one in $request, only the reference is passed +``` + +#### 2. Working directly on response + +> This method is useful when only performing few operations as the `$request->getBody()` statement fragment is required + +```php +$response->getBody()->write('hello'); +``` + +### Getting the body contents + +The following snippet gets the contents of a stream contents. +> Note: Streams must be rewinded, if content was written into streams, it will be ignored when calling `getContents()` because the stream pointer is set to the last character, which is `\0` - meaning end of stream. +```php +$body = $response->getBody(); +$body->rewind(); // or $body->seek(0); +$bodyText = $body->getContents(); +``` +> Note: If `$body->seek(1)` is called before `$body->getContents()`, the first character will be ommited as the starting pointer is set to `1`, not `0`. This is why using `$body->rewind()` is recommended. + +### Append to body + +```php +$response->getBody()->write('Hello'); // writing directly +$body = $request->getBody(); // which is a `StreamInterface` +$body->write('xxxxx'); +``` + +### Prepend to body +Prepending is different when it comes to streams. The content must be copied before writing the content to be prepended. +The following example will explain the behaviour of streams. + +```php +// assuming our response is initially empty +$body = $repsonse->getBody(); +// writing the string "abcd" +$body->write('abcd'); + +// seeking to start of stream +$body->seek(0); +// writing 'ef' +$body->write('ef'); // at this point the stream contains "efcd" +``` + +#### Prepending by rewriting separately + +```php +// assuming our response body stream only contains: "abcd" +$body = $response->getBody(); +$body->rewind(); +$contents = $body->getContents(); // abcd +// seeking the stream to beginning +$body->rewind(); +$body->write('ef'); // stream contains "efcd" +$body->write($contents); // stream contains "efabcd" +``` + +> Note: `getContents()` seeks the stream while reading it, therefore if the second `rewind()` method call was not present the stream would have resulted in `abcdefabcd` because the `write()` method appends to stream if not preceeded by `rewind()` or `seek(0)`. + +#### Prepending by using contents as a string +```php +$body = $response->getBody(); +$body->rewind(); +$contents = $body->getContents(); // efabcd +$contents = 'ef'.$contents; +$body->rewind(); +$body->write($contents); +``` diff --git a/vendor/psr/http-message/src/MessageInterface.php b/vendor/psr/http-message/src/MessageInterface.php new file mode 100644 index 0000000..a83c985 --- /dev/null +++ b/vendor/psr/http-message/src/MessageInterface.php @@ -0,0 +1,187 @@ +getHeaders() as $name => $values) { + * echo $name . ": " . implode(", ", $values); + * } + * + * // Emit headers iteratively: + * foreach ($message->getHeaders() as $name => $values) { + * foreach ($values as $value) { + * header(sprintf('%s: %s', $name, $value), false); + * } + * } + * + * While header names are not case-sensitive, getHeaders() will preserve the + * exact case in which headers were originally specified. + * + * @return string[][] Returns an associative array of the message's headers. Each + * key MUST be a header name, and each value MUST be an array of strings + * for that header. + */ + public function getHeaders(): array; + + /** + * Checks if a header exists by the given case-insensitive name. + * + * @param string $name Case-insensitive header field name. + * @return bool Returns true if any header names match the given header + * name using a case-insensitive string comparison. Returns false if + * no matching header name is found in the message. + */ + public function hasHeader(string $name): bool; + + /** + * Retrieves a message header value by the given case-insensitive name. + * + * This method returns an array of all the header values of the given + * case-insensitive header name. + * + * If the header does not appear in the message, this method MUST return an + * empty array. + * + * @param string $name Case-insensitive header field name. + * @return string[] An array of string values as provided for the given + * header. If the header does not appear in the message, this method MUST + * return an empty array. + */ + public function getHeader(string $name): array; + + /** + * Retrieves a comma-separated string of the values for a single header. + * + * This method returns all of the header values of the given + * case-insensitive header name as a string concatenated together using + * a comma. + * + * NOTE: Not all header values may be appropriately represented using + * comma concatenation. For such headers, use getHeader() instead + * and supply your own delimiter when concatenating. + * + * If the header does not appear in the message, this method MUST return + * an empty string. + * + * @param string $name Case-insensitive header field name. + * @return string A string of values as provided for the given header + * concatenated together using a comma. If the header does not appear in + * the message, this method MUST return an empty string. + */ + public function getHeaderLine(string $name): string; + + /** + * Return an instance with the provided value replacing the specified header. + * + * While header names are case-insensitive, the casing of the header will + * be preserved by this function, and returned from getHeaders(). + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * new and/or updated header and value. + * + * @param string $name Case-insensitive header field name. + * @param string|string[] $value Header value(s). + * @return static + * @throws \InvalidArgumentException for invalid header names or values. + */ + public function withHeader(string $name, $value): MessageInterface; + + /** + * Return an instance with the specified header appended with the given value. + * + * Existing values for the specified header will be maintained. The new + * value(s) will be appended to the existing list. If the header did not + * exist previously, it will be added. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * new header and/or value. + * + * @param string $name Case-insensitive header field name to add. + * @param string|string[] $value Header value(s). + * @return static + * @throws \InvalidArgumentException for invalid header names or values. + */ + public function withAddedHeader(string $name, $value): MessageInterface; + + /** + * Return an instance without the specified header. + * + * Header resolution MUST be done without case-sensitivity. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that removes + * the named header. + * + * @param string $name Case-insensitive header field name to remove. + * @return static + */ + public function withoutHeader(string $name): MessageInterface; + + /** + * Gets the body of the message. + * + * @return StreamInterface Returns the body as a stream. + */ + public function getBody(): StreamInterface; + + /** + * Return an instance with the specified message body. + * + * The body MUST be a StreamInterface object. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return a new instance that has the + * new body stream. + * + * @param StreamInterface $body Body. + * @return static + * @throws \InvalidArgumentException When the body is not valid. + */ + public function withBody(StreamInterface $body): MessageInterface; +} diff --git a/vendor/psr/http-message/src/RequestInterface.php b/vendor/psr/http-message/src/RequestInterface.php new file mode 100644 index 0000000..33f85e5 --- /dev/null +++ b/vendor/psr/http-message/src/RequestInterface.php @@ -0,0 +1,130 @@ +getQuery()` + * or from the `QUERY_STRING` server param. + * + * @return array + */ + public function getQueryParams(): array; + + /** + * Return an instance with the specified query string arguments. + * + * These values SHOULD remain immutable over the course of the incoming + * request. They MAY be injected during instantiation, such as from PHP's + * $_GET superglobal, or MAY be derived from some other value such as the + * URI. In cases where the arguments are parsed from the URI, the data + * MUST be compatible with what PHP's parse_str() would return for + * purposes of how duplicate query parameters are handled, and how nested + * sets are handled. + * + * Setting query string arguments MUST NOT change the URI stored by the + * request, nor the values in the server params. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * updated query string arguments. + * + * @param array $query Array of query string arguments, typically from + * $_GET. + * @return static + */ + public function withQueryParams(array $query): ServerRequestInterface; + + /** + * Retrieve normalized file upload data. + * + * This method returns upload metadata in a normalized tree, with each leaf + * an instance of Psr\Http\Message\UploadedFileInterface. + * + * These values MAY be prepared from $_FILES or the message body during + * instantiation, or MAY be injected via withUploadedFiles(). + * + * @return array An array tree of UploadedFileInterface instances; an empty + * array MUST be returned if no data is present. + */ + public function getUploadedFiles(): array; + + /** + * Create a new instance with the specified uploaded files. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * updated body parameters. + * + * @param array $uploadedFiles An array tree of UploadedFileInterface instances. + * @return static + * @throws \InvalidArgumentException if an invalid structure is provided. + */ + public function withUploadedFiles(array $uploadedFiles): ServerRequestInterface; + + /** + * Retrieve any parameters provided in the request body. + * + * If the request Content-Type is either application/x-www-form-urlencoded + * or multipart/form-data, and the request method is POST, this method MUST + * return the contents of $_POST. + * + * Otherwise, this method may return any results of deserializing + * the request body content; as parsing returns structured content, the + * potential types MUST be arrays or objects only. A null value indicates + * the absence of body content. + * + * @return null|array|object The deserialized body parameters, if any. + * These will typically be an array or object. + */ + public function getParsedBody(); + + /** + * Return an instance with the specified body parameters. + * + * These MAY be injected during instantiation. + * + * If the request Content-Type is either application/x-www-form-urlencoded + * or multipart/form-data, and the request method is POST, use this method + * ONLY to inject the contents of $_POST. + * + * The data IS NOT REQUIRED to come from $_POST, but MUST be the results of + * deserializing the request body content. Deserialization/parsing returns + * structured data, and, as such, this method ONLY accepts arrays or objects, + * or a null value if nothing was available to parse. + * + * As an example, if content negotiation determines that the request data + * is a JSON payload, this method could be used to create a request + * instance with the deserialized parameters. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * updated body parameters. + * + * @param null|array|object $data The deserialized body data. This will + * typically be in an array or object. + * @return static + * @throws \InvalidArgumentException if an unsupported argument type is + * provided. + */ + public function withParsedBody($data): ServerRequestInterface; + + /** + * Retrieve attributes derived from the request. + * + * The request "attributes" may be used to allow injection of any + * parameters derived from the request: e.g., the results of path + * match operations; the results of decrypting cookies; the results of + * deserializing non-form-encoded message bodies; etc. Attributes + * will be application and request specific, and CAN be mutable. + * + * @return array Attributes derived from the request. + */ + public function getAttributes(): array; + + /** + * Retrieve a single derived request attribute. + * + * Retrieves a single derived request attribute as described in + * getAttributes(). If the attribute has not been previously set, returns + * the default value as provided. + * + * This method obviates the need for a hasAttribute() method, as it allows + * specifying a default value to return if the attribute is not found. + * + * @see getAttributes() + * @param string $name The attribute name. + * @param mixed $default Default value to return if the attribute does not exist. + * @return mixed + */ + public function getAttribute(string $name, $default = null); + + /** + * Return an instance with the specified derived request attribute. + * + * This method allows setting a single derived request attribute as + * described in getAttributes(). + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * updated attribute. + * + * @see getAttributes() + * @param string $name The attribute name. + * @param mixed $value The value of the attribute. + * @return static + */ + public function withAttribute(string $name, $value): ServerRequestInterface; + + /** + * Return an instance that removes the specified derived request attribute. + * + * This method allows removing a single derived request attribute as + * described in getAttributes(). + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that removes + * the attribute. + * + * @see getAttributes() + * @param string $name The attribute name. + * @return static + */ + public function withoutAttribute(string $name): ServerRequestInterface; +} diff --git a/vendor/psr/http-message/src/StreamInterface.php b/vendor/psr/http-message/src/StreamInterface.php new file mode 100644 index 0000000..a62aabb --- /dev/null +++ b/vendor/psr/http-message/src/StreamInterface.php @@ -0,0 +1,158 @@ + + * [user-info@]host[:port] + * + * + * If the port component is not set or is the standard port for the current + * scheme, it SHOULD NOT be included. + * + * @see https://tools.ietf.org/html/rfc3986#section-3.2 + * @return string The URI authority, in "[user-info@]host[:port]" format. + */ + public function getAuthority(): string; + + /** + * Retrieve the user information component of the URI. + * + * If no user information is present, this method MUST return an empty + * string. + * + * If a user is present in the URI, this will return that value; + * additionally, if the password is also present, it will be appended to the + * user value, with a colon (":") separating the values. + * + * The trailing "@" character is not part of the user information and MUST + * NOT be added. + * + * @return string The URI user information, in "username[:password]" format. + */ + public function getUserInfo(): string; + + /** + * Retrieve the host component of the URI. + * + * If no host is present, this method MUST return an empty string. + * + * The value returned MUST be normalized to lowercase, per RFC 3986 + * Section 3.2.2. + * + * @see http://tools.ietf.org/html/rfc3986#section-3.2.2 + * @return string The URI host. + */ + public function getHost(): string; + + /** + * Retrieve the port component of the URI. + * + * If a port is present, and it is non-standard for the current scheme, + * this method MUST return it as an integer. If the port is the standard port + * used with the current scheme, this method SHOULD return null. + * + * If no port is present, and no scheme is present, this method MUST return + * a null value. + * + * If no port is present, but a scheme is present, this method MAY return + * the standard port for that scheme, but SHOULD return null. + * + * @return null|int The URI port. + */ + public function getPort(): ?int; + + /** + * Retrieve the path component of the URI. + * + * The path can either be empty or absolute (starting with a slash) or + * rootless (not starting with a slash). Implementations MUST support all + * three syntaxes. + * + * Normally, the empty path "" and absolute path "/" are considered equal as + * defined in RFC 7230 Section 2.7.3. But this method MUST NOT automatically + * do this normalization because in contexts with a trimmed base path, e.g. + * the front controller, this difference becomes significant. It's the task + * of the user to handle both "" and "/". + * + * The value returned MUST be percent-encoded, but MUST NOT double-encode + * any characters. To determine what characters to encode, please refer to + * RFC 3986, Sections 2 and 3.3. + * + * As an example, if the value should include a slash ("/") not intended as + * delimiter between path segments, that value MUST be passed in encoded + * form (e.g., "%2F") to the instance. + * + * @see https://tools.ietf.org/html/rfc3986#section-2 + * @see https://tools.ietf.org/html/rfc3986#section-3.3 + * @return string The URI path. + */ + public function getPath(): string; + + /** + * Retrieve the query string of the URI. + * + * If no query string is present, this method MUST return an empty string. + * + * The leading "?" character is not part of the query and MUST NOT be + * added. + * + * The value returned MUST be percent-encoded, but MUST NOT double-encode + * any characters. To determine what characters to encode, please refer to + * RFC 3986, Sections 2 and 3.4. + * + * As an example, if a value in a key/value pair of the query string should + * include an ampersand ("&") not intended as a delimiter between values, + * that value MUST be passed in encoded form (e.g., "%26") to the instance. + * + * @see https://tools.ietf.org/html/rfc3986#section-2 + * @see https://tools.ietf.org/html/rfc3986#section-3.4 + * @return string The URI query string. + */ + public function getQuery(): string; + + /** + * Retrieve the fragment component of the URI. + * + * If no fragment is present, this method MUST return an empty string. + * + * The leading "#" character is not part of the fragment and MUST NOT be + * added. + * + * The value returned MUST be percent-encoded, but MUST NOT double-encode + * any characters. To determine what characters to encode, please refer to + * RFC 3986, Sections 2 and 3.5. + * + * @see https://tools.ietf.org/html/rfc3986#section-2 + * @see https://tools.ietf.org/html/rfc3986#section-3.5 + * @return string The URI fragment. + */ + public function getFragment(): string; + + /** + * Return an instance with the specified scheme. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified scheme. + * + * Implementations MUST support the schemes "http" and "https" case + * insensitively, and MAY accommodate other schemes if required. + * + * An empty scheme is equivalent to removing the scheme. + * + * @param string $scheme The scheme to use with the new instance. + * @return static A new instance with the specified scheme. + * @throws \InvalidArgumentException for invalid or unsupported schemes. + */ + public function withScheme(string $scheme): UriInterface; + + /** + * Return an instance with the specified user information. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified user information. + * + * Password is optional, but the user information MUST include the + * user; an empty string for the user is equivalent to removing user + * information. + * + * @param string $user The user name to use for authority. + * @param null|string $password The password associated with $user. + * @return static A new instance with the specified user information. + */ + public function withUserInfo(string $user, ?string $password = null): UriInterface; + + /** + * Return an instance with the specified host. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified host. + * + * An empty host value is equivalent to removing the host. + * + * @param string $host The hostname to use with the new instance. + * @return static A new instance with the specified host. + * @throws \InvalidArgumentException for invalid hostnames. + */ + public function withHost(string $host): UriInterface; + + /** + * Return an instance with the specified port. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified port. + * + * Implementations MUST raise an exception for ports outside the + * established TCP and UDP port ranges. + * + * A null value provided for the port is equivalent to removing the port + * information. + * + * @param null|int $port The port to use with the new instance; a null value + * removes the port information. + * @return static A new instance with the specified port. + * @throws \InvalidArgumentException for invalid ports. + */ + public function withPort(?int $port): UriInterface; + + /** + * Return an instance with the specified path. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified path. + * + * The path can either be empty or absolute (starting with a slash) or + * rootless (not starting with a slash). Implementations MUST support all + * three syntaxes. + * + * If the path is intended to be domain-relative rather than path relative then + * it must begin with a slash ("/"). Paths not starting with a slash ("/") + * are assumed to be relative to some base path known to the application or + * consumer. + * + * Users can provide both encoded and decoded path characters. + * Implementations ensure the correct encoding as outlined in getPath(). + * + * @param string $path The path to use with the new instance. + * @return static A new instance with the specified path. + * @throws \InvalidArgumentException for invalid paths. + */ + public function withPath(string $path): UriInterface; + + /** + * Return an instance with the specified query string. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified query string. + * + * Users can provide both encoded and decoded query characters. + * Implementations ensure the correct encoding as outlined in getQuery(). + * + * An empty query string value is equivalent to removing the query string. + * + * @param string $query The query string to use with the new instance. + * @return static A new instance with the specified query string. + * @throws \InvalidArgumentException for invalid query strings. + */ + public function withQuery(string $query): UriInterface; + + /** + * Return an instance with the specified URI fragment. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified URI fragment. + * + * Users can provide both encoded and decoded fragment characters. + * Implementations ensure the correct encoding as outlined in getFragment(). + * + * An empty fragment value is equivalent to removing the fragment. + * + * @param string $fragment The fragment to use with the new instance. + * @return static A new instance with the specified fragment. + */ + public function withFragment(string $fragment): UriInterface; + + /** + * Return the string representation as a URI reference. + * + * Depending on which components of the URI are present, the resulting + * string is either a full URI or relative reference according to RFC 3986, + * Section 4.1. The method concatenates the various components of the URI, + * using the appropriate delimiters: + * + * - If a scheme is present, it MUST be suffixed by ":". + * - If an authority is present, it MUST be prefixed by "//". + * - The path can be concatenated without delimiters. But there are two + * cases where the path has to be adjusted to make the URI reference + * valid as PHP does not allow to throw an exception in __toString(): + * - If the path is rootless and an authority is present, the path MUST + * be prefixed by "/". + * - If the path is starting with more than one "/" and no authority is + * present, the starting slashes MUST be reduced to one. + * - If a query is present, it MUST be prefixed by "?". + * - If a fragment is present, it MUST be prefixed by "#". + * + * @see http://tools.ietf.org/html/rfc3986#section-4.1 + * @return string + */ + public function __toString(): string; +} diff --git a/vendor/ralouphie/getallheaders/LICENSE b/vendor/ralouphie/getallheaders/LICENSE new file mode 100644 index 0000000..be5540c --- /dev/null +++ b/vendor/ralouphie/getallheaders/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Ralph Khattar + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/ralouphie/getallheaders/README.md b/vendor/ralouphie/getallheaders/README.md new file mode 100644 index 0000000..9430d76 --- /dev/null +++ b/vendor/ralouphie/getallheaders/README.md @@ -0,0 +1,27 @@ +getallheaders +============= + +PHP `getallheaders()` polyfill. Compatible with PHP >= 5.3. + +[![Build Status](https://travis-ci.org/ralouphie/getallheaders.svg?branch=master)](https://travis-ci.org/ralouphie/getallheaders) +[![Coverage Status](https://coveralls.io/repos/ralouphie/getallheaders/badge.png?branch=master)](https://coveralls.io/r/ralouphie/getallheaders?branch=master) +[![Latest Stable Version](https://poser.pugx.org/ralouphie/getallheaders/v/stable.png)](https://packagist.org/packages/ralouphie/getallheaders) +[![Latest Unstable Version](https://poser.pugx.org/ralouphie/getallheaders/v/unstable.png)](https://packagist.org/packages/ralouphie/getallheaders) +[![License](https://poser.pugx.org/ralouphie/getallheaders/license.png)](https://packagist.org/packages/ralouphie/getallheaders) + + +This is a simple polyfill for [`getallheaders()`](http://www.php.net/manual/en/function.getallheaders.php). + +## Install + +For PHP version **`>= 5.6`**: + +``` +composer require ralouphie/getallheaders +``` + +For PHP version **`< 5.6`**: + +``` +composer require ralouphie/getallheaders "^2" +``` diff --git a/vendor/ralouphie/getallheaders/composer.json b/vendor/ralouphie/getallheaders/composer.json new file mode 100644 index 0000000..de8ce62 --- /dev/null +++ b/vendor/ralouphie/getallheaders/composer.json @@ -0,0 +1,26 @@ +{ + "name": "ralouphie/getallheaders", + "description": "A polyfill for getallheaders.", + "license": "MIT", + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "require": { + "php": ">=5.6" + }, + "require-dev": { + "phpunit/phpunit": "^5 || ^6.5", + "php-coveralls/php-coveralls": "^2.1" + }, + "autoload": { + "files": ["src/getallheaders.php"] + }, + "autoload-dev": { + "psr-4": { + "getallheaders\\Tests\\": "tests/" + } + } +} diff --git a/vendor/ralouphie/getallheaders/src/getallheaders.php b/vendor/ralouphie/getallheaders/src/getallheaders.php new file mode 100644 index 0000000..c7285a5 --- /dev/null +++ b/vendor/ralouphie/getallheaders/src/getallheaders.php @@ -0,0 +1,46 @@ + 'Content-Type', + 'CONTENT_LENGTH' => 'Content-Length', + 'CONTENT_MD5' => 'Content-Md5', + ); + + foreach ($_SERVER as $key => $value) { + if (substr($key, 0, 5) === 'HTTP_') { + $key = substr($key, 5); + if (!isset($copy_server[$key]) || !isset($_SERVER[$key])) { + $key = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', $key)))); + $headers[$key] = $value; + } + } elseif (isset($copy_server[$key])) { + $headers[$copy_server[$key]] = $value; + } + } + + if (!isset($headers['Authorization'])) { + if (isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) { + $headers['Authorization'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION']; + } elseif (isset($_SERVER['PHP_AUTH_USER'])) { + $basic_pass = isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : ''; + $headers['Authorization'] = 'Basic ' . base64_encode($_SERVER['PHP_AUTH_USER'] . ':' . $basic_pass); + } elseif (isset($_SERVER['PHP_AUTH_DIGEST'])) { + $headers['Authorization'] = $_SERVER['PHP_AUTH_DIGEST']; + } + } + + return $headers; + } + +}